#Script errors on stop

1 messages · Page 1 of 1 (latest)

void tiger
#

not sure whats going on here but no matter what i do, including writing a message manually in the stop field it will always error on the response name

zealous kraken
#

Did you define the variable response?

void tiger
zealous kraken
#

it is whatever you want it to be

#

but you need to define it somewhere

#

note that it is optional

void tiger
#

this is just for a llm to be able to know what to say when the script has run'

zealous kraken
#

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?

void tiger
#

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

zealous kraken
#

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).

void tiger
#

yeah im wanting to feed it data releated to the status of a vacuum

zealous kraken
#

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

void tiger
#

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

zealous kraken
#

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
void tiger
#

oh i see sorry

#

yeah has to have a key and a value