Hello,
I need to configure on HA some Aqara vibration sensors connected to a Tasmota zbbridge.
I’m seeing that the messages sent on the MQTT topic are like:
21:12:30.115 MQT: tele/tasmota_zbbridge/SENSOR = {“ZbReceived”:{“0x6828”:{“Device”:“0x6828”,“AqaraVibrationMode”:“vibrate”,“Endpoint”:1,“LinkQuality”:97}}}
Where AqaraVibrationMode can be “vibrate”, “tilt” or “drop”
AFAIK, there’s not a message for a “normal” state (after the vibration ends): therefore I suppose that I have to automatically set a “normal” state after some (fixed) timeout.
How can I do this in configuration.yaml? Here is a sketch for the template: please can you help me to complete it?
- platform: mqtt
name: "vibration-1"
state_topic: "tele/tasmota_zbbridge/SENSOR"
value_template: '{{ value_json["ZbReceived"]["0x6828"]["AqaraVibrationMode"] }}'
payload_on: ... how to put "vibrate" "tilt" or "drop" ?
payload_off: ... how to automatically set it after timeout ?
Thanks!