Hi everyone!
I recently migrated all of my Zigbee devices to the HA Yellow radio with ZHA. For a couple of reasons, I was previously using the Yellow radio with Zigbee2MQTT and had a couple of “incompatible devices” paired to a Sonoff Zigbee Bridge Pro (flashed with Tasmota) connected to HA through ZHA.
I tried to migrate all the devices to the Yellow’s radio + ZHA but there is one device that won’t play nice with the Yellow’s radio, but it worked fine with the ZBBridge (it’s a Philips Hue Filament Bulb that I already had exchanged because it was giving some issues, but now I assume it is just incompatible with the Yellow radio).
So, I set the ZBBridge to connect to my MQTT server, I paired the light and I’m seeing the MQTT messages but I’m not able to make it into a fully working Home Assistant device/entity. I’m not used to this level of complexity with MQTT devices, I only configured a couple of Sonoff switches before, but this requires some extra digging.
This is my current MQTT config:
light:
- name: "Globe Light"
command_topic: "cmnd/ZBBridgePro/ZbSend"
payload_on: '{"device":"0xEB8C","send":{"Power": 1}}'
payload_off: '{"device":"0xEB8C","send":{"Power": 0}}'
state_topic: "tele/ZBBridgePro/SENSOR"
state_value_template: '{{ trigger.payload_json["ZbReceived"]["0xEB8C"]["Dimmer"] }}'
brightness_scale: 254
brightness_command_topic: "cmnd/ZBBridgePro/ZbSend"
brightness_command_template: '{"Device":"0xEB8C", "Send": {"Dimmer": {{ value }} } }'
# availability_topic: "tele/ZBBridgePro/LWT"
# payload_available: "Online"
# payload_not_available: "Offline"
optimistic: false
qos: 0
I started by copying lines from this post and I think I need help with the state_value_template.
These are the messages received by the MQTT server when the light turns on:
{"ZbReceived":{"Globe_Light":{"Device":"0xEB8C","Name":"Globe_Light","Power":1,"Endpoint":11,"LinkQuality":167}}}
And off:
{"ZbReceived":{"Globe_Light":{"Device":"0xEB8C","Name":"Globe_Light","Power":0,"Endpoint":11,"LinkQuality":167}}}
The current situation is: I can send brightness changes from HA and the lights responds normally, but the entity’s state shows up as “unknown” and I cannot send on/off commands from the HA entity.
I can send these commands with 0 or 1 from the MQTT settings and the light turns on or off, but the entity doesn’t get the updates:
{"Device":"Globe_Light","Send":{"Power":0}}
Any help is appreciated I would like to see some examples of how this should be set up.
Thanks,
Rodrigo