I’m trying to get my son’s Hue to power-on at default value 10% instead of 100% at night. Problem here is that he’s used to switching it on and off via the lamp switch and not the Philips remote.
I’ve been trying to get it to work via this automation but it does not seem to work, what am I doing wrong ?
I think the problem you’ll have here (I’ll happily stand corrected) is that when you switch a hue bulb off at the mains it will always come back at 100% when the power is reconnected.
So regardless of what you do in HA it will be on at 100% initially, and then I suspect that with your method described above HA is sending the signal to dim it as soon as it’s being switched on, but that the bulb is still initialising and doesn’t accept the command.
You could add a short delay, so that it does dim after being switched on, but I don’t think you’ll be able to stop it going to 100% for a second or so when first switched on.
Reconfiguring your son is the best solution for this one
You can’t program a default brightness directly in the lamps with hue when flipping the switch for power. But as you’re doing with your automation you should be able to turn it on with HASS at 10%. Have you searched the forums?
Thanks for all the feedback, I think I will try the delay first and test it. I already have a Philips remote but it’s too many buttons for my 6 years old son especially when he’s switching it on half asleep.
I’ll post feedback on the results of the delay if it works!
It takes some time for a light to reconnect to bridge after the power is on.
It takes 30 seconds between polls for hass to know when a hue light has gone live.
So if your automation is based on any light in the group turning on after power has come back to that light, I think you need another solution. Because it will take up to 30 seconds to trigger the automation.
I think you can use set scan_interval to speed up the reconnecting issue and trigger at brightness level. This way the automation will trigger as soon as HA reconnect to the light.
Change gateway to something that doesn’t require polling updates. But you won’t get away from the initial issue of delay from powered off devices takes some time to reconnect as well
Perfect, I’ve changed the scan_interval value to 10 secs and it’s fine. The default brightness is not that much for a few seconds and the automation triggers as soon HA reconnect without adding any additional delays.
looking for exactly that i was wondering if you could share your automation? I have an outside light that is taken off the grid by a light sensor, and it always starts 100% when it gets reconnected. I have a customization to nit show it when unavailable, but would like to adjust as you’ve described when powering on.
fwiw, this made it working correctly, although the original automation set the light when triggered manually, I’ve changed it to be in line with the documentation and have entity_id under data:, and, what i suppose to be the reason for succes now, is a longer wait time:
ive been testing with this, but the light isnt set accordingly, and set to full brightness at start and stays like that. I am making any obvious mistakes here:
in the mean time I have adapted my automation to a longer timespan for the lights to be reachable, and also, added a condition the light itself had to be on, which was a bit of an issue in the implementation of Hue lately…
this way I am sure al is ok (checking the sensor is a rest_sensor reading of the Hub directly, the on-check is for the lamp in the Hassio setup) , and the automation kicks in:
other bulbs are capable of this (I had the same issue and came across this post via google)
So this doesn’t solve your problem directly (also looking at the thread age) but might give some input for others who also find this thread.
By chance I got hold of the following lamps from a German “quality light manufacturer” (even though these lights seemed to be bought in / are made in China…)… But they have this feature out of the box that after power loss (in my case using “normal” light switches ) they restore to the last set value. This really is a game changer in real world scenarios.