From e893c84a6664a483d2884ec1d921206b985c0465 Mon Sep 17 00:00:00 2001 From: Jacob Berelman <630000+stickpin@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:53:57 +0100 Subject: [PATCH] cover sunRoof, roofCover and bonnet incorrect status --- volkswagencarnet/vw_vehicle.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/volkswagencarnet/vw_vehicle.py b/volkswagencarnet/vw_vehicle.py index 76d24c5c..8abc4de0 100644 --- a/volkswagencarnet/vw_vehicle.py +++ b/volkswagencarnet/vw_vehicle.py @@ -1483,6 +1483,8 @@ def sunroof_closed(self) -> bool: windows = find_path(self.attrs, "access.accessStatus.value.windows") for window in windows: if window["name"] == "sunRoof": + if not any(valid_status in window["status"] for valid_status in P.VALID_WINDOW_STATUS): + return None return "closed" in window["status"] return False @@ -1511,6 +1513,8 @@ def roof_cover_closed(self) -> bool: windows = find_path(self.attrs, "access.accessStatus.value.windows") for window in windows: if window["name"] == "roofCover": + if not any(valid_status in window["status"] for valid_status in P.VALID_WINDOW_STATUS): + return None return "closed" in window["status"] return False @@ -1657,6 +1661,8 @@ def hood_closed(self) -> bool: doors = find_path(self.attrs, f"{Services.ACCESS}.accessStatus.value.doors") for door in doors: if door["name"] == "bonnet": + if not any(valid_status in door["status"] for valid_status in P.VALID_DOOR_STATUS): + return None return "closed" in door["status"] return False