Holiday Lights Turning On and Off

I have six different sets of holiday lights. Some are Zigbee bulbs, some are based on WLED and others just a basic Wemos d1 mini.

All the lights have automations that make them do something. This part works fine.

My problem is that they are turn on at 16:30 and off at 22:00.
The lights turn on fine, but I have a problem with the off part. The automation panel in HA show that they were fired at 22:00 but some are off and other are not. For example my garage sconces with zigbee bulbs go through a day or two when they are not turned off, then will go a few weeks where they are perfect.
My other lights will sometimes turn off and other times not turn off.

If I run the automation through the automation panel they turn off.
There is no consistency as to if they turn off or not.

Can any one possible shed some light on this. Also is it possible to run the light.turn_off condition lets say one minute after the first was called.

Thanks for the help.

This suggests that there may be a problem with trigger/conditions? When you use the “Run actions” command in the UI, that’s all it does - trigger and conditions are ignored.

In any event, it would be helpful to see your yaml.

Perhaps there is a timing issue and you need to add delays between to get around zigbee network congestion?

Turn a couple off, add a 1 second delay, turn a couple more off, repeat…

2 Likes

Another reason might be they are turned off but on again for some other reason. The automation traces and logbook entries for the lights should be able to give you some clues. And it is always also wise to check the system logs.

Here is my yaml code

####################################################
#   HANUKKAH STAR 1 ON  2025Dec09                  #
####################################################
- id: "34c55793-0cd4-4fc6-be7d-345c65e84bb9"
  alias: 'Star 1 ON'
  description: Star 1 ON  
  trigger:
    - platform: time
      at: '16:00:00'  
  action:
    - service: light.turn_on
      target:
        entity_id: light.star1_main
  mode: single  
####################################################
#   HANUKKAH STAR 1 OFF  2025Dec09                 #
####################################################
- id: "8be9644f-d0e8-4eb1-8f10-a336e9b913f1"
  alias: 'Star 1 OFF'
  description: Star 1 OFF  
  trigger:
    - platform: time
      at: '22:00:00'  
  action:
    - service: light.turn_off
      target:
        entity_id: light.star1_main
  mode: single   

FWIW, anything that I want to work reliably - issue the command, if the state didn’t change, retry the command with a delay, and do that up to 3 times, then generate an alert.

I did this through a set of scripts. There’s now a custom component that does it.

Yes, it’s very easy to have old automation. Or something turning on an area, etc.

So you have multiple ‘off’ automations firing at exactly 22:00:00?

Try either putting all the off commands in one automation with delays between them, or staggering the off time triggers slightly (a few seconds). This should help with zigbee network congestion, if that is the issue.

If it is a mesh issue then put more zigbee repeaters nearby.

If it is an interference issue then you may need to change your zigbee or wifi channel. There are guides about this in the Community section. See: The Home Assistant Cookbook - Index

1 Like