I have a number of DHT22 sensors on some NodeMCU’s around my house. I calibrated them and then fixed the offset in Home Assistant using a value_template. It works well however whenever the NodeMCU goes unavailable for some reason the value_template offset gets calculated wrong. Normally, it just adds the offset to the sensor value and everything is great, but when it is unavailable the value_template just reports the offset itself.
Has anyone experienced this, is this how it is supposed to function or am I doing something wrong?