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

Wrong state class for flow_rate sensors #134

Closed
rhammen opened this issue Sep 19, 2023 · 4 comments
Closed

Wrong state class for flow_rate sensors #134

rhammen opened this issue Sep 19, 2023 · 4 comments

Comments

@rhammen
Copy link
Contributor

rhammen commented Sep 19, 2023

After updating to Preview 2023.09.19:

2023-09-20 00:10:57.817 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.luxtronik2 entity: sensor.luxtronik2_heat_amount_flow_rate
2023-09-20 00:10:57.818 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.luxtronik2_heat_amount_flow_rate (<class 'custom_components.luxtronik2.sensor.LuxtronikSensorEntity'>) is using state class 'measurement' which is impossible considering device class ('water') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

2023-09-20 00:10:57.825 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.luxtronik2 entity: sensor.luxtronik2_heat_source_flow_rate
2023-09-20 00:10:57.826 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.luxtronik2_heat_source_flow_rate (<class 'custom_components.luxtronik2.sensor.LuxtronikSensorEntity'>) is using state class 'measurement' which is impossible considering device class ('water') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

@rhammen
Copy link
Contributor Author

rhammen commented Sep 19, 2023

The flow-rate sensors have also problems with their unit:

2023-09-20 00:10:58.308 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.luxtronik2_heat_amount_flow_rate (<class 'custom_components.luxtronik2.sensor.LuxtronikSensorEntity'>) is using native unit of measurement 'l/h' which is not a valid unit for the device class ('water') it is using; expected one of ['ft³', 'CCF', 'L', 'm³', 'gal']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
2023-09-20 00:10:58.312 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.luxtronik2_heat_source_flow_rate (<class 'custom_components.luxtronik2.sensor.LuxtronikSensorEntity'>) is using native unit of measurement 'l/h' which is not a valid unit for the device class ('water') it is using; expected one of ['ft³', 'CCF', 'L', 'm³', 'gal']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

@Kars-de-Jong
Copy link
Contributor

SensorDeviceClass.WATER is not correct. It is meant for water consumption meters. There is no predefined device class for flow at the moment. Just leave it out, it is not mandatory.

BenPru added a commit that referenced this issue Sep 20, 2023
* Fix wrong SensorDeviceClass in C0155_HEAT_AMOUNT_FLOW_RATE and C0173_HEAT_SOURCE_FLOW_RATE #134
@BenPru
Copy link
Owner

BenPru commented Sep 27, 2023

Is this fixed?

@rhammen
Copy link
Contributor Author

rhammen commented Oct 11, 2023

With the update, I did not see these errors any more.

@rhammen rhammen closed this as completed Oct 11, 2023
@BenPru BenPru reopened this Oct 11, 2023
@BenPru BenPru closed this as completed Oct 11, 2023
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