Hi All,
I have some rest sensors collecting weather data from the API of the local weather website. Unfortunately, the long-term statistics are not kept after the automatic purge. Yesterday, I figured out they didn’t have the state_class, so I added it for each of them, but the night automatic purge removed the data from the recorder, and the long-term statistics are still not kept.
Sensor example:
sensor:
- name: "Temperature Piastów"
value_template: "{{ value_json['data']['temperature']['current'] | round(2) }}"
state_class: measurement
device_class: temperature
unit_of_measurement: "°C"
unique_id: restful_temperature_piastow
The sensors are on the statistics card, but the history graph does not show data older than 10 days. The zigbee2mqtt sensor’s long-term statistics are normally visible in the history graphs.