home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.16k stars 29.84k forks source link

(<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; #115009

Open Pajuris opened 5 months ago

Pajuris commented 5 months ago

The problem

Registratorius: homeassistant.components.sensor Šaltinis: components/sensor/init.py:575 integracija: Jutiklis (dokumentacija, problemos) Pirmą kartą įvyko: 11:57:24 (6 įvykiai) Paskutinį kartą prisijungė: 11:57:24

Entity sensor.suvartota_duju_per_sia_para_eurais (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22
Entity sensor.suvartota_duju_per_si_menesi_eurais (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22
Entity sensor.suvartota_vandens_per_sia_valanda_eurais (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22
Entity sensor.suvartota_vandens_per_sia_para_eurais (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22

What version of Home Assistant Core has the issue?

2024.4

What was the last working version of Home Assistant Core?

2024.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 5 months ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `sensor` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign sensor` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


sensor documentation sensor source (message by IssueLinks)

zSprawl commented 5 months ago

I'm seeing the same warning since updating today to 2024.4.2. The Utility Meter in question was created with the GUI, so I don't believe I can set total vs. total_increasing without trying to override it via a customization.

Logger: homeassistant.components.sensor Source: components/sensor/init.py:575 integration: Sensor (documentation, issues) First occurred: 9:43:03 PM (1 occurrences) Last logged: 9:43:03 PM Entity sensor.monthly_gas_bill (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total';

fherreror commented 3 months ago

Same problem here. Via YAML is it not possible to set device_class or state_class, as they are not valid option for utility meter.

tominozh commented 3 months ago

I've got the same error message in the logs. Only appeared once when I created new UtilityMeter helper through the UI. There are no options to change device class or state class.

Running HAOS:

Entity sensor.water_pump_consumption (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) is using state class 'total_increasing' which is impossible considering device class ('power') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22

Floordb commented 1 month ago

Got also this error. Running HAOS, core 2024.7.

Entity sensor.zonneplan_one_omvormer_expected_surplus (<class 'custom_components.zonneplan_one.sensor.ZonneplanPvSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/fsaris/home-assistant-zonneplan-one/issues

dajomu1 commented 2 weeks ago

I got the same error but for a Tibber sensor:

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

Entity sensor.daily_cost_with_subsidy_home (<class 'custom_components.tibber_data.sensor.TibberDataSensor'>) is using state class 'measurement' 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/Danielhiversen/home_assistant_tibber_data/issues Entity sensor.yearly_cost_Oslo_14 (<class 'custom_components.tibber_data.sensor.TibberDataSensor'>) is using state class 'measurement' 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/Danielhiversen/home_assistant_tibber_data/issues Entity sensor.yearly_consumption_Oslo_14 (<class 'custom_components.tibber_data.sensor.TibberDataSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/Danielhiversen/home_assistant_tibber_data/issues Entity sensor.monthly_consumption_compared_to_last_year_Oslo_14 (<class 'custom_components.tibber_data.sensor.TibberDataSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/Danielhiversen/home_assistant_tibber_data/issues Entity sensor.monthly_cost_with_subsidy_Oslo_14 (<class 'custom_components.tibber_data.sensor.TibberDataSensor'>) is using state class 'measurement' 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/Danielhiversen/home_assistant_tibber_data/issues

@Danielhiversen

jorishaverkort commented 1 week ago

same here (created from UI and gives errors:

Logger: homeassistant.components.sensor Source: components/sensor/init.py:569 integration: Sensor (documentation, issues) First occurred: 23:20:16 (3 occurrences) Last logged: 23:43:39

Entity sensor.energy_daily_usage_total (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) is using state class 'total_increasing' which is impossible considering device class ('power') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22 Entity sensor.energy_weekly_usage_total (<class 'homeassistant.components.utility_meter.sensor.UtilityMeterSensor'>) is using state class 'total_increasing' which is impossible considering device class ('power') it is using; expected None or one of 'measurement'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+utility_meter%22