apps configuration in yaml also available for services,modules,packages? #298
Replies: 1 comment 1 reply
-
Hmmmm.... without a bit more detail about what you want to use the yaml for, and what you are trying to accomplish, it's a little hard to offer good advice, but the short version is that pyscripts built-in yaml support only works for apps. You could have your modules read their own yaml files directly, but it's probably more hassle than you want. So is creating a service. But, it should be possible to do what you want with an app that that uses an event trigger. Basically, set up the event trigger to listen for messages from google assistant, reads the message and does whatever you want. I haven't done much work with either event triggers or google, so I can't give you much more guidance on that. Another hack would be to make HA do more work for you: set up your google call to toggle an input Boolean (probably via an automation) and have your app watch for a state change on the input. The upside is that you won't have to write as much code or deal with events - the downside is that you'll have to set up a new input and automation for each new thing you want to do. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've used the yaml config in an app (with trigger closure) before...
now, I want a script that can be called from Google assistant. So, at first sight, I need to make a "script" in HA, that calls a "service" which is written in pyscript (I see pyscripts are not exposed to Google assitant, so I guess this is a workaround).
As said, I've used yaml config for apps before (almost always with trigger closure).
When I create a service, is the yaml config working the same way as with apps?
Or in general: you can specify config data in a config file for an app. Is there something similar for modules, packages, .... ?
(I'm just a beginning programmer in python. So, python scripts as one source is no problem, but, I'm trying to go further, and creating/using modules and eventually packages too)
Beta Was this translation helpful? Give feedback.
All reactions