I have two esphome devices. One is a temperature sensor:
sensor:
- platform: dallas_temp
id: kitchen_temperature
name: "Kitchen temperature"
icon: mdi:thermometer
address: 0x5000000054860a28
force_update: true
update_interval: 10s
The second device has a thermostat that uses that temperature value. I want it to detect if it hasn’t received an update for a long time, so I have a timer script that decrements the value of a variable every second, and every time the sensor receives a value it is supposed to reset that variable:
sensor:
- platform: homeassistant
name: "CH Temperature"
id: temperature
entity_id: sensor.temp_sensor_kitchen_temperature
on_raw_value:
- logger.log: "Got temperature value"
- globals.set:
id: _sensor_timeout
value: "20"
- if:
condition:
switch.is_off: controller
then:
switch.turn_on: controller
The problem is that this sensor doesn’t receive unchanged values.
The sensor in homeassistant is correctly updating every 10s, even if unchanged, but those no-change updates aren’t getting passed on to the second device, so the time times-out.