FOR COMMUNITY SUPPORT PLEASE USE THIS THREAD
For Hue motion sensors checkout Hue-sensors-HASS
If using Home Assistant >= v0.108, please read the deprecation and suggested migration section
Custom integration for Hue & Lutron Aurora Friends of Hue (FOH) remotes with Home Assistant.
This custom integration provides the missing support for remote
devices in the official Hue integration of HA Core, by registering the platform in the main integration and sharing the sensor data with it.
As this new platform imposes a lower scan_interval
for all hue sensors (of 1Hz), sensors from the main hue integration will also increase their refresh rate to 1 Hz.
Be advised that the increased update of this custom integration may cause connectivity problems which can result in errors in the official hue integration, please do not create any issue for this. If you can't live with these errors, do not use this custom integration.
Since HA v0.108 Hue switches are recognized in the hue
integration,
making this CC not really necessary anymore, but there are some caveats,
as it is not a perfect replacement for this CC.
Now the main hue
registers the remotes as devices
, and fires events with the detected button presses.
For easier usage from UI, it also presents the button presses as device triggers
for automations.
In addition, for battery-powered remotes it generates battery sensor entities
.
The features of this CC over what the main hue offers are to:
remote
, but they actually are sensor
), showing the last button press as the state, using fixed state mappings (like code 3002 is "3_click_up", etc.)But as this CC is not using the Integrations menu, it needs manual yaml and a HA restart for any config change. It also has some problems derived of doing too many calls to the Hue bridge, and its usage for automation triggers now presents some flaws with false positives.
In this context, this CC is being deprecated, and these are some suggestions to migrate to other HACS custom integrations to achieve the best results, depending of your own specific needs:
If you need a faster polling interval for the hue bridge than the 5s, use Fast-Hue CC to:
If you want to expose the remotes as entities, because you want to track their state or use it to trigger automations, use EventSensor CC
You can use both new CCs, or none of them, if you are comfortable with the main hue polling and change your automations to use 'device triggers'.
Both are configurable via UI, so no restarts are needed to install and try them. To do the smoothest migration, with just one HA restart, follow these steps:
remote.entity_name
in your config (like in automations.yaml
) to sensor.entity_name
, as the new entities will be of sensor
type.remote.x
entities should be gone and this CC would not be loaded.remote
. Follow the wizard for Hue remotes, set the same name as before (so new entities will be sensor.entity_name
), and, as the identifier, choose "id" and set the entity_name
. At that point the migration is done, and you can check the new sensor entities by pressing buttons, and then re-enable the automations to check that everything works as before.
If the fast polling interval is required, install "Fast-Hue polling" from HACS and configure it for your needs, taking into account that, if polling too fast, some logging errors may appear in the main hue.
In that case, feel free of playing with different values to optimize your specific system, as there is a new service fasthue.set_update_interval
to do just that in any moment.
Install via HACS. You need to set up your Hue bridge first.
Alternatively, place the custom_components
folder in your configuration directory (or add its contents to an existing custom_components
folder).
Once installed add to your configuration:
remote:
- platform: hueremote
The scan interval can be modified optionally, by adding scan_interval: 2
.
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
& $ pip install -r requirements-dev.txt
$ venv/bin/py.test --cov=custom_components tests/ -vv -p no:warnings
$ venv/bin/black custom_components/*
(or setup VScode for format on save)Please format code usign Black before opening a pull request.
A big thanks to Atsuko Ito and Eugenio Panadero for their many contributions to this work!