What I’m trying to accomplish: When my garage is open, turn on the shop lights. Garage is controlled with the MyQ integration. The lights are controlled via the TPLINK integration. I’m able to successfully control both via HA without automation.
I set up an automation using trigger id’s and the choose action based on the trigger id. There is nothing in the logs indicating it even tried to run. The trace timeline tab seems to show it choosing a default option that skips either choice I’ve defined.
Here is the YAML for the automation I set up:
alias: Toggle Garage Lights
description: ‘’
trigger:
- platform: state
id: Detached Garage Open
entity_id: cover.detached_garage_2
to: Open - platform: state
entity_id: cover.detached_garage_2
id: Detached Garage Closed
for:
hours: 0
minutes: 5
seconds: 0
from: Open
condition: []
action: - choose:
- conditions:
- condition: trigger
id: Detached Garage Open
sequence: - service: switch.turn_on
data: {}
target:
entity_id: switch.detached_garage_interior_light
- condition: trigger
- conditions:
- condition: trigger
id: Detached Garage Closed
sequence: - service: switch.turn_off
data: {}
target:
entity_id: switch.detached_garage_interior_light
default: []
mode: single
- condition: trigger
- conditions:
1 post - 1 participant