Hi,
I have an issue with HA updating if the sensor becomes disconnected, HA shows the last value recorded and does not change or alert there is no data,
Console shows that the MQTT is not transmitting sensor data when disconnected.
14:09:32 MQT: tele/sonoff20/SENSOR = {“Time”:“2019-10-07T14:09:32”,“Switch3”:“ON”,“Switch4”:“ON”
and connected
14:15:35 MQT: tele/sonoff20/SENSOR = {“Time”:“2019-10-07T14:15:35”,“Switch3”:“ON”,“Switch4”:“ON”,“DS18B20”:{“Temperature”:21.9},“TempUnit”:“C”}
For my test I used a DS18B20 on a nodemcu configured as generic 18.
My YAML entry as follows
- platform: mqtt
state_topic: ‘tele/sonoff20/SENSOR’
name: ‘TEST TEMPERATURE’
unit_of_measurement: ‘°C’
value_template: ‘{{ value_json[“DS18B20”][“Temperature”] }}’
payload_available: “online”
payload_not_available: “offline”
scan_interval: 20
force_update: true
As you can see I have tried scan_interval and force_update but output is the same?
Regards,