How to incorporate Hue in HA

As a newby on HA I’m having some trouble getting my Hue lamps to work nicely with HA.

My setup consists of a Hue Bridge/Gateway and several Hue Lamps and switches. Home Assistant immediately recognised the lamp and switches, no issue there. But when I try to create events for the lamps is were it goes wrong.

For example, I have 2 Hue wall switches modules in my hallway that control 1 lamp. With the Hue App I was able to configure them. Now I want to add some smart events to it, so that when the switch is pressed after 19:00 in the evening the light goes on but is dimmed with a scene. But when I create such an event in HA, make the trigger the “initial press” of a wall switch module, it does not work most of the times. I think that is because HA en Hue are fighting what to do with the lamp after the switch is pressed. Hue is configured to apply the last enabled scene when the switch is pressed. HA is configured to apply a certain scene after set time. Who wins is a guess, but most of the times the Hue Bridge wins and the latest scene is applied instead of that dimmed scene.

So how do I go about this? Do I need to remove the switch from the Hue App (I think this will also remove it from the Hue Bridge) or is there another way of doing/configuring this. I want Home Assistant to be leading, but will still use the Hue Bridge/App for some simple tasks, but if necessary I will convert all the things from Hue App to HA events.

1 Like

You could introduce a time delay for the HA action.
i.e. at switch press wait for 3 seconds until the HUE bridge is done and the overwrite the HUE scene with the HA scene.


Pick one of the two methods. Either have the button-event handled by the Hue bridge or by Home Assistant.

In my case, I programmed the buttons to use the Hue bridge. However, I use Home Assistant to detect a long-press of a Hue Dimmer Switch’s OFF button to serve another purpose. In your case, where the lighting scene is determined by time of day, I would have Home Assistant handle all button-events.

Now I get it. I was stuck in my head how to disable to switch in Hue bridge but keep using it in HA. But that was an incorrect way of approaching it. All I got to do is in the Hue App configure the switch to not be linked to a lamp.

Thanks for helping me get on track.