Preserving last non-zero value for „total increment“ sensor

Hi,

I‘m having an issue with one of my power consumption sensors. The sensor is of type „total increment“ and the right total consumption is delivered.

Unfortunately the „real“ value is only delivered every 6 minutes. In between, the value provided is always 0.

Is there a possibility to preserve the last „real“ value until the next non-zero value is provided?

Thanks
Hilmar

Yes there are a couple of ways to do this. Show the configuration of your sensor.

Hi Tom,

as I’m rather new to Home Assistant, I hope I’m sharing the right information :slight_smile: .

This is the sensor configuration - it was generated automatically by the UI.

{
  "area_id": null,
  "capabilities": {
     "state_class": "total_increasing"
  },
  "config_entry_id": "b72b2232f37b7ba37f7b75bb191484b1",
  "device_class": "energy",
  "device_id": "397528fdab88f6960e1c695085e6d961",
  "disabled_by": null,
  "entity_category": null,
  "entity_id": "sensor.consumption_3",
  "hidden_by": null,
  "icon": null,
  "id": "d9ed4dc96f16a8c7bd1dcfc43155b795",
  "has_entitiy_name": false,
  "name": "Gesamtstromverbrauch Wasserenthaerter",
  "options": {},
  "original_device_class": "energy",
  "original_icon": null,
  "original_name": "Consumption 3",
  "platform": "deconz",
  "supported_features": 0,
  "unique_id": "54:ef:44:10:00:4d:e0:60-01-0702",
  "unit_of_measurement": "kWh"
}

Every 6 minutes I get a value - in between the value is always 0.