-
Notifications
You must be signed in to change notification settings - Fork 91
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
feat: Expose if a device supports dhw, solar thermal or ventilation capabilities #360
Conversation
Can we bring this in, it would be essential to support ventilation devices in HA. |
PyViCare/PyViCareDevice.py
Outdated
@@ -15,3 +15,19 @@ def __init__(self, service: ViCareService) -> None: | |||
@handleNotSupported | |||
def getSerial(self): | |||
return self.service.getProperty("device.serial")["properties"]["value"]["value"] | |||
|
|||
@handleNotSupported | |||
def isHeatingDevice(self): |
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 do you think of renaming this function in something like isDeviceHeatingEnabled
? Because I don't know which impact on this data point is made by changing the active mode of the Heating Device (e.g. DHW only during Summer)
I think the same renaming could be useful for the other functions as well.
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.
Do you have a system where you could verify this?
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 can test it later with my Oil Boiler and Heatbox2
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.
Yes you are right. I have tested it, changing the mode to DHW Only doesn't affect the ´isEnabled` flag for heating on my System.
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 you also verify if this influences the ["properties"]["active"]["value"] of DHW?
So does turning of the DHW (is that possible?) disable the flag?
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 I disable DHW on my boiler, the feature heating.dhw
changes isEnabled
to false and removes the properties
{ "feature": "heating.dhw", "gatewayId": "xxxx", "deviceId": "0", "timestamp": "2024-04-04T16:01:14.844Z", "isEnabled": false, "isReady": true, "apiVersion": 1, "uri": "https://api.viessmann.com/iot/v1/features/installations/xxx/gateways/xxxxxx/devices/0/features/heating.dhw", "properties": {}, "commands": {} }
To disable dhw I need to reconfigure my boiler and remove the dhw temp. Sensor
So my Boiler acts as a device where DHW is possible but not enabled (probably isReady
shows this)
PyViCare/PyViCareDevice.py
Outdated
|
||
@handleNotSupported | ||
def isHeatingDevice(self): | ||
return self.service.getProperty("heating")["isEnabled"] |
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.
Would it be nice to catch the PyVicareNotSupported
error internally, rather than relying on the implementation of error handling from the Users?
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.
Agree, this should return false if it does not exists.
tests/test_Vitovent.py
Outdated
self.assertFalse(self.device.isHeatingDevice()) | ||
|
||
def test_isDomesticHotWaterDevice(self): | ||
self.assertTrue(self.device.isDomesticHotWaterDevice()) |
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.
For some reason the vitovent says it is a dhw device. Maybe this is all not that accurate.
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.
@SHuechtemann can you say why your Vitovent has an active DomesticHotWater flag?
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.
Idk. Maybe the description is inacuarate/misleading as my vivovent has an active Heat exchanger and is capable to heat up the incoming air...
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.
Also it has a bypass function to bypass the heat exchanger. Maybe this is what the flag is for, showing if bypass is active or inactive. This should be in the Response from the API, as the viessmann App also shows this.
@woehrl01 what shall I do about the failing test for newly added properties? |
@CFenner either implement the methods or add them to the ignore list (I'm fine with the later) |
@CFenner my boiler also doesn't show up the |
Yes, I can check that. I wonder if this could also be due to outdated api dumps. |
I don't think so because my API dumps are just a few minutes old. |
Is there progress for the implementation of the ventilation? can I test something? |
How i can test this? |
This adds methods to check if a device supports general heating, dhw, solar thermal or vertilation capabilities.
This requires #356