I have a switch in my system that, due to its mechanical features, must toggle it’s state when it receives an on or off from HA. I have a scene defined that turns off all of the lights except this one in that area and I would like to trigger an automation routine to toggle it’s state if it is currently “On” but not if it is off.
I have the following scene defined:
I have an automation that was built using the HA automation editor that is defined as:
- id: '1556942237223' alias: Stairwell Test trigger: - event_data: domain: scene service: turn_on service_data: entity_id: scene.upstairs_off event_type: call_service platform: event condition: - condition: state entity_id: switch.upstairs_stairway_lights state: 'On' action: - data: entity_id: switch.upstairs_stairway_lights service: switch.turn_off
and I have the card with the scene in it defined as follows:
- entity: scene.upstairs_off tap_action: action: call-service service: scene.turn_on service_data: entity_id: scene.upstairs_off
The automation will not trigger with these definitions and I could really use some help figuring out why.
Thank you for any advice here!