Hi,
I need to pause the movie playback when the lights are switched on , but my lights are switch based so I need to hack the domain of the standard blueprint
Create a light entity based on your switch, as shown here, and then you can use it as a light entity.
light:
- platform: switch
name: Christmas Tree Lights
entity_id: switch.christmas_tree_lights
I did it the other way round
pause the movie and lights come on
- id: f8f6c2cd-8749-456a-ac8f-bff806cf942b
alias: Watching movie Paused
trigger:
- platform: state
entity_id: media_player.tv_65
to: paused
condition:
condition: and
conditions:
- condition: state
entity_id: sensor.day_night
state: Night
- condition: state
entity_id: light.shelly_lounge
state: 'on'
action:
- data_template:
entity_id: script.movie_off
service: script.turn_on
- id: 29d06f19-0ab3-442a-9638-4de513ffb7d7
alias: Watching move play
trigger:
- platform: state
entity_id: media_player.tv_65
to: playing
condition:
condition: and
conditions:
- condition: state
entity_id: sensor.day_night
state: Night
- condition: state
entity_id: light.shelly_lounge
state: 'on'
- condition: state
entity_id: input_boolean.watching_movie
state: 'on'
action:
- data_template:
entity_id: script.movie_on
service: script.turn_on
and the 2 scripts
movie_on:
sequence:
- service: light.turn_on
data:
entity_id: light.shelly_lounge
brightness_pct: 40
movie_off:
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.shelly_lounge
state: "on"
sequence:
- service: light.turn_on
data:
entity_id: light.shelly_lounge
brightness_pct: 100