Throttle filter issue when no data is received

I have a smartmeter and using the DSMR component I retrieve its data. My meter is sending the data every 10 seconds which causes a huge database, so I throttled it down to every minute using:

  - platform: filter
    name: "filtered_power_consumption"
    entity_id: sensor.power_consumption
    filters:
      - filter: throttle
        window_size: 6

Now this works, but during the day when my solar production gets high enough I see no power consumption from my meter (of course).
This seem to cause that my window filtered_power_consumption is not receiving any new values and as a result it is not updating its value to zero. It is just stuck at some latest value.
As an example my current values:

sensor.power_consumption 0.0
sensor.filtered_power_consumption 1.07

Any solutions? Thanks.

Answering my own question…
I have changed this to a time_throttle. As this looks more relevant in this specific situation.

  - platform: filter
    name: "filtered_power_consumption"
    entity_id: sensor.power_consumption
    filters:
      - filter: time_throttle
        window_size: 00:01

Hey Patrick, did that really solve your issue? It does not for me.

Same scenario: I’m measuring power over MQTT and get ~2 values per second where one every 60sec would be fine. But if the sensor goes to 0 and then stops updating, the sensor remains at the last update inside the window (as is indicated in the documentation) and you cannot force an update.

Wow, it’s been 3 years ago…
As I read back this topic I think the code I posted handles only the throttling of the incoming values. Not fixing my problem with the value being stuck at the last value.
PS Over the years I’ve migrated to mariadb which drastically improved performance and I see that I have removed this throtthling nowadays.

Thanks - I thought so. I think the filter sensors need some love, ESPHome is way better there…