Negative values for power consumption once in a while

Hello !

I’m fairly new to the platform. And I enjoy it deeply.

My question is as follow. I have a couple Z-Wave thermostat that report the consumption when heating is on in watts.

My problem is that once in a while, values returned from the thermostat is -32768, which is impossible. It’s not even heating when this happens ! This values obviously messes up all my kWh sensors :frowning:

Screen Shot 2021-03-01 at 8.18.54 PM

Is there any way to prevent these negative values ?

Regards

1 Like

You can use a template sensor.
For example:

sensor:
  - platform: template
    sensors:
      e3dc_battery_power_pos_only:
        unit_of_measurement: 'W'
        value_template: >
          {% if states('sensor.e3dc_battery_power') | int > 0 %}
            {{ states('sensor.e3dc_battery_power') }} 
          {% else -%}
            0
          {% endif %}
1 Like

Or you could use a filter sensor with a range filter do define possible values.

Thank you very much gentleman.

IM going to have it rolled in an utility meter as well since I want to reset the consumption on a month basis.

What device is making that value? That’s a buffer overflow. There’s a bug somewhere in that devices firmware.

Sinope Thermostat Model # TH1123ZB

The ones that heats often does not seem to exhibit this problem. Only the ones that stay idle for a long time.

Warned the manufacturer. They gave me no promises as they have their own hub but still.

J’ai le même problème avec un thermostat que j’ai débrancher pour faire des rénovation.

Il m’a reporté un retour d’énergie de 1800 kwh. C’est vraiment un problème qui viens du manufacturier.

I have the Honeywell Z-Wave wall thermostat and I have the same issue. Every so often it reports a wildly impossible, low value. Throws off my graphs.