grahamj
(Graham J)
November 28, 2023, 1:43pm
1
Good day… Developer with quite a bit of HA experience here, I’m seeing something quite unusual. I made an automation via the UI with two triggers with IDs. I then have two Choose components each of which have an Option conditional on the same trigger ID. However only one of them actually runs the actions in the Option. Weird right?
Check out the trace:
How can this be?
Troon
(Troon)
November 28, 2023, 3:43pm
2
Please paste the YAML for the complete automation. Doesn’t look like it from the diagram, but you’re not overwriting the trigger
are you? A wait_for_trigger
or something?
grahamj
(Graham J)
November 28, 2023, 4:29pm
3
No I don’t believe so…
alias: Front door motion or person
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.doorbell_motion
to: "on"
from: "off"
id: motion
- platform: state
entity_id:
- binary_sensor.doorbell_person_detected
from: "off"
to: "on"
id: person
condition:
- condition: state
entity_id: input_boolean.automation_master
state: "on"
action:
- parallel:
- if:
- condition: state
entity_id: timer.front_door_motion_timer
state: idle
- condition: state
entity_id: timer.front_door_person_timer
state: idle
then:
- service: script.outdoor_sounds
data: {}
alias: Play sound if both timers idle
- choose:
- conditions:
- condition: trigger
id:
- motion
- condition: state
entity_id: timer.front_door_motion_timer
state: idle
- condition: state
entity_id: timer.front_door_person_timer
state: active
sequence:
- service: script.announce_with_alexa
data:
message: they're at the door
skip_suffix: true
enabled: true
alias: First motion after person
- conditions:
- condition: trigger
id:
- person
- condition: state
entity_id: timer.front_door_person_timer
state: idle
sequence:
- parallel:
- alias: Announce if it's not one of us arriving
if:
- condition: state
entity_id: timer.arrival_garage_timer
state: idle
then:
- service: script.announce_with_alexa
data:
message: there's someone out front
skip_suffix: true
- if:
- condition: state
entity_id: input_boolean.anyone_home
state: "off"
then:
- service: counter.increment
data: {}
target:
entity_id: counter.door_visits_while_away
alias: If no one home increment visit counter
alias: First person trigger
- alias: Restart appropriate timer
choose:
- conditions:
- condition: trigger
id:
- motion
sequence:
- service: timer.start
data: {}
target:
entity_id: timer.front_door_motion_timer
- conditions:
- condition: trigger
id:
- person
sequence:
- service: timer.start
data: {}
target:
entity_id: timer.front_door_person_timer
mode: queued
max: 10