Hello,
could some help me please with my task?
I have a number of (door/window) sensors that could be in “on” or “off” state.
I need to cycle through them to get a name of a sensor which is in “on” state to fire a message to a user.
Currently I have this setup:
# Called before alarm goes to ARM state to make sure all doors are shut.
- alias: Doors pre-check
trigger:
platform: state
entity_id: input_boolean.alarm_arm_state
to: 'on'
condition:
condition: or
conditions:
- condition: state
entity_id: binary_sensor.door_window_sensor_158d0002b6d532 #Rear Sliding Door
state: 'on'
- condition: state
entity_id: binary_sensor.door_window_sensor_158d0002b7d039 #Living Sliding Door
state: 'on'
...
action:
- service: tts.google_say
entity_id: media_player.googlehome8032
data:
message: "Attention! Some doors still open!"
Is it possible, instead of one message “Attention, some doors opened” create individual messages so I would get something like “Attention, kitchen door is open”, “Attention, garage door is opened” etc?
Each sensor has its own meaningful description of course.
Thank you.