Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity state class warnings #20

Open
johanschelin opened this issue Sep 21, 2023 · 9 comments
Open

Entity state class warnings #20

johanschelin opened this issue Sep 21, 2023 · 9 comments

Comments

@johanschelin
Copy link

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:500
Integration: Sensor (documentation, issues)
First occurred: 18:57:56 (3 occurrences)
Last logged: 19:12:03

Entity sensor.p1ib_telegram_received (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

Entity sensor.p1ib_reactive_energy_export_q3_q4 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

Entity sensor.p1ib_reactive_energy_import_q1_q2 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) 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/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

@johanschelin
Copy link
Author

And also this

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:661
Integration: Sensor (documentation, issues)
First occurred: 19:12:03 (10 occurrences)
Last logged: 19:12:03

Entity sensor.p1ib_reactive_power_minus_l1 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVAr' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; 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+mqtt%22

Entity sensor.p1ib_reactive_power_plus_l2 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVAr' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; 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+mqtt%22

Entity sensor.p1ib_reactive_power_minus_l2 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVAr' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; 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+mqtt%22

Entity sensor.p1ib_reactive_power_plus_l3 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVAr' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; 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+mqtt%22

Entity sensor.p1ib_reactive_power_minus_l3 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVAr' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; 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+mqtt%22

@remne
Copy link
Owner

remne commented Sep 22, 2023

For kVar, It must been added recently (I havent updated my home assistant to latest). Thanks for notifying this. Unit 'var' (or reactive power) have not been available previously.
Will update unit in next-coming dev firmware.

BR,
Andreas

@remne
Copy link
Owner

remne commented Sep 22, 2023

I will wait to fix this issue with reactive power, as the unit available/recently added is only "var" (and should be spelled "VAr"), and not kVAr, which is the values that is transmitted from our power meters . kVArh (for reachtive energy) is not either added yet, which is very strange.

However I have fixed the first three issues regarding telegram sensor and reactive energy sensor state classes.

BR,
Andreas

@remne
Copy link
Owner

remne commented Sep 22, 2023

Delivered in development firmware 9c2ad9a (20230922).

BR,
Andreas

@ivik
Copy link

ivik commented Jan 16, 2024

Hi guys

Besides the errors above I have also found these:

2024-01-16 22:07:17.062 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.p1ib_reactive_energy_import_q1_q2 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVArh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'GJ', 'kWh', 'Wh', 'MJ']; 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+mqtt%22

2024-01-16 22:07:17.065 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.p1ib_reactive_energy_export_q3_q4 (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kVArh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'GJ', 'kWh', 'Wh', 'MJ']; 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+mqtt%22

@remne
Copy link
Owner

remne commented Jan 16, 2024

Hi,
These log entries are already in the post above, which is the reason for my comment on not fixing them until the correct and proper unit exists in home assistant :).

Please read post :
#20 (comment)

I will wait to fix this issue with reactive power, as the unit available/recently added is only "var" (and should be spelled "VAr"), and not kVAr, which is the values that is transmitted from our power meters . kVArh (for reactive energy) is not either added yet, which is very strange.

However I have fixed the first three issues regarding telegram sensor and reactive energy sensor state classes.

BR, Andreas

@remne
Copy link
Owner

remne commented Jan 16, 2024

I actually started to do a fork and fixed the issue in HA, but then I didnt have time for a pull request and everything around that. But will have to take care of it at some point as it seems no one else is doing it.

diff:
home-assistant/core@dev...remne:core:dev

@remne
Copy link
Owner

remne commented Jan 16, 2024

...and I just realized I actually put the unit kVArh in the wrong place... oh well, some day... :)

@ivik
Copy link

ivik commented Jan 16, 2024

Sorry, I was looking for this: ['MWh', 'GJ', 'kWh', 'Wh', 'MJ'] in the above messages.
And could not see it and thought to add it, but if you already know about it and working on a fix then great.

Thx for a quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants