I found a solution to make a light (in my case a Neopixel led strip) available in the Philips Hue app, appearing as a normal full-colour light.
It seems not possible to create an entity in Home Assistant somehow that (via the ZHA Zigbee inerface) emulates a Hue-compatible bulb, other than create a complete Hue Hub replacement with an Raspberry-Pi. But I wanted to stick to the Hue hub I have.
I first coupled a Hue-compatible bulb (in my case an IKEA Tradfri bulb) to the Hue hub. This could have been any Hue bulb, for example one borrowed from your neighbour; but at least not a bulb that you want to pair with your Hue hub later on. Then I paired the bulb with my ZHA hub (but I could have returned it to my neighbour as well).
This leaves the bulb visible in the Hue app, but with the remark “Not reachable/Niet bereikbaar”. However, I can fully control it. In Home Assistant, it was listed as
light.extended_color_light_1_2
.Then, I create an automation:
alias: Glow follower
description: ''
trigger:
- platform: state
entity_id: light.extended_color_light_1_2
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: light.extended_color_light_1_2
state: 'off'
sequence:
- service: light.turn_off
target:
entity_id: light.neopixel_light_2
default:
- service: light.turn_on
target:
entity_id: light.neopixel_light_2
data_template:
brightness: '{{ state_attr(''light.extended_color_light_1_2'',''brightness'') }} '
rgb_color: '{{ state_attr(''light.extended_color_light_1_2'',''rgb_color'') }} '
mode: single
The light I control with it is in this case light.neopixel_light_2
, an entity created with ESPHome.
The result is a bulb in the Hue app, that can be part of any scene there, and a physical light that responds perfectly.
Two drawbacks so far:
- The test “Niet bereikbaar” in the Hue app is not so elegant for a light that just works fine.
- The response is a bit slower than for a regular Hue light, since there is some indirect communication.
If someone else has a different, maybe better implementation, please share. I would also be happy to learn how I can create a Blueprint out of this, to make it easier to deploy for others.