Handling bad data on zwave sensors

I have four Honeywell T6 thermostats, which generally work well, but periodically the humidity sensor, and only the humidity sensor, goes to negative 124%. All four do it, and at random times (i.e. not related to any network outage or such). The temperature continues to report properly even when the humidity goes wonky.

Since Honeywell is not a company prone to helping home owners, only their HVAC contractors, I can not ask them. I suspect this is a “feature” in the current firmware (of which I think I am current but for similar reasons I do not think I can obtain).

Is there a way to automatically limit a sensor’s values so it doesn’t store garbage like this? alternative to remove it automatically? I guess I could, outside HA, write a sql script but I would really prefer to keep this internal.

I’d love an answer how to fix the thermostats, but what I am actually asking is how Home Assistant can reject bad data?

Linwood

You can create an outlier filter sensor using that as the input to remove those. If you need, you can also create a long-term average and then a second sensor that picks between the actual value and the long-term average depending on whether the actual value is too negative.

Here are two examples I have:

- platform: filter
  unique_id: behind_house_luminance
  name: "Behind House Luminance"
  entity_id: sensor.behind_house_motion_sensor_luminance
  filters:
    - filter: outlier
      window_size: 5
      radius: 50.0
    - filter: range
      upper_bound: 10000
      lower_bound: 0


# ####################
# Smooth bathroom humidity
# ####################
- platform: filter
  name: "Bathroom Humidity Average"
  unique_id: bathroom_humidity_average
  entity_id: sensor.bathroom_humidity
  filters:
    - filter: time_simple_moving_average
      window_size: "12:00:00"

Yeah, I probably should have mentioned, I’m aware of that approach. I was trying to avoid it as I THINK that the underlying sensor still sits out there, and I have a bunch of places I search out and display sensors by name, or average them together by name with wildcards.

I guess I could change the names or seek them out, but was trying to avoid the duplication (of sorts) by fixing the inbound data.

I take it that’s not possible?

That’s the only choice. You can rename the entity on the device and then use the old name for your filter.

This problem isn’t limited to Honeywell as I see impossible temperature value from Aeotec sensors every now and then. So I’ve put filters on every temperature and humidity sensor and only use those filtered values.

Thank you. Might be a nice consideration for future development (if any developers are listening), to be able to attach a filter to an integration provided sensor, like a post processing filter.

1 Like

OK, bit the bullet and set these up.

Distantly related question: I don’t see a way in YAML to set precision after a filter. Or icon, though I can put icon in customize. I actually put precision there but it does nothing.

I can set it in the UI, but I really dislike separating settings, if a sensor is defined in YAML I’d really prefer all the settings go there.