Skip to content

Error in state class when device class in "Monetary" #424

Description

@AndrewKemp-1

from HA Core Log: (xx_xxxxxxxx_xxxxx_ = redacted)

2025-06-22 21:10:40.940 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.xx_xxxxxxxx_xxxxx_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

Line 302 reads "_attr_state_class = SensorStateClass.TOTAL_INCREASING"
where is should read
"_attr_state_class = SensorStateClass.TOTAL"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions