Discard unavailable state

Hi,

I have a 1-Wire sensor that sometimes sends an unavailable status even though it’s reachable. Unfortunately, this is due to my inverter, which then sends a fault to the 1-Wire bus. It doesn’t bother me, as this only happens every 20-30 times and the temperature value is fairly static. Can ESPHome be configured so that when the value is unavailable, it either sends the last value or simply discards it?

sensor:
  - platform: dallas_temp
    address: 0x11e516be0164ff28
    name: "Pooltemperatur"
    update_interval: 5s

Thanks
Bjoern

Try to add:

    filters:
      - filter_out: NAN