I created this automation and cannot figure out why it just won’t fire at all… I’ve been through it several times since this morning and I just cannot get it to work. I believe I’ve followed the logic and cannot see why it just isn’t working… Any help and/or suggestions would be greatly appreciated… I’m sure I missed something simple…
Thank you all!
- alias: 11 - Bed Presence Light Voice Prompt
id: Bed Table Lamps
triggers:
- trigger: state
entity_id:
- binary_sensor.bed_presence_c175fc_bed_occupied_left
from: "off"
to: "on"
- trigger: state
entity_id:
- binary_sensor.bed_presence_c175fc_bed_occupied_right
from: "off"
to: "on"
conditions:
- or:
- condition: state
entity_id: switch.john_light_shelly
state: "on"
- condition: state
entity_id: switch.girl_light_shelly
state: "on"
actions:
- action: assist_satellite.ask_question
data:
entity_id: assist_satellite.bedroom_assist_satellite
preannounce: true
question: "The lights are on would you like to turn one or all of them off?"
answers:
- id: "girl_side"
sentences:
- girl side
- id: "my_side"
sentences:
- my side
- id: "both"
sentences:
- both
- id: "no"
sentences:
- nope
- no Thank you
- Please no
response_variable: answer
- choose:
# Turn off girl's side
- conditions: "{{ answer.id == 'girl side' }}"
sequence:
- action: switch.turn_off
target:
entity_id: switch.girl_light_shelly
# Turn off my side
- conditions: "{{ answer.id == 'my_side' }}"
sequence:
- action: switch.turn_off
target:
entity_id: switch.john_light_shelly
# Turn off Both
- conditions: "{{ answer.id == 'both' }}"
sequence:
- action: switch.turn_off
target:
entity_id:
- switch.girl_light_shelly
- switch.john_light_shelly
# Turn off None
- conditions: "{{ answer.id == 'no' }}"
sequence:
- action: assist_satellite.announce
data:
message: "Ok, Thank you John"
preannounce: false
target:
entity_id: assist_satellite.bedroom_assist_satellite
mode: single
No, multiple triggers are, by default, logically ORed, not ANDed, so all it takes is just one of the two to trigger. You cannot configure triggers to be logically ANDed.
Your automation is designed to trigger if either of the two bed binary_sensors changes from off to on and if either of the two light switches is on.
Glad to hear the trace led to the source of the problem.
For future reference, if an automation has traces it means it was triggered (at bare minimum, one of its triggers had triggered and it executed its conditions if any existed).
So when you said “it just won’t fire at all” it implied it failed to trigger. However, that’s a misrepresentation of what ailed this automation.
The automation’s triggers had “fired” because it generated traces. What it failed to do was execute its action (because of a syntax error).