zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Plain text message to zigbee2mqtt/[friendly name]

Open gdave321 opened this issue 6 years ago • 1 comments

Bug Report

Plain text message to zigbee2mqtt/[friendly name]

What happened

Pressing button on Hue dimmer switch shows mqtt message NOT in json;

What did you expect to happen

According to documentation: zigbee2mqtt/[FRIENDLY_NAME] #

Where [FRIENDLY_NAME] is E.G. 0x00158d0001b79111. Message published to this topic are always in a JSON format.

How to reproduce it (minimal and precise)

Pressing any button on Hue dimmer switch

Debug Info

zigbee2mqtt version: 1.12.0 CC253X firmware version:

This is what is published via mqtt:

zigbee2mqtt/0x0017880......./action off-press zigbee2mqtt/0x0017880....... {"battery":81.5,"linkquality":26,"counter":1,"brightness":0,"update_available":true,"action":"off-press","duration":0} zigbee2mqtt/0x0017880....... {"battery":81.5,"linkquality":26,"counter":1,"brightness":0,"update_available":true,"action":""}

gdave321 avatar Mar 29 '20 10:03 gdave321

This is required for the Home Assistant MQTT triggers (https://www.zigbee2mqtt.io/integration/home_assistant.html#via-mqtt-device-trigger-recommended). Home Assistant MQTT triggers cannot handle JSON.

Koenkk avatar Mar 29 '20 14:03 Koenkk