elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sensor.xxxx_last_restart has device class None, state class total_increasing since 2023.2.x

alvinchen1 opened this issue · comments

Hello! Looks like there are some recent changes where state class, device class and state are stricter. Since 2023.2.x getting a new
Core Log Warning:

Sensor sensor.xxxx_last_restart has device class None, state class total_increasing and unit None thus indicating it has a numeric value; however, it has the non-numeric value: 2023-01-23 19:58:26 (<class 'datetime.datetime'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Device:

image

Looks like line 849 in https://github.com/elad-bar/ha-edgeos/blob/master/custom_components/edgeos/component/managers/home_assistant.py

state_class=SensorStateClass.TOTAL_INCREASING

Might need to be dropped?

released new version with fix for it, v2.0.25, pls check and let me know if works for you

thanks

Don't see the error anymore. Thanks!