Legacy ZoneCurrentSpecialFunction causes crash
Webbie666 opened this issue · comments
Before submitting a new issue
- I redownloaded the latest release and restarted Home Assistant
- I've checked known issues
- I've enabled debug logs and attached the relevant logs to this ticket
Problem description
A legacy ZoneCurrentSpecialFunction "ONE_DAY_BANK_HOLIDAY" on VRC700 causes a crash of the api.
On the controller, you can choose "1 day at home", the myVaillant-app does not recognize that function, but lets you change it to a quick veto.
myPyllant crashes when reading the data from the server.
Logs
Traceback (most recent call last):
File "/.../test.py", line 97, in <module>
result = asyncio.run(main())
File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
return future.result()
File "/home/pi/nest/test.py", line 60, in main
async for system in api.get_systems(
File "/usr/local/lib/python3.10/site-packages/myPyllant/api.py", line 360, in get_systems
system = System.from_api(
File "/usr/local/lib/python3.10/site-packages/myPyllant/models.py", line 864, in from_api
system.zones = [
File "/usr/local/lib/python3.10/site-packages/myPyllant/models.py", line 865, in <listcomp>
Zone.from_api(
File "/usr/local/lib/python3.10/site-packages/myPyllant/models.py", line 397, in from_api
return super().from_api(**data)
File "/usr/local/lib/python3.10/site-packages/myPyllant/models.py", line 75, in from_api
return cls(**data)
File "/usr/local/lib/python3.10/site-packages/pydantic/dataclasses.py", line 325, in new_init
self.__pydantic_validate_values__()
File "/usr/local/lib/python3.10/site-packages/pydantic/dataclasses.py", line 425, in _dataclass_validate_values
raise validation_error
pydantic.error_wrappers.ValidationError: 1 validation error for Zone
current_special_function
value is not a valid enumeration member; permitted: 'NONE', 'QUICK_VETO', 'HOLIDAY', 'SYSTEM_OFF', 'VENTILATION_BOOST' (type=type_error.enum; enum_values=[<ZoneCurrentSpecialFunction.NONE, <ZoneCurrentSpecialFunction.HOLIDAY: 'HOLIDAY'>, <ZoneCurrentSpecialFunction.SYSTEM_OFF: 'SYSTEM_OFF'>, <ZoneCurrentSpecialFunction.VENTILATION_BOOST: 'VENTILATION_BOOST'>])
From system.json (attached):
...
"zones": [
{
"index": 0,
"desiredRoomTemperatureSetpointHeating": 20.0,
"desiredRoomTemperatureSetpoint": 20.0,
"currentRoomTemperature": 20.8125,
"currentRoomHumidity": 83.0,
"currentSpecialFunction": "ONE_DAY_BANK_HOLIDAY"
},
...
Should work in the latest release https://github.com/signalkraft/mypyllant-component/releases/tag/v0.8.4