Is needs some help understanding what to do where as I remember this was a pita before and may break up my current (correct) readings and/or sensors.
I have a group:
With 2 sensors:
And now since 2024.6.2 this error:
I tried to set the state_class for the one with “total” now like this in esphome:
energy_production_day:
name: "${esp_name} - Today Gen"
state_class: total_increasing
# state_class new since 11-6-2024
id: todaygen
filters:
lambda: |-
auto sunrise = id(sun_sun).sunrise(-0.833);
auto time = id(homeassistant_time).now();
if(sunrise.has_value() && time.is_valid()){
if((sunrise.value().hour * 60 + sunrise.value().minute + ${shift_sunrise}) < (time.hour*60+time.minute) && (time.hour*60+time.minute) < 1439) {
if(String(id(todaygen).state) == "nan") return 0;
else return x;
}
else return 0;
}
else return 0;
But is keeps being state_class: total
, also after reloading esphome…
What is best to change where so everything is in order?
I think the group is suddenly the issue after update to 2024.6.2…
I think my question is now how and where to set the state class on a group? - Without going back to yaml.