Filter platform errors after update to 2024.10

Not sure what this means…but I have errors after updating to 2024.10:

We have generated statistics for ‘Recycle Bin Distance Avg’ (sensor.recycle_bin_distance_avg) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.

Statistics cannot be generated until this entity has a supported state class.

Do you want to permanently delete the long term statistics of sensor.recycle_bin_distance_avg from your database?

These are filter-sensors which perform an average of a template value:


# Rolling average to smooth values
sensor:
  - platform: filter
    name: "Trash Can Distance Avg"
    entity_id: sensor.trash_can_relative_distance
    filters:
      - filter: outlier
        window_size: 10
        radius: 5.0
      - filter: time_simple_moving_average
        window_size: "00:10"
        precision: 1

  # Rolling average to smooth values
  - platform: filter
    name: "Recycle Bin Distance Avg"
    entity_id: sensor.recycle_bin_relative_distance
    filters:
      - filter: outlier
        window_size: 10
        radius: 5.0
      - filter: time_simple_moving_average
        window_size: "00:10"
        precision: 1

template:
  - sensor:
     # Calculate difference between the two iBeacon entities
      - name: Trash Can Relative Distance
        unit_of_measurement: ft
        state: >-
          {% set ref_dist = states('sensor.cans_ref_estimated_distance') | int('unavailable') %}
          {% set can_dist = states('sensor.trash_can_estimated_distance') | int('unavailable') %}
          {% set valid = ref_dist != 'unavailable' and cans_dist != 'unavailable' %}
          {% if valid %}
            {{ can_dist - ref_dist + 2 }}
          {% else %}
            unknown
          {% endif %}

     # Calculate difference between the two iBeacon entities
      - name: Recycle Bin Relative Distance
        unit_of_measurement: ft
        state: >-
          {% set ref_dist = states('sensor.cans_ref_estimated_distance') | int('unavailable') %}
          {% set can_dist = states('sensor.recycle_bin_estimated_distance') | int('unavailable') %}
          {% set valid = ref_dist != 'unavailable' and cans_dist != 'unavailable' %}
          {% if valid %}
            {{ can_dist - ref_dist + 2 }}
          {% else %}
            unknown
          {% endif %}

None of those sensors have a state_class defined so will never have generated LTS. Go to Developer Tools → Statistics and use the FIX ISSUE buttons. If the sensors had a state_class in the past then the LTS generated during that time will be deleted.

OMG…there appears to be hundreds of things there now I see with that same notice.

Is there any way to bulk-click fix?

FWIW I only keep about 2-3 weeks of history at all anyway, mostly for debugging issues.

Looks like the 2 in question tho only have info not a fix button.

I am having that same repair issue raised, but my entity in question is a sensor group helper called sensor.inside_temperature_sensors. Inside that group helper are 3 other sensor group helpers. Sensor.Basement_temp_sensors, sensor.Upstairs_temp_sensors and sensor.Downstairs_temp_sensors.

Those 3 display fine and let me set F as the unit of measurement. The inside temp sensors does not let me set the unit of measurement, and shows up as numbers instead of a line graph like the others.

So it may be that nested sensor group helpers don’t have a state class but a non-nested one does?

You have six fix issue buttons. None of the others in the list have them.

That’s scrolled way down…but I’m slowly clicking thru.

The ones mentioned in my original issue are info tho, not fix

OK - so an update…I have no idea why but the ones with info I couldn’t hit delete, they never went away. Finally did a system reboot (not just HA) and magically all the issues self-resolved.

The drawback is that you’re entitled to click upon “Fix Issue” while the popup window which appears doesn’t allow you to either use the cursor keys nor simply hitting Enter to do the trick.

Which makes it a real pain, since yes, I also got some 50 items to be fixed which means 100 mousclicks and cursor moovement.

From the usability of the GUI 1 out of 5 stars … one of the major issues HA still comes along despite all improovements so far.

1 Like

It really does seem like it should be an option under a check-all-the-rows and then one button

I can use the tab key in the developer tools statistic tab. So I just klick fix issue then tab tab (or tab once depending on the options) and then space bar to confirm…

Hi!
I have the same problem. Hundred of entities with the warning, and afaik none of them had the state_class. It’s possible to recover the long term statistics of this entities?