No longer has a state class

Hi,

After installing the new version, I got these repairs :

image

I have these in my templates :

`- sensor:
    - name: Energy Solar Panel 1
      state: "{{ ((states('sensor.solar_panel_energy_counter_1') | float(0)) + (states('input_number.number_solar_panel_1') | float(0))) | round(1) }}"
      unit_of_measurement: "kWh"
    - name: Energy Solar Panel 2
      state: "{{ ((states('sensor.solar_panel_energy_counter_2') | float(0)) + (states('input_number.number_solar_panel_2') | float(0))) | round(1) }}"
      unit_of_measurement: "kWh"
    - name: Energy Solar Panel 3
      state: "{{ ((states('sensor.solar_panel_energy_counter_3') | float(0)) + (states('input_number.number_solar_panel_3') | float(0))) | round(1) }}"
      unit_of_measurement: "kWh"
    - name: Energy Solar Panels
      state: "{{ (states('sensor.energy_solar_panel_1') | float(0) + states('sensor.energy_solar_panel_2') | float(0) + states('sensor.energy_solar_panel_3') | float(0)) | round(1) }}"
      unit_of_measurement: "kWh"
`

image

Even after clicking “delete” the error still appears…what should I do, because that’s not clear for me…

Thank you !

State_class: measurement

Have you tried adding in the state class like above? It’ll be measurement or total_increasing .

There’s a typo in the example spiro gave, it state_class should start with a lowercase s and it should most likely be total_increasing in your examples.

If you click delete (which would be a shame, as you might lose history) the message stays because you still have no state class. It is saying it isn’t recording long term data now for you because of it. It likely hasn’t been since you created the templates.

What are the input helpers for in your templates?

1 Like

Reminds me of the time a priest a minister and a rabbit show up to give blood. The rabbit thought he was Type O.

It took me way to long to get it :slight_smile: