#Script errors on stop
1 messages · Page 1 of 1 (latest)
Did you define the variable response?
where does it need to be defined? is it a field?
it is whatever you want it to be
but you need to define it somewhere
note that it is optional
this is just for a llm to be able to know what to say when the script has run'
okay
then you need to define a variable in your script
what is the script supposed to do?
I guess you want to send this Ai_message to the LLM right?
well it will be to give voice controls for a robot vacuum but right now im just testing it, currently it takes an entity in, uses google gen to write up a random message and pass that through for the assist to say
If you use an LLM you don't need to tell it anything to say, the stop action with the response variable is only used to feed it data (like eg weather forecast data, or todo list items or whatever).
yeah im wanting to feed it data releated to the status of a vacuum
okay
then you need to define a variable with that data, and it should be a mapping
eg
- variables:
vacuum_data:
status: "{{ states('vacuum.foo') }}"
- stop: ""
response_variable: vacuum_data
note that the variable has to be a mapping
when you say mapping do you mean mapping vacuum_data to another value like the state of the vacuum or a response value from say a calander
it has to be a YAML mapping (so a dictionary with keys and values)
it can't be just a value
# correct
- variables:
vacuum_data:
status: "{{ states('vacuum.foo') }}"
- stop: ""
response_variable: vacuum_data
# incorrect
- variables:
vacuum_data: "{{ states('vacuum.foo') }}"
- stop: ""
response_variable: vacuum_data