If anyone is feeling particularly enterprising and would like to help me out with some experimenting and testing, the
hue-sensors branch of my home-assistant fork on GitHub now contains an async implementation of Hue sensors and binary sensors in Home Assistant based on my work on aiohue.
The implementation currently supports all Hue sensors and binary sensors (including CLIP sensors/binary sensors and the Daylight binary sensor) and implements remotes (the Hue Tap and Hue Dimmer) as sensors that reset their state. I suspect when I raise this as a PR the feedback will be to implement the remotes as events, but I’ve seen components do it both ways and I kind of like the visibility and ease of use that a sensor provides to the user after playing around with it while coding this.
Here’s some steps to try it out, though unless you’re comfortable with and understand what’s going on in the following commands, I wouldn’t really suggest trying it. You’ll need to stop your existing running HASS instance if one is running.
cd /into/empty/directory git clone https://github.com/marthoc/home-assistant python3 -m venv home-assistant cd home-assistant git checkout hue-sensors source bin/activate script/setup.py hass -c /empty/directory/so/as/not/to/muck/up/your/existing/config
Then, you’ll need to navigate to the HASS GUI and configure your Hue bridge under Configuration - Integrations. All lights, sensors, binary sensors, and remotes should get automatically pulled in to HASS.
@robmarkcole Sorry for leapfrogging you on this but it looks like you’ve got other projects on the go and I had the aiohue library in my head already from working on it. Happy for you to try it out and provide feedback/suggestions for improvement before I raise this as a PR!