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.
- If the state class was previously provided by an integration, this might be a bug. Please report an issue.
- If you previously set the state class yourself, please correct it. The different state classes and when to use which can be found in the developer documentation.
- If the state class has permanently been removed, you may want to delete the long term statistics of it from your database.
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 %}