Hi All
I need some help setting up an automation which will include an if statement (i don’t know how to write them)
My automation currently is set to turn the living room lights on to a preset scene 15 mins before sunset time only if the tv is on and the living lights are already off. (See below automation yaml)
alias: TV Lights on when Sun Sets and TV is on
description: ''
trigger:
- platform: sun
event: sunset
offset: '- 00:15:00'
condition:
- condition: state
entity_id: media_player.living_room_tv
state: 'on'
- condition: device
type: is_off
device_id: 53e92772311d7655d84a2bd4f38c9a27
entity_id: light.floor_lamp_1
domain: light
action:
- scene: scene.evening
mode: single
What i want to do is change the scene depending on weather the Plex is playing or not.
if Plex is playing then scene.movie_mode if not then scene.evening_mode
Hope this makes sense.