I know you can use a trigger slot to fill in a name on a sensor, for example I use…
platform: conversation
command:
- Where is {name}
If I say where is Andrew, it then responds using
{{ states('sensor.' ~ trigger.slots.name | lower | replace('?', '') ~ 'cl') }}
Where sensor.andrewcl
is a sensor that says where I am… As below…
- name: "andrewcl"
unique_id: 230207031515
state: >-
{% if is_state('sensor.where_is_andrew', 'dining') %}
Andrew is in the Dining Room.
...
{% else %}
Sorry, Andrew is nowhere to be found.
{% endif %}
Works wonderfully… there is one for each person in the house.
Now I would like to do a simar thing with Booleans, I have a Boolean for each person, when turned on it would run an automation specific to that person.
So I would use
platform: conversation
command:
- {name} is using the Gym
And be able to trigger the correct Boolean… Just not sure of the syntax if someone can help… I am thinking something like below
service: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: 'input_boolean.gym_setup_' ~ trigger.slots.name
Hope this makes sense…