HandyHat / ha-hildebrandglow-dcc

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

sensor state class 'total_increasing' is invalid for 'monetary' values #322

Closed Achronite closed 1 year ago

Achronite commented 1 year ago

Describe the bug The sensors dcc_sourced_smart_gas_meter_cost_today and dcc_sourced_smart_electricity_meter_cost_today are incorrectly defined within HA due to incompatibility between state 'total_increasing' and device class 'monetary'. e.g. 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'

To Reproduce Restart HA, look at system logs.

Expected behaviour DCC sensors should to be defined correctly within HA to operate correctly

Screenshots From system logs (HA Core v2023.3.6) Logger: homeassistant.components.sensor Source: components/sensor/init.py:497 Integration: Sensor (documentation, issues) First occurred: 10:00:36 (2 occurrences) Last logged: 10:00:37

Version v1.0.3 HA Core v2023.3.6

Debug log Not required

Additional context Problem reported at startup of HA

HandyHat commented 1 year ago

Hey @Achronite, it looks like this is the same issue as #304. Feel free to follow that issue!

Duplicate of #304