Hi all. I am trying to set up a generic thermostat using a filtered temperature sensor. The thermostat works fine if I configure it to use the sensor directly, but if I set target_sensor to a filter sensor, the value always shows as null. The filter sensor does show a good value on the History page. Can anyone see what I might be doing wrong in this config?
Thanks. After your reply I tried adding a unit_of_measurement line to the filter sensor, but then configuration validation fails. I think it may already be picking that up from the source sensor anyway:
Just the one from trying to add a unit of measurement (which no longer happens after I removed that line):
2019-12-20 09:30:35 ERROR (MainThread) [homeassistant.components.hassio] Invalid config for [sensor.filter]: [unit_of_measurement] is an invalid option for [sensor.filter]. Check: sensor.filter->unit_of_measurement. (See ?, line ?). Please check the docs at https://home-assistant.io/integrations/filter/
Hereās what the thermostat looks like when I set target_sensor to sensor.filtered_main_zone_temp:
Odd, looking at the code then the only path without information is a path with a valid config and a number thatās returned. Which doesnāt make sense because youāre getting null. I plan on making my own ESP temperature sensor but Itāll be a bit before I get all the materials. Until then, I donāt think I can help you out. Sorry to waste your time.
If itās not related to the unit_of_measurement, then it might be the scan interval. Itās also possible that the filter doesnāt have a state at startup when the climate is ābuiltā.
I tried all sorts of things in config. Nothing worked.
But eventually I noticed that simply ātouchingā a control on thermostat widget in Lovelace will trigger an update. (This is easily reproducible for me by setting current_temperature: null on the thermostat and refreshing the UI.)