esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 35 forks source link

ESPhome not pushing "unavailable" if senosr stops working #3140

Closed slepiavka closed 2 years ago

slepiavka commented 2 years ago

The problem

I've noticed that (at least with the DHT integration), whenever ESPhome fails to connect with a sensor ("please check your wiring" error, etc), it won't publish an error within the sensor. In fact, HA will continue displaying the last valid sensor value.

This can be particularly dangerous: for example, if a DHT is used to feed a thermostat, it may stay heated forever (HA generic thermostat has no fail safe).

I do use a exponential_moving_average filter, but I think that the accurate thing for the integration to do would be to communicate the error, regardless of mathematical processing.

Which version of ESPHome has the issue?

2022.2.6

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

core-2022.3.3

What platform are you using?

ESP8266

Board

D1 Mini

Component causing the issue

DHT Temperature+Humidity Sensor

Example YAML snippet

sensor:
  - platform: dht
    pin: D0
    model: DHT22
    temperature:
      name: "Dry Box Temp"
      accuracy_decimals: 1
      filters:
        - exponential_moving_average:
            send_every: 2 
      force_update: true     
    humidity:
      name: "Dry Box Humidity"
      accuracy_decimals: 1
      filters:
        - exponential_moving_average:
            send_every: 2  
      force_update: true       
    update_interval: 10s

Anything in the logs that might be useful for us?

No response

Additional information

No response

nagyrobi commented 2 years ago

https://github.com/esphome/feature-requests/issues/1568