-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Add Water device class to Overkiz #87139
Add Water device class to Overkiz #87139
Conversation
Hey there @iMicknl, @vlebourl, @nyroDev, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find!
@@ -92,7 +92,7 @@ class OverkizSensorDescription(SensorEntityDescription): | |||
name="Water volume estimation at 40 °C", | |||
icon="mdi:water", | |||
native_unit_of_measurement=UnitOfVolume.LITERS, | |||
device_class=SensorDeviceClass.VOLUME, | |||
device_class=SensorDeviceClass.WATER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about this one.
WATER
device class relates to water meters - not to a volume in a tank.
Edit: if it really is a consumption/water meter then the state class also needs to be adjusted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, this actually is a volume, not the consumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the end user, it’s look like we can read it as a comsumption device: #83736
@MassimoL06 Can you confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think he has the other sensor device? Or am I missing something.
@@ -101,7 +101,7 @@ class OverkizSensorDescription(SensorEntityDescription): | |||
name="Water consumption", | |||
icon="mdi:water", | |||
native_unit_of_measurement=UnitOfVolume.LITERS, | |||
device_class=SensorDeviceClass.VOLUME, | |||
device_class=SensorDeviceClass.WATER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this one is a water meter, then the state_class should be TOTAL
or TOTAL_INCREASING
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tetienne this would be a good one to check for other meters (like electricity) as well, not sure if everything is mapped correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epenet Since it was introduced, I’m confused with TOTAL and TOTAL_INCREASING. I read many time the definition, but still don’t get it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOTAL
goes up AND down
TOTAL_INCREASING
only goes up (automatically detects reset)
Meters should probably be always TOTAL_INCREASING
.
Note: for me the confusion is between TOTAL
and MEASUREMENT
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name TOTAL_INCREASING
is very confusing, we should have named it TOTAL_AUTO_RESET
or something like that.
@tetienne did you read this part too: https://developers.home-assistant.io/docs/core/entity/sensor/#how-to-choose-state_class-and-last_reset ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be that the integration is just swapping the name of the entities??
If I check the entity sensor.dhwp_actuator_water_volume_estimation_at_40_degc , this is really an "always increasing value (i.e. I have at the moment 42428 liters)
At the same time, looking at the history of sensor.dhwp_actuator_water_consumption I see values going up and done as from the chart I sent you @tetienne and this is more likely to be the estimation of remaining water at 40 degrees.
I also had a further thought on the readings of that variable and I may have found an explanation.
Problem: in my graph I see the water consumpion value float between 60 and 140 L while me heater is 65 L
My new explanation : Since my middel water temperature is around 65° it is reasonable that a 65 L heater can provide 140 L of water at 40°
Bottom line, I think the measured values are correct... there is just a swap of names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to my own DHWP, water consumption
seem to be a volume that goes down as it's "consumed" then up as it gets replenished.
In the snapshot, the steep slopes are actual hot water consumption (shower, bath, ...), the slow ones are just the water cooling down on its own inside the tank! To me this means the name of the entity is actually missleading, and should be something like available hot water
rather than water consumption
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the new device class VOLUME_STORAGE? It seems more accurate in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tetienne VOLUME_STORAGE sounds fine by me! Shall we make this change and see if we can merge this one in?
I had a closer look at both From this, I would argue that
|
Please also take a look at #88312 which adds a new device class |
Hello @vlebourl How do you create your ApexChart-Card ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I gather from the discussion, I still don't think they should be set to WATER
.
Maybe VOLUME
is good, or maybe VOLUME_STORAGE
would be better.
Either way, there still seems to be some confusion.
Is it even consistent across devices?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
@@ -92,7 +92,7 @@ class OverkizSensorDescription(SensorEntityDescription): | |||
name="Water volume estimation at 40 °C", | |||
icon="mdi:water", | |||
native_unit_of_measurement=UnitOfVolume.LITERS, | |||
device_class=SensorDeviceClass.VOLUME, | |||
device_class=SensorDeviceClass.WATER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the device class available for this right now:
device_class=SensorDeviceClass.WATER, | |
device_class=SensorDeviceClass.VOLUME_STORAGE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How that's a nice addition. Thx!
Co-authored-by: Franck Nijhof <[email protected]>
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Breaking change
Proposed change
Since the introduction of the device class water, we didn’t update the Overkiz integration to support it. It’s now the case, and found two sensors eligible.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: