diff --git a/PyViCare/PyViCareVentilationDevice.py b/PyViCare/PyViCareVentilationDevice.py index 469a6019..c4694db7 100644 --- a/PyViCare/PyViCareVentilationDevice.py +++ b/PyViCare/PyViCareVentilationDevice.py @@ -331,6 +331,30 @@ def getHeatExchangerFrostProtectionActive(self) -> bool: def getHeatRecoveryEfficiency(self) -> float: return float(self.getProperty("ventilation.heating.recovery")["properties"]["value"]["value"]) + @handleNotSupported + def getBypassActive(self) -> bool: + return bool(self.getProperty("ventilation.bypass")["properties"]["active"]["value"]) + + @handleNotSupported + def getBypassPosition(self) -> int: + return int(self.getProperty("ventilation.bypass.position")["properties"]["value"]["value"]) + + @handleNotSupported + def getBypassAutomaticMode(self) -> bool: + return bool(self.getProperty("ventilation.bypass.operating.modes.automatic")["properties"]["active"]["value"]) + + @handleNotSupported + def getBypassOperatingModeLevel(self) -> str: + return str(self.getProperty("ventilation.bypass.operating.modes.active")["properties"]["level"]["value"]) + + @handleNotSupported + def getBypassOperatingModeState(self) -> str: + return str(self.getProperty("ventilation.bypass.operating.modes.active")["properties"]["state"]["value"]) + + @handleNotSupported + def getBypassOperatingModeValue(self) -> str: + return str(self.getProperty("ventilation.bypass.operating.modes.active")["properties"]["value"]["value"]) + @handleNotSupported def getSupplyVolumeFlow(self) -> int: return int(self.getProperty("ventilation.volumeFlow.current.input")["properties"]["value"]["value"]) diff --git a/tests/test_VitoairFs300E.py b/tests/test_VitoairFs300E.py index fb39affb..0dd3fad4 100644 --- a/tests/test_VitoairFs300E.py +++ b/tests/test_VitoairFs300E.py @@ -86,3 +86,21 @@ def test_getConfiguredLevelThreeVolumeFlow(self): def test_getConfiguredLevelFourVolumeFlow(self): self.assertEqual(self.device.getConfiguredLevelFourVolumeFlow(), 275) + + def test_getBypassActive(self): + self.assertEqual(self.device.getBypassActive(), True) + + def test_getBypassPosition(self): + self.assertEqual(self.device.getBypassPosition(), 0) + + def test_getBypassAutomaticMode(self): + self.assertEqual(self.device.getBypassAutomaticMode(), True) + + def test_getBypassOperatingModeLevel(self): + self.assertEqual(self.device.getBypassOperatingModeLevel(), "dynamicRegulationMode") + + def test_getBypassOperatingModeState(self): + self.assertEqual(self.device.getBypassOperatingModeState(), "automatic") + + def test_getBypassOperatingModeValue(self): + self.assertEqual(self.device.getBypassOperatingModeValue(), "automatic")