Home Assistant release with the issue:
None
Last working Home Assistant release (if known):
None
Operating environment (Hass.io/Docker/Windows/etc.):
Hassbian
Component/platform:
MQTT-Component / mqtt
Zigbee2mqtt
Description of problem:
To describe whats not working i would like to show first whats working:
This Automation works:
- action:
- data:
entity_id: cover.peq0005525
service: cover.close_cover
alias: Schlafzimmer - Rollladen - Click - Runter
id: '1516357577437'
condition:
condition: template
value_template: '{{ "single" == trigger.payload_json.click }}'
trigger:
platform: mqtt
topic: 'zigbee2mqtt/0x00158d00012433dc'
Zigbee2mqtt console is giving me:
Jan 23 21:29:30 hassbian npm[506]: zigbee2mqtt:info 1/23/2019, 9:29:30 PM MQTT publish: topic 'zigbee2mqtt/0x00158d00012433dc', payload '{"battery":77,"voltage":3002,"linkquality":107,"click":"single"}'
Now Whats not working:
- alias: Bewegungsmelder Flur Nachricht Telegram
trigger:
platform: mqtt
topic: 'zigbee2mqtt/0x00158d0001e0a712'
condition:
condition: template
value_template: '{{ "true" == trigger.payload_json.occupancy}}'
id: '1519914515852'
action:
- data:
message: "Bewegung im Flur erkannt"
service: notify.telegrambot
Zigbee2mqtt console is giving me:
Jan 23 21:31:50 hassbian npm[506]: zigbee2mqtt:info 1/23/2019, 9:31:50 PM MQTT publish: topic 'zigbee2mqtt/0x00158d0001e0a712', payload '{"illuminance":0,"linkquality":0,"occupancy":true,"battery":100,"voltage":3045}'
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Traceback (if applicable):
Here are two guys with the exact same issue:
https://community.home-assistant.io/t/zigbee2mqtt-getting-rid-of-your-proprietary-zigbee-bridges-xiaomi-hue-tradfri/52108/512
https://community.home-assistant.io/t/zigbee2mqtt-getting-rid-of-your-proprietary-zigbee-bridges-xiaomi-hue-tradfri/52108/790
Additional information:
I created a mqtt-sensor to check if it gets the "True" or "False" from payload:
sensor:
- platform: mqtt
name: "Payload Bewegungsmelder"
state_topic: "zigbee2mqtt/0x00158d0001e0a712"
value_template: "{{ value_json.occupancy }}"
The sensor is working and shows True and False.
Yeah I had the same problem. But just removing the "" around the true and false did it.
'{{ trigger.payload_json.occupancy == true }}'
Problem solved. Thank you
Most helpful comment
Yeah I had the same problem. But just removing the "" around the true and false did it.
'{{ trigger.payload_json.occupancy == true }}'