Hi,
i’m trying to automate a setting for watching TV. i already created a scene with all my lights properly set. The setting of the lights works, but now i try to restore the state of the lights before activating the scene. I stumbled across the documentation Scenes and this is my solution, which unfortunately does not work.
# in scripts.yaml
tv_mode_on:
alias: "TV Modus aktivieren"
sequence:
- service: scene.create
data:
scene_id: before_tv
snapshot_entities:
- switch.wandlampe
- switch.d1
- light.stehlampe_zigbee
- switch.d2
- light.kugellampe
- service: scene.turn_on
target:
entity_id: scene.fernsehen
tv_mode_off:
alias: "TV Modus deaktivieren"
sequence:
- service: scene.turn_on
target:
entity_id: scene.before_tv
i also created a switch to toggle the mode:
tv_mode:
friendly_name: tv_mode
turn_on:
service: script.turn_on
entity_id: script.tv_mode_on
turn_off:
service: script.turn_off
entity_id: script.tv_mode_off
Can anybody tell me what i am doing wrong?
Thanx!