HandyHat / ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API
MIT License
240 stars 35 forks source link

"using state class 'total_increasing' which is impossible" Auto Config #394

Open MarkRocketman opened 8 months ago

MarkRocketman commented 8 months ago

Describe the bug Entity sensor.dcc_sourced_smart_electricity_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/HandyHat/ha-hildebrandglow-dcc/issues Entity sensor.dcc_sourced_smart_gas_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/HandyHat/ha-hildebrandglow-dcc/issues

Version 4.1.0

krzysnaw commented 8 months ago

custom_components/hildebrandglow_dcc/sensor.py Line 288 , change _attr_state_class = SensorStateClass.TOTAL_INCREASE
to
attr_state_class = SensorStateClass.TOTAL

snigehere commented 7 months ago

@krzysnaw Many thanks for posting the work around to this issue

Just to note that it was row 293 in my sensor file (version 1.0.3) .. no idea why as it was unchanged.

CodedNil commented 3 months ago

I changed this to TOTAL which fixed the error, though now the cost in the energy tab is usually negative image

I think it counts the decrease every day when it resets as 0, instead of just ignoring decreases and only managing increases which I'm assuming is why it was TOTAL_INCREASE not sure why that errors now?

GlosVaper commented 2 months ago

Hi, also getting the same error, running;

Core 2024.10.0b0 Supervisor 2024.09.1 Operating System 13.1 Frontend 20240925.0

Logger: homeassistant.components.sensor Source: components/sensor/init.py:569 integration: Sensor (documentation, issues) First occurred: 21:59:25 (2 occurrences) Last logged: 21:59:25

Entity sensor.dcc_sourced_smart_electricity_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/HandyHat/ha-hildebrandglow-dcc/issues Entity sensor.dcc_sourced_smart_gas_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/HandyHat/ha-hildebrandglow-dcc/issues

Neiphos commented 1 month ago

Also getting the same error, the fix above seems to have resolved the error being reported, thanks @krzysnaw every log entry states: DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/virtualentity... but no data seems to be coming through other than once every few hours through the day. Is it possible to see the raw json recieved through the integration?

Neiphos commented 1 month ago

Update, new error today: We have generated statistics for 'DCC Sourced smart electricity meter Usage (today)' (sensor.dcc_sourced_smart_electricity_meter_usage_today) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.

PeHin commented 1 month ago

I am also having the same issue running;

Core: 2024.10.3 Supervisor: 24.10.2 Operating System: 13.2 Frontend: 20241002.3

Logger: homeassistant.components.sensor Source: components/sensor/init.py:569 integration: Sensor (documentation, issues) First occurred: 13:30:28 (2 occurrences) Last logged: 13:30:29

Entity sensor.dcc_sourced_smart_electricity_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/HandyHat/ha-hildebrandglow-dcc/issues Entity sensor.dcc_sourced_smart_gas_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/HandyHat/ha-hildebrandglow-dcc/issues