I have the below automation to trigger a script (also below) just before sunset. It is triggering but the lights are turning straight back off after just one second. Can anyone please advise what may be wrong with either of the below?
Automation:
- id: 'sunset_living_room'
alias: Sunset Living Room
trigger:
platform: sun
event: sunset
offset: '-00:05:00'
action:
service: script.turn_on
entity_id: script.sunset_living_room
Script:
sunset_living_room:
alias: Sunset Living Room
icon: "mdi:weather-sunset-down"
sequence:
- service: light.turn_on
data:
entity_id: light.play_bar_1
brightness: 80
rgb_color:
- 235
- 137
- 52
- service: light.turn_on
data:
entity_id: light.play_bar_2
brightness: 80
rgb_color:
- 235
- 137
- 52
- service: light.turn_on
data:
entity_id: light.play_bar_3
brightness: 80
rgb_color:
- 235
- 137
- 52
- service: light.turn_on
data:
entity_id: light.tv_l
brightness: 40
rgb_color:
- 235
- 137
- 52
- service: light.turn_on
data:
entity_id: light.tv_r
brightness: 40
rgb_color:
- 235
- 137
- 52
- service: light.turn_off
entity_id: light.living_room