Open DevelopIdeas opened 3 months ago
Thanks for your contribution!
I agree that it would be a nice feature to make device_id
available to use in functions.
However, it would override device_id
if it's used in parameters of spec.
I think it would be better if we change two things:
Create reserved word which contains any data, such as user_input
or exposed_entities
, needed for users. The reserved word can be something like _params
, _args
, or word starting with _
, so that it reduces possibility of conflict. Then your function should look like this.
- service: python_script.play_music
data:
device_id: '{{_params.user_input.device_id}}'
...
Make it available not only to script function but also to any functions. (Probably move your code to here and here would work)
Allows for use of device_id inside service / script functions![Screenshot 2024-03-14 at 23 55 30](https://github.com/jekalmin/extended_openai_conversation/assets/1929057/05418af4-d8eb-419d-b245-dc72de9d6a3a)