Change Hue startup behavior via HomeAssistant automation

Hi,

I’ve got another unusual train of thought. Here’s my starting scenario:

  • Hue lamp on the ceiling
  • Physical switch on the wall (not smart)

Now, it should be clear to everyone:
If the switch is off, the Hue lamp is no longer available in the smart home.
So, to prevent anyone from cutting off the power to the lamp, I’ve converted the switch to a push button and wired it to always let through continuous power.

So:
Pressing the button creates a power outage.
And there’s the first little “trick” - the Hue lamp is configured to turn on after a “power outage” (here forced manually).

A little bit working :wink:
I can turn it “on” at the switch - nice.

Unfortunately, turning it off isn’t possible; that has to be done in home automation or through some automation process… you know how it goes.

Now, to the question!

I had the idea to change the startup behavior of the Hue lamp.
If the lamp switches to on: change the startup behavior after a power outage to “off”
If the lamp switches to off: change the startup behavior after a power outage to “on”

This should result in a lamp that was “on” being briefly “unavailable” and then, due to its startup behavior, being “off”.
Switching to “off” triggers the automation and sets the startup behavior back to “on”.

Therefore, the next button press should reverse the whole process:
The lamp is “off” and the startup behavior is “off”. Pressing the button sets it to “unavailable” and then the lamp turns “on”. “On” in turn changes the startup behavior to “off”.

The good thing would also be that for vacation, you can set the startup behavior to “off” and deactivate the automation for changing the startup behavior.
Because so far, the idea still carries the risk that during vacation, all the lights suddenly turn on because there was a power outage.

My low tech solution is to leave the light switch on and put one of those protectors over it so it can’t be turned off. Then I put a hue remote switch on the wall next to the switch, which in addition to turning on/off also allows scene switching and dimming.

I know it is always possible to do things in another way.
This doesn’t answer my question.

Is it possible to change the startup behavior of hue lamps by home assistant?

What integration are you using ? The Hue hub, ZHA, Zigbee2MQTT ?

The hue bridge:

If only any other integration can do that, let me know

Besides that the answer to your question is quite likely no, I do not think this is very wise. It may damage the expensive hue lamp sooner or later. It will temporarily break routes to other lights, that may miss comands. It will also put the light in link mode, if anyone presses a remote it might inadvertently link that remote to the light.

If you are already willing to change wiring then a hue wall switch is the best choice. It will also add more functionality.

With Zigbee2MQTT you could set the power-on-behaviour to ‘toggle’