Closed runningman84 closed 1 year ago
I have migrated my siren configuration to the new mqtt.siren format.
Unfortunately I found out that homeassistant is double quoting my json which cannot be read by zigbee2mqtt:
mqtt: siren: - name: MY Alarmsystem availability_topic: "zigbee2mqtt/corridor/downstairs/siren/availability" availability_template: "{{ value_json.state }}" payload_off: '{"warning": {"duration": 0, "mode": "stop", "strobe": false}}' payload_on: '{"warning": {"duration": 30, "mode": "emergency", "strobe": true, "strobe_level": 10, "strobe_duty_cycle": 5}}' command_topic: "zigbee2mqtt/corridor/downstairs/siren/set"
Homeassistant sends messages like this:
{"state":"{\"warning\": {\"duration\": 0, \"mode\": \"stop\", \"strobe\": false}}"}
instead of
{"warning": {"duration": 0, "mode": "stop", "strobe": false}}
2022.12.8
No response
Home Assistant Container
mqtt
siren: - name: MY Alarmsystem availability_topic: "zigbee2mqtt/corridor/downstairs/siren/availability" availability_template: "{{ value_json.state }}" payload_off: '{"warning": {"duration": 0, "mode": "stop", "strobe": false}}' payload_on: '{"warning": {"duration": 30, "mode": "emergency", "strobe": true, "strobe_level": 10, "strobe_duty_cycle": 5}}' command_topic: "zigbee2mqtt/corridor/downstairs/siren/set"
this seems to be a fix which prevent double quoting:
command_template: "{{ value }}"
The problem
I have migrated my siren configuration to the new mqtt.siren format.
Unfortunately I found out that homeassistant is double quoting my json which cannot be read by zigbee2mqtt:
Homeassistant sends messages like this:
instead of
What version of Home Assistant Core has the issue?
2022.12.8
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
mqtt
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response