I created an automation that when motion was detected to turn on an LED strip in my bathroom for 2 minutes.
During the day the color would be Blue (using a Preset called Solid Blue) and at night Red (using a Preset called Solid Red).
The daytime works as expected, but the one at night when motion is activated turns on Blue for about 5 seconds and then turns Red.
Can someone possibly explain why this happens.
Below is the code.
Thanks
####################################################
# MASTER THRONE LED LIGHTS ON NIGHT 2025Dec25 #
####################################################
- id: "2960a59d-ecc4-4574-9690-c030794a90dd"
alias: "Master Bathroom Throne ON (Night)"
description: "Master Bathroom Throne ON (Night)"
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_master_bathroom_throne
to: "on"
condition:
- condition: time
after: "20:00:00"
before: "06:00:00"
action:
- action: light.turn_on
target:
entity_id: light.master_bathroom_throne
- action: select.select_option
target:
entity_id: select.master_bathroom_throne_preset
data:
option: "Solid Red"
- delay:
seconds: 120
- service: select.select_option
target:
entity_id: select.master_bathroom_throne_preset
data:
option: "Off"
####################################################
# MASTER THRONE LED LIGHTS ON DAY 2025Dec25 #
####################################################
- id: "0e2e2bf6-e8d4-4e24-9213-e892fc64757b"
alias: "Master Bathroom Throne ON (DAY)"
description: "Master Bathroom Throne ON (DAY)"
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_master_bathroom_throne
to: "on"
condition:
- condition: time
after: "06:00:00"
before: "20:00:00"
action:
- action: light.turn_on
target:
entity_id: light.master_bathroom_throne
- action: select.select_option
target:
entity_id: select.master_bathroom_throne_preset
data:
option: "Solid Blue"
- delay:
seconds: 120
- service: select.select_option
target:
entity_id: select.master_bathroom_throne_preset
data:
option: "Off"
####################################################
# END OF CONFIGURATION FILE #
####################################################