Binary sensor mqtt never pass "ON" on HA

Hi,

My binary sensors never pass “ON” on HA any idea why?

binary_sensor 3:
  platform: mqtt
  state_topic: "Etat/S_CH_Rel3_PompeECS"
  name: "PompeECS"
  qos: 0
  payload_on: "1"
  payload_off: "0"
  sensor_class: heat
  value_template: '{{ value.x }}'

raspberrypi:~ $ mosquitto_sub -h localhost -t "Etat/S_CH_Rel3_PompeECS"
0
0
1
1
1

I tried with “ON” “OFF” too but the sensor never pass “ON” on HA :frowning:

You don’t need value_template. According to your output you don’t have to extract the value from the payload.

tnx. that solved my problem, too. i wish that would have been clearer i the documetation.

Well, we are always open for suggestions to improve the documentation. So far it seems that it doesn’t need further clarification even if we are talking a lot about payload in the docs.