Yes you can override SCAN_INTERVAL. That topic came up in this thread before so a browse should answer your query.
Cheers
Thanks! I found your reply in Tutorial adding HUE Motion sensor (Lux,Temp and Motion) if that’s what you meant, but you’re saying the scan_interval isn’t even used with REST (unless I’m misunderstanding what you’re saying)?
It is used, default 1 second. You can override default. Cheers
Sorry, I can’t seem to get values < 1 working. As you wrote yourself:
I set scan_interval = 0.5 and appears to make no difference. I also removed scan_interval and that made no difference. Therefore I conclude that scan_interval is not required
I’m confused now, how should that work?
Sorry my memory on this is hazy. Perhaps the minimum scan interval is 1 second, but I’m just speculating.
Cheers
OK if you are feeling brave, the dev branch is updated to use phue for API polling and has a scan_interval of 0.1, so in my (very limited) testing is very fast. Please note the change in config. Please don’t complain as this change brings the sensor component in line with the lights component. Cheers
https://github.com/robmarkcole/Hue-sensors-HASS/tree/dev-phue
I have updated to .60 and added the latest hue_sensor.py to my custom_components/sensors folder. I don’t get any errors but I also no longer have the remote in HA. I think I have updated the configuration.yaml file correctly, since my lights are working. I changed the sensor entry to platform: hue_sensor. What else should I look for?
So I tried the dev version and it complained about a missing services.yaml file so I just added a blank file to the custom_components folder. Works now but the hue_sensor.py did not???
HI,
Im learning here, so please forgive if I ask a silly question:
I am reading the Hue configuration through your hue_sensor(s).py and it is working just fine,( thank you!).
At the same time, ive payed around bit with the Hue api caller, and created some Rest_sensors myself, following Hue instructions and this info: https://nickyb2.tweakblogs.net/blog/14037/home-assistant-philips-hue-motion-sensor.
Ive even created the virtual sensor, thats takes 5 min to re-state instead of the real sensor doing 30 seconds.
These sensors work fine too.
Is there any significant difference between the 2 techniques, besides being automatic versus hand made? Would there be any advantage or special use for one or the other technique?
Here’s what the raw sensors read:
I do have a formatting question: as you can see the trigger time is displayed rather unhandy. How would i have to change the sensor for it to read h:m:s:, d:m:y?
Cheers,
Marius
Hi @zarthan it is impossible to debug your specific issue without any logs. Most likely the dependency hue_sensors failed to install, and there will be an entry in your logs for that. Nevertheless sounds like you have it working now so all good.
Hi @Mariusthvdb both this custom component, and the hue lights (powered by phue) are basically glorified rest sensors/switches. Therefore you can build rest sensors that have the same functionality, but I can’t imagine any particular advantage (apart from reducing the size of your db if you only care about a subset of the sensor data).
Cheers
thanks, thought as much. keeping the code as tight as possible seems wise, though automation is a wonderful thing too
Please keep making the component better!
Cheers,
Marius
@robmarkcole is there any advantage to going the hue_sensor route? If how the component is developed going forward is changing, should I work at the hue_sensor.py integration and figure out what I need to change?
Sorry could you clarify your question? Cheers
How obscure of me. I thought you knew what I was thinking.
I used your latest dev version to get myself working again after the hue_sensor.py didn’t seem to load. The dev version follows the earlier version with a hue.py in custom_components and one in sensors while the Hue_sensor.py is a singular file in sensors. So should I go back and figure out why the hue_sensor.py version didn’t work or should I just keep using the dev version. If all future work will go into providing the component as hue_sensor.py then I should try to get it working???
awesome stuff, but I am having trouble following your install guide (I’m new to HA), I have so many questions:
If I understood correctly, I just have to create a new directory (/custom_components/sensor/
) and paste the hue_sensor.py
into it, right? No need to change anything within that file?
Note that in some cases phue.conf may be named differently, for example mine was something like phue-12412523.conf so I copied and pasted this file, then renamed to phue.conf.
what?? So I just have to rename my phue-12412523.conf to phue.conf? But I have to copy paste it beforehand? If so, where do I paste it?
To add the following group to your HA frontend, add the following to groups.yaml (obviously editing to use your sensors):
How do I add my motion sensors name, if I don’t see it in homeassistant yet? how do I find out its name?
Do I have to add my hue lights into this file as well? Becuase HA already discoverd them and they’re working fine. I just need the motion sensor, don’t care in which group its in.
Please stick with the working dev version, this is getting close to submission as a component and there will be changes under the hood but no breaking changes.
Cheers
Many many thanks for your efforts.
HI,
Please let me get back on this automation… it doesn’t work as expected…
I’ve renamed a sensor and changed the rest sensors accordingly. They show fine.
The sensors created through your customcompnent though don’t update, and still show with their old name. Of course that is incorrect (i have no idea why they show up, and where, they are created…), so they show ‘-’.
Ive deleted the cache already, and even have the philips hue be discovered again (had Hue excluded from discovery).
What should i try t get them back in order again please ?
Old and incorrect ones:
Should be here (compare with my posting above):
And the rest sensors created manually:
As you can see i moved the sensor from the auditorium to the corridor;-)
Hope you have a clue, and suggestion,
Marius