Script executes (sometimes) upon Home Assistant reboot


I have a number of ‘old school’ RF and IR switches that are left over from the “dumb” era of home automation, i.e. controlling lights with a dinky remote… Some time ago, I purchased a broad link IR/RF blaster and generated scripts to drive the blaster that are in turn called by switches defined in configuration.yaml:

Here’s the On/Off script (I have two separate ones, this is just for illustration purposes:

alias: Candles ON (or OFF)
  - service: remote.send_command
      num_repeats: 1
      delay_secs: 0.4
      hold_secs: 0
      device: LED candles
      command: "ON" or "OFF"
      device_id: 22ff8f1335119d78cf6aaa5935a719db
mode: single
icon: mdi:candle

And this is the switch:

switch: # IR/RF script callers
  - platform: template # LEDcandles
          service: script.candles_on
          service: script.candles_off
        friendly_name: "LED Candles"

… now, as mentioned in the title of this post, the LED candles (and just the LED candles) almost always switch on after rebooting HA.

I have a total of six such setups for various lamps that still use these ‘dumb’ switches. Only the LED candle ON script is triggered upon boot…

Does anyone have an idea on this?

Best regards,

… I just realized that it may not be the script, but the IR blaster itself that is ‘acting up’ upon boot… It’s a “Broadlink RM4 pro” … any pointers from anyone out there?


This issue still persists and I just made an accidental discovery: The IR blaster is triggered by the Zigbee2MQTT Add-on being (re-)launched. How those two go together is beyond me.

Does anyone have an idea, why this is happening. I can reproducibly switch on my IR-controlled LED lights by restarting the Zigbee2MQTT Add-on… ???

Best regards,