The Hue integration, and specifically, the sensor manager for handle remotes and motion sensors, works with a polling system which is fixed with a 5s scan interval.
Knowing that a higher request rate normally hurts the hue bridges, but also knowing about the stability of their own systems, some people, like me, want to set a faster rate, or even being able to change it for some specific periods.
Yes, you already have the yaml to do it. You don’t need any change in the repo to do it, just do it like any other input number + automation to call any other HA service
First cast the value to int in the template, that won’t work like that:
data_template:
scan_interval:
seconds: >
{{states('input_number.hue_polling_interval') | int }}
Templates render text. If you need numbers you need to explicitly convert them.
Also, about the scan_interval field in there, it is a time_period object, so you can pass a dict like that with seconds:, minutes:, etc, but you could also pass a text like this: “00:00:7” and would work.
I noticed that the data_template was not working and made a fix, please update the repo in the HACS tab (no HA restart needed). I also added the automation example to the README file, enjoy
@azogue I just wanted to thank you for this integration. The 5 seconds default made things like the Hue Smart Button almost useless. But what do you mean with short intervals can hurt the bridge? I’ve set it to 1sec and it works fine.
The 5 seconds default made things like the Hue Smart Button almost useless. But what do you mean with short intervals can hurt the bridge? I’ve set it to 1sec and it works fine.
Not hurt it physically, but those Hue hubs are famous for being not very powerful, and most of the people have A LOT of apps connected to the hub (so that means a lot of requests to the hub).
So, in some cases (not all, and not for sure), the hub fails when it’s being called with a high freq, like each 1s. But if it works for you, go on! the hub is not going to burn or anything else
HA has a (very)conservative approach with this (and it’s perfectly understandable, given the full context), and because of that, the CC exists
In my personal case, I’ve worked for years with a 2s freq, and sometimes with 1s, without any big problem (just some error logs when using 1s, occasionally), but for others, it tends to get messy with short update intervals…
I installed the mod from HACs. Set my refresh to 1 second and then restarted home assistant but it is still using 5 second polling. All displays in the home assistant menu show 1 second. Restarted multiple times.
I’m rather new at HA and installed you add on as described, so I have your integration showing under “Integrations” - got the frequency set to 1s, but my lights are still reporting slow.
Am I missing something - do I need to do any further steps to get this working?
I see some of the other guys talking about an Automation setup as well?