skodaconnect / homeassistant-myskoda

Homeassistant integration for MySkoda.
97 stars 15 forks source link

ValueError: 'INSUFFICIENT_RIGHTS' and 'DEACTIVATED_BY_ACTIVE_VEHICLE_USER' is not a valid CapabilityStatus #155

Closed alphaspot closed 1 month ago

alphaspot commented 1 month ago

Logger: myskoda.rest_api Kilde: /usr/local/lib/python3.12/site-packages/myskoda/rest_api.py:376 Første forekomst: 14.09.55 (11 forekomster) Senest logget: 14.19.52

Failed to deserialize data: {"vin":"REDACTED","name":"Enyaq","workshopModeEnabled":false,"state":"GUEST_USER","devicePlatform":"WCAR","softwareVersion":"3.2","specification":{"title":"Škoda Enyaq","manufacturingDate":"2023-04-18","model":"Enyaq","modelYear":"2023","body":"SUV","trimLevel":"80 Sportline ","systemCode":"UNKNOWN","systemModelId":"5AZJJ2","maxChargingPowerInKW":125,"battery":{"capacityInKWh":77},"engine":{"type":"iV","powerInKW":150},"gearbox":{"type":"E1H"}},"renders":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://ip-modcwp.azureedge.net/modcwp5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-1920658dayvext_side1080.png?v=638467251820000000","viewPoint":"garage_l","type":"REAL","order":1},{"url":"https://ip-modcwp.azureedge.net/modcwp5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-700390dayvext_front1080.png?v=638467251820000000","viewPoint":"main","type":"REAL","order":2}],"compositeRenders":[{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0}],"viewType":"UNMODIFIED_EXTERIOR_SIDE"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":false,"anchorTo":"LEFT"},"viewType":"HOME"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_charging_light_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"CHARGING_LIGHT"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_charging_dark_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"CHARGING_DARK"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_plugged_in_light_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"PLUGGED_IN_LIGHT"},{"layers":[{"url":"https://iprenders.blob.core.windows.net/base5azv23200005/8E8EPUxFvBgM0CK-U_pbg0iQAkeurY6N8mR-9YvJAb12IOPUxtyog6_B-Mwqxg0_cFBhHk3YT16uJsbRolW8-CKGNEBJ-19201080dayvext_side1080.png","viewPoint":"exterior_side","type":"REAL","order":0},{"url":"https://mspgwlivestorage.blob.core.windows.net/renders/cables/enyaq_5A_cable_plugged_in_dark_v1.png","viewPoint":"exterior_side","type":"REAL","order":1}],"modifications":{"adjustSpaceInPx":{"top":-317,"bottom":-193,"left":-149,"right":-111},"densityIndependentHeight":270,"flipHorizontal":true,"anchorTo":"LEFT"},"viewType":"PLUGGED_IN_DARK"}],"capabilities":{"capabilities":[{"id":"AUTOMATION","statuses":[]},{"id":"BATTERY_CHARGING_CARE","statuses":[]},{"id":"BATTERY_SUPPORT","statuses":[]},{"id":"CHARGING_PROFILES","statuses":[]},{"id":"CHARGING_STATIONS","statuses":[]},{"id":"DEALER_APPOINTMENT","statuses":["INITIALLY_DISABLED"]},{"id":"DIGICERT","statuses":[]},{"id":"MAP_UPDATE","statuses":[]},{"id":"MEASUREMENTS","statuses":[]},{"id":"PARKING_INFORMATION","statuses":[]},{"id":"PARKING_POSITION","statuses":[]},{"id":"PLUG_AND_CHARGE","statuses":["INSUFFICIENT_RIGHTS","DEACTIVATED_BY_ACTIVE_VEHICLE_USER"]},{"id":"POI_SEARCH","statuses":[]},{"id":"ROADSIDE_ASSISTANT","statuses":[]},{"id":"ROUTING","statuses":[]},{"id":"STATE","statuses":[]},{"id":"TRAFFIC_INFORMATION","statuses":[]},{"id":"VEHICLE_HEALTH_INSPECTION","statuses":[]},{"id":"WARNING_LIGHTS","statuses":[]},{"id":"AIR_CONDITIONING_TIMERS","statuses":[]},{"id":"AIR_CONDITIONING_SMART_SETTINGS","statuses":[]},{"id":"AIR_CONDITIONING_SAVE_AND_ACTIVATE","statuses":[]},{"id":"ROUTE_PLANNING_5_CHARGERS","statuses":[]},{"id":"DESTINATIONS","statuses":[]},{"id":"CHARGING_MEB","statuses":[]},{"id":"VEHICLE_SERVICES_BACKUPS","statuses":[]},{"id":"EV_ROUTE_PLANNING","statuses":[]},{"id":"CHARGE_MODE_SELECTION","statuses":[]},{"id":"VEHICLE_HEALTH_WARNINGS","statuses":[]},{"id":"PAY_TO_PARK","statuses":[]},{"id":"ONLINE_SPEECH_GPS","statuses":[]},{"id":"GUEST_USER_MANAGEMENT","statuses":[]},{"id":"WINDOW_HEATING","statuses":[]},{"id":"ROUTE_IMPORT","statuses":[]},{"id":"CHARGING","statuses":[]},{"id":"AIR_CONDITIONING","statuses":[]},{"id":"EXTENDED_CHARGING_SETTINGS","statuses":[]},{"id":"VEHICLE_WAKE_UP_TRIGGER","statuses":[]}]}} Traceback (most recent call last): File "", line 15, in mashumaro_from_dict File "/usr/local/lib/python3.12/enum.py", line 757, in call return cls.new(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/enum.py", line 1171, in new raise ve_exc ValueError: 'INSUFFICIENT_RIGHTS' is not a valid CapabilityStatus

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 8, in mashumaro_from_dict_json__ File "/usr/local/lib/python3.12/site-packages/myskoda/models/info.py", line 119, in drop_unknown_capabilities return [Capability.from_dict(c) for c in value if c["id"] in CapabilityId] ^^^^^^^^^^^^^^^^^^^^^^^ File "", line 17, in mashumaro_from_dict__ mashumaro.exceptions.InvalidFieldValue: Field "statuses" of type list[CapabilityStatus] in Capability has invalid value ['INSUFFICIENT_RIGHTS', 'DEACTIVATED_BY_ACTIVE_VEHICLE_USER']

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 30, in mashumaro_from_json File "", line 10, in __mashumaro_from_dict_json__ mashumaro.exceptions.InvalidFieldValue: Field "capabilities" of type list[Capability] in Capabilities has invalid value [{'id': 'AUTOMATION', 'statuses': []}, {'id': 'BATTERY_CHARGING_CARE', 'statuses': []}, {'id': 'BATTERY_SUPPORT', 'statuses': []}, {'id': 'CHARGING_PROFILES', 'statuses': []}, {'id': 'CHARGING_STATIONS', 'statuses': []}, {'id': 'DEALER_APPOINTMENT', 'statuses': ['INITIALLY_DISABLED']}, {'id': 'DIGICERT', 'statuses': []}, {'id': 'MAP_UPDATE', 'statuses': []}, {'id': 'MEASUREMENTS', 'statuses': []}, {'id': 'PARKING_INFORMATION', 'statuses': []}, {'id': 'PARKING_POSITION', 'statuses': []}, {'id': 'PLUG_AND_CHARGE', 'statuses': ['INSUFFICIENT_RIGHTS', 'DEACTIVATED_BY_ACTIVE_VEHICLE_USER']}, {'id': 'POI_SEARCH', 'statuses': []}, {'id': 'ROADSIDE_ASSISTANT', 'statuses': []}, {'id': 'ROUTING', 'statuses': []}, {'id': 'STATE', 'statuses': []}, {'id': 'TRAFFIC_INFORMATION', 'statuses': []}, {'id': 'VEHICLE_HEALTH_INSPECTION', 'statuses': []}, {'id': 'WARNING_LIGHTS', 'statuses': []}, {'id': 'AIR_CONDITIONING_TIMERS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SMART_SETTINGS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SAVE_AND_ACTIVATE', 'statuses': []}, {'id': 'ROUTE_PLANNING_5_CHARGERS', 'statuses': []}, {'id': 'DESTINATIONS', 'statuses': []}, {'id': 'CHARGING_MEB', 'statuses': []}, {'id': 'VEHICLE_SERVICES_BACKUPS', 'statuses': []}, {'id': 'EV_ROUTE_PLANNING', 'statuses': []}, {'id': 'CHARGE_MODE_SELECTION', 'statuses': []}, {'id': 'VEHICLE_HEALTH_WARNINGS', 'statuses': []}, {'id': 'PAY_TO_PARK', 'statuses': []}, {'id': 'ONLINE_SPEECH_GPS', 'statuses': []}, {'id': 'GUEST_USER_MANAGEMENT', 'statuses': []}, {'id': 'WINDOW_HEATING', 'statuses': []}, {'id': 'ROUTE_IMPORT', 'statuses': []}, {'id': 'CHARGING', 'statuses': []}, {'id': 'AIR_CONDITIONING', 'statuses': []}, {'id': 'EXTENDED_CHARGING_SETTINGS', 'statuses': []}, {'id': 'VEHICLE_WAKE_UP_TRIGGER', 'statuses': []}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 374, in _deserialize data = deserialize(text) ^^^^^^^^^^^^^^^^^ File "", line 32, in mashumaro_from_json mashumaro.exceptions.InvalidFieldValue: Field "capabilities" of type Capabilities in Info has invalid value {'capabilities': [{'id': 'AUTOMATION', 'statuses': []}, {'id': 'BATTERY_CHARGING_CARE', 'statuses': []}, {'id': 'BATTERY_SUPPORT', 'statuses': []}, {'id': 'CHARGING_PROFILES', 'statuses': []}, {'id': 'CHARGING_STATIONS', 'statuses': []}, {'id': 'DEALER_APPOINTMENT', 'statuses': ['INITIALLY_DISABLED']}, {'id': 'DIGICERT', 'statuses': []}, {'id': 'MAP_UPDATE', 'statuses': []}, {'id': 'MEASUREMENTS', 'statuses': []}, {'id': 'PARKING_INFORMATION', 'statuses': []}, {'id': 'PARKING_POSITION', 'statuses': []}, {'id': 'PLUG_AND_CHARGE', 'statuses': ['INSUFFICIENT_RIGHTS', 'DEACTIVATED_BY_ACTIVE_VEHICLE_USER']}, {'id': 'POI_SEARCH', 'statuses': []}, {'id': 'ROADSIDE_ASSISTANT', 'statuses': []}, {'id': 'ROUTING', 'statuses': []}, {'id': 'STATE', 'statuses': []}, {'id': 'TRAFFIC_INFORMATION', 'statuses': []}, {'id': 'VEHICLE_HEALTH_INSPECTION', 'statuses': []}, {'id': 'WARNING_LIGHTS', 'statuses': []}, {'id': 'AIR_CONDITIONING_TIMERS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SMART_SETTINGS', 'statuses': []}, {'id': 'AIR_CONDITIONING_SAVE_AND_ACTIVATE', 'statuses': []}, {'id': 'ROUTE_PLANNING_5_CHARGERS', 'statuses': []}, {'id': 'DESTINATIONS', 'statuses': []}, {'id': 'CHARGING_MEB', 'statuses': []}, {'id': 'VEHICLE_SERVICES_BACKUPS', 'statuses': []}, {'id': 'EV_ROUTE_PLANNING', 'statuses': []}, {'id': 'CHARGE_MODE_SELECTION', 'statuses': []}, {'id': 'VEHICLE_HEALTH_WARNINGS', 'statuses': []}, {'id': 'PAY_TO_PARK', 'statuses': []}, {'id': 'ONLINE_SPEECH_GPS', 'statuses': []}, {'id': 'GUEST_USER_MANAGEMENT', 'statuses': []}, {'id': 'WINDOW_HEATING', 'statuses': []}, {'id': 'ROUTE_IMPORT', 'statuses': []}, {'id': 'CHARGING', 'statuses': []}, {'id': 'AIR_CONDITIONING', 'statuses': []}, {'id': 'EXTENDED_CHARGING_SETTINGS', 'statuses': []}, {'id': 'VEHICLE_WAKE_UP_TRIGGER', 'statuses': []}]}

WebSpider commented 1 month ago

Nice one!

We'll look into this

WebSpider commented 1 month ago

This will be fixed in the coming release

alphaspot commented 1 month ago

Great, thank you! And thumbs up for the effort getting this integration up and running. Before you edited your comment, you asked what car model triggered these ValueErrors. It's a 2023 Enyaq 80 Sportline.