I have configured a server and gateway in my house to make the LORA-MQTT-HA communication and everything works properly , my problem comes as I try to install a Door Binary sensor which appears to me with the status of “unknown” I sure have an error in the configuration.yaml, I leave the payload that emits in sensor as well as the current configuration I need help
#MQTT sensor configuration
7 messages · Page 1 of 1 (latest)
mqtt:
binary_sensor:
- name: "État de la porte du garage"
state_topic: "xyz"
value_template: "{{ 'on' if value_json['decoded']['payload']['DOOR_OPEN_STATUS'] == 1 else 'off' }}"
device_class: door
payload_on: "on"
payload_off: "off"
device:
identifiers: "lorawan_door"
manufacturer: "Dragino"
name: "LDS02"
hard to say without proper formatting and without knowing what the MQTT payload really is
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
This is the decoder
...mqtt:
binary_sensor:
- name: "État de la porte du garage"
state_topic: "helium/xyz/rx"
value_template: "{{ 'on' if value_json.decoded.payload.DOOR_OPEN_STATUS == 1 else 'off' }}"
device_class: door
payload_on: "on"
payload_off: "off"
device:
identifiers: "lorawan_door"
manufacturer: "Dragino"
name: "LDS02"...
In MQTT EXPLORER :