I have an automation to control the flow of water into the heating coil in a Hot Water cylinder. The automation opens the valve by energising the relay in a Tasmotized Sonoff Mini when the timer is on and the temperature is below 59C. The valve also has volts free status contacts and I want to read the status of those to control the boiler. The input switch has been disassociated from the relay and if the switch changes state the Sonoff Mini sends an MQTT message e.g. tele/Mini1/SENSOR = { “Time”: “2021-12-04T12:18:51”, “Switch1”: “ON” } which is showing in MQTT Explorer. It is also received by HA and showing in the MQTT Integration Listen to a Topic utility.
My binary_sensor.yaml contains these lines:
The binary sensor is created and reports state as “closed” regardless of payload changes.
Further if I plot the binary sensor on a history graph the text in the bar shows “Closed” on a green background.
I have spent a good few hours on this but given that the MQTT payload is arriving in HA, I don’t know how else to trouble shoot this.
I have defined a sensor and a binary_sensor in Mqtt. The sensor works oke the binary_sensor doesn’ t respond to the same mqtt published mesagge. see definitions of sensors below.
Has ony one an idea???
mqtt:
Create extra on/off sensor for “easy” automation???