JaccoR / hass-entso-e

Integration for Home Assistant to fetch day ahead energy prices from European countries via ENTSO-e Transparency Platform
159 stars 25 forks source link

using state class 'measurement' which is impossible considering device class ('monetary') #155

Open pabe40 opened 1 month ago

pabe40 commented 1 month ago

Hi Jacco: FYI.

Logger: homeassistant.components.sensor Source: components/sensor/init.py:570 integration: Sensor (documentation, issues) First occurred: May 19, 2024 at 10:40:52 PM (10 occurrences) Last logged: May 19, 2024 at 10:40:53 PM

Entity sensor.entso_highest_energy_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues Entity sensor.entso_average_electricity_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues Entity sensor.entso_current_percentage_of_highest_electricity_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues Entity sensor.entso_time_of_highest_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) is using state class 'measurement' which is impossible considering device class ('timestamp') it is using; expected None; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/JaccoR/hass-entso-e/issues Entity sensor.entso_time_of_lowest_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) is using state class 'measurement' which is impossible considering device class ('timestamp') it is using; expected None; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/JaccoR/hass-entso-e/issues

DutchessNicole commented 3 weeks ago

Seeing the same thing here since yesterday.

2024-06-08 10:28:17.342 DEBUG (MainThread) [custom_components.entsoe.coordinator] Fetching ENTSO-e data
2024-06-08 10:28:17.342 DEBUG (MainThread) [custom_components.entsoe.coordinator] NL
2024-06-08 10:28:18.210 DEBUG (MainThread) [custom_components.entsoe.coordinator] Finished fetching ENTSO-e coordinator data in 0.869 seconds (success: True)
2024-06-08 10:28:18.216 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_current_electricity_market_price (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.223 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_next_hour_electricity_market_price (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.229 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_lowest_energy_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.234 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_highest_energy_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.273 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_average_electricity_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.282 WARNING (MainThread) [custom_components.entsoe.sensor] Unable to update entity due to data processing error: None and error: min() iterable argument is empty
2024-06-08 10:28:18.283 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_current_percentage_of_highest_electricity_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) 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/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.294 WARNING (MainThread) [custom_components.entsoe.sensor] Unable to update entity due to data processing error: None and error: min() iterable argument is empty
2024-06-08 10:28:18.294 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_time_of_highest_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) is using state class 'measurement' which is impossible considering device class ('timestamp') it is using; expected None; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/JaccoR/hass-entso-e/issues
2024-06-08 10:28:18.303 WARNING (MainThread) [custom_components.entsoe.sensor] Unable to update entity due to data processing error: None and error: min() iterable argument is empty
2024-06-08 10:28:18.303 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.entso_time_of_lowest_price_today (<class 'custom_components.entsoe.sensor.EntsoeSensor'>) is using state class 'measurement' which is impossible considering device class ('timestamp') it is using; expected None; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/JaccoR/hass-entso-e/issues

Yesterday there was indeed no data to be had so it makes sense that the entities would be empty, but as of an hour ago the platform has filled in the missing data and we now do get the correct prices, so the entities should be properly populated again.

DutchessNicole commented 3 weeks ago

I figured out a workaround: the file config/.storage/core.restore_state contains all the old values for the entso integration. Removing all the objects that mention the current entso-e sensors while HA is stopped makes the integration work again.

It is important that HA is not running at the time, or it will reinsert your removed entities again on the next reboot.

Fidelity88 commented 3 weeks ago

It is important that HA is not running at the time, or it will reinsert your removed entities again on the next reboot.

Weird question, but how do you manage to do that? Is there a way to shutdown HA while still being able to edit files? I'm logged in through SSH but I don't see an option to shutdown HA while not shutting down the system

Edit: Ah I see, using Developer tools > Services > "Home Assistant Core Integration: Stop". Unfortunately, this workaround didn't fix my issue

Edit2: I should read better, "Removing all the objects that mention the current entso-e sensors"

This has fixed my problems. Thanks for sharing @DutchessNicole !

qwerk commented 3 weeks ago

@DutchessNicole and @Fidelity88 thanks both. this solved it for me.

DutchessNicole commented 3 weeks ago

I use SSH as well, and in the HA command line you can just issue the ha core stop command to stop the HA core container. Then you can edit the files, since SSH will still run.

wroes commented 3 weeks ago

@DutchessNicole Thanks, this fixed it for me too.

StreborStrebor commented 3 weeks ago

I use SSH as well, and in the HA command line you can just issue the ha core stop command to stop the HA core container. Then you can edit the files, since SSH will still run.

Thanks this worked for me!

A Pointer to others struggling with this:

I only needed to remove the object that is used in the graphs, which in my case was called sensor.[whatever name you use for your ensoe config]_average_electricity_price_today. It included all the old today and tomorrow prices (all nested in this object).

All other objects with sensor.[whatever name you use for your ensoe config]_* I did not remove.

After a restart ha core start the prices and graphs came back to life, almost immediately.

It would be nice if the cause of this was fixed.

ceesgeert commented 3 weeks ago

Thanks! This is an excellent procedure. Only removing the object _average_electricity_price_today and leaving all other entsoe objects intact worked for me as well.

Agree that a true fix is still required.