I bought Aqara DJT11LM vibration sensor and I need to create an automation that sends a message when the sensor is activated based on the type of event. In this regard I created a binary sensor in configuration.yaml to manage everything but unfortunately it doesn’t work. Can someone help me?
I have Home Assistant 0.96.5 and the configuration is as follows:
In configuration.yaml:
sensor:
- platform: "mqtt"
state_topic: "zigbee2mqtt/0x00158d0009c3c80e"
availability_topic: "zigbee2mqtt/bridge/state"
icon: "mdi:gesture-double-tap"
value_template: "{{ value_json.action }}"
- platform: "mqtt"
state_topic: "zigbee2mqtt/0x00158d0009c3c80e"
availability_topic: "zigbee2mqtt/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- platform: "mqtt"
state_topic: "zigbee2mqtt/0x00158d0009c3c80e"
availability_topic: "zigbee2mqtt/bridge/state"
unit_of_measurement: "-"
value_template: "{{ value_json.linkquality }}"
binary_sensor:
- platform: mqtt
state_topic: "zigbee2mqtt/0x00158d0009c3c80e"
name: "vibrante"
payload_on: "ON"
In automations.yaml:
- alias: Rileva vibrazione
trigger:
platform: event
event_type: xiaomi_aqara.movement
event_data:
entity_id: binary_sensor.vibrante
movement_type: vibrate
action:
service: notify.telegram
data:
message: Vibrazione
I think the problem lies in the binary sensor.
In the home assistant log file I see the error:
No matching payload found for entity: ***** with state_topic: zigbee2mqtt/0x00158d0009c3c80e