TLDR: Can I block Philips Hue Dimmer Switch button presses during night?
Full context:
My two kids (3 years old) sleep in the same room, and each have a bed side lamp they can switch on/off using a good old switch. The problem is that if kid 1 wakes up at 5:00 and switch on the lamp, kid 2 also wakes up and starts shouting. And then we have got 2 angry kids at 5:00 in the morning. My solution would be to buy two Philips Hue smart plugs and two Philips Hue dimmer switches. At 19:00 it should block all button presses from the dimmer switches and switch off the light. Then at 6:30 in the morning, no more blocking of button presses, but it should NOT switch on the light. However, such a behaviour requires that the button presses are intercepted and blocked in the abovementioned period of time. And is this possible with the Philips Hue system? I’m using the Philips Hue bridge.
If you have the bridge then you can probably link the switches to just the bridge and not any lights.
Then poll the API of the bridge to see what button was last pressed and what time it is and take action.
I have not tried it all completely myself, I have a bridge and a switch but the switch is connected to the light.
But as far as I know that should not be needed.
OK, now we talking! It is something like this I’m looking for. So I assume the picture is showing the Philips Dimmer Switch, right? If thats the case, then it is definitely possible. But how do you poll the bridge API? Are you using third party addons/integrations?
Block it from the performing the “daytime” action. AppDaemon is just another automation framework. I prefer python code over yaml config, thus I’m using AppDaemon.
So you need too unlink the switch from those lights. Not sure how that’s done in hue, but in deconz it’s easy.
With deconz I can pick the switch events up in home assistant, I presume the same is possible in hue and appdaemon
I followed this guide and made a sensor to read the switch presses.
I can’t remember if that is part of the guide or not but it should give you enough to get going. Or I can help you.
I think/assume you reset the switch or don’t pair if it it’s not paired to have it disconnected from the light.
I had a quick look on the phone but couldn’t find it.
I’ll have a look at the computer when kids are in bed.
First of all, thank you @Hellis81 and @samnewman86. You are both right I need to unlink the switch and light. I can’t check how to do that in the Hue phone app right now. However, I’ve just found out that in the Hue integration in HA, you can click a dimmer switch and add a automation for that device. That could turn on a input_boolean, which then triggers an automation in AppDaemon. Anyway, now its time to buy some new switches and smart plugs
Since this reports which button was pressed then you could “reconfigure” the buttons during the night.
So you can only switch off or send a notification to you or TTS that one of the kids need you? Or turn on the light with 1% brightness and no way to go higher.
I think you are going to have to bypass the native switch capabilities and do all of your automations directly in HA. Meaning, do not configure your Hue switch to control anything in the Hue app. Then in HA, you can create your automations to do whatever you want whenever you want. Even different actions for the buttons at different times of day.