I have automations set for all my scenes to also trigger respective input booleans to "On" so that I know a scene is active.
I've now set up an automation which says "When the TV is turned off after 20:00 and the Movie Scene is active, change to the Evening Scene." It fires the scene as it should but for some reason the input boolean stays to off, even though the Evening automation says to turn it to on when the "turn on" service is called. Here's my code:
Scene change:
alias: Change to Evening Scene when TV is turned off
description: ""
trigger:
- platform: device
device_id: [device_id]
domain: media_player
entity_id: [entity_id]
type: turned_off
condition:
- condition: or
conditions:
- condition: time
after: "18:00:00"
- condition: state
entity_id: input_boolean.scene_movie_activity
state: "on"
action:
- action: scene.turn_on
data: {}
target:
entity_id: scene.evening
mode: single
Input boolean automation which I expect to run after the scene change:
alias: Evening Scene is ON
description: ""
trigger:
- platform: event
event_type: call_service
event_data:
domain: scene
service: turn_on
service_data:
entity_id: scene.evening
condition: []
action:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 150
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.scene_evening_activity
mode: single