I am trying to set up a door contact with RTL_433 protocol in lovelace. Unfortunately that doesn’t work for me.
With Node-Red I can evaluate the state of the sensor. When receiving a signal I send an e-mail with the status of a door (open/closed)
I would also like to display the sensor on lovelace with the status of the door.
The sensor in question is:
Amazon door contact
I get the following messages about Mqqt events:
Nachricht 2728 empfangen auf rtl_433/Generic-Remote/54164/0/cmd um 11:19:
14
With mqtt-explorer:
My configuration currently looks like this:
/config/my_binary_sensor.yaml
- platform: mqtt
state_topic: rtl_433/Generic-Remote/54164/0/cmd
name: Haustuer
unique_id: 54164
device_class: door
value_template: "{{ 'ON' if value_json.cmd == '14' else 'OFF' }}"
payload_on: "14"
payload_off: "10"
In lovelace it looks like this, the senor “Haustuer is unknown”:
I’ve played around with the code a lot, but I can’t get the sensor activated under lovelace. Can someone help me?