def test_breezer_auto_send_speed_max_set(breezer_auto: Breezer): new_speed_max_set = breezer_auto.speed_limit if breezer_auto.speed_max_set != breezer_auto.speed_limit \ else breezer_auto.speed_limit - 1 breezer_auto.speed_max_set = new_speed_max_set breezer_auto.send() assert breezer_auto.speed_max_set == new_speed_max_set, "Failed to set breezer speed_max_set!" sleep(TESTS_DELAY) # let the server "rest"
def get_devices(self, name_part: str=None, guid: str=None, type: str=None) -> list: devices_data, zones = self._get_devices_data(name_part, guid, type) result = [] for device_data, zone in zip(devices_data, zones): if "co2" in device_data.type: result.append(MagicAir(device_data, zone, self)) elif "breezer" in device_data.type: result.append(Breezer(device_data, zone, self)) return result
def get_devices(self, name_part: str=None, guid: str=None, type: str=None) -> list: devices_data, zones = self._get_devices_data(name_part, guid, type) result = [] for device_data, zone in zip(devices_data, zones): if "co2" in device_data.type: result.append(MagicAir(device_data, zone, self)) elif "breezer" in device_data.type or "O2" in device_data.type: result.append(Breezer(device_data, zone, self)) else: # pragma: no cover _LOGGER.warning(f"Unknown device type: {device_data.type}, contact the developer for support with data:\n{device_data}") return result
def test_breezer_auto_send_speed_min_set(breezer_auto: Breezer): new_speed_min_set = 1 if breezer_auto.speed_min_set != 1 else 2 breezer_auto.speed_min_set = new_speed_min_set breezer_auto.send() assert breezer_auto.speed_min_set == new_speed_min_set, "Failed to set breezer speed_min_set!" sleep(TESTS_DELAY) # let the server "rest"
def test_breezer_manual_send_speed(breezer_manual: Breezer): new_speed = 1 if breezer_manual.speed != 1 else 2 breezer_manual.speed = new_speed breezer_manual.send() assert breezer_manual.speed == new_speed, "Failed to set breezer speed!" sleep(TESTS_DELAY) # let the server "rest"
def test_breezer_manual_send_t_set(breezer_manual: Breezer): new_t_set = 15 if breezer_manual.t_set != 15 else 14 breezer_manual.t_set = new_t_set assert breezer_manual.t_set == new_t_set, "Failed to set breezer t_set!" sleep(TESTS_DELAY) # let the server "rest"
def test_breezer_manual_send_heater_enabled(breezer_manual: Breezer): new_heater_enabled = True if not breezer_manual.heater_enabled else False breezer_manual.heater_enabled = new_heater_enabled breezer_manual.send() sleep(TESTS_DELAY) # let the server "rest"
def test_breezer_load(breezer: Breezer): assert breezer.load() is True, "Failed to load breezer data!" sleep(TESTS_DELAY) # let the server "rest"
def test_breezer_not_send_if_not_valid(breezer: Breezer): breezer.speed = None assert breezer.send() is False, "Should'nt have sent not valid breezer!" sleep(TESTS_DELAY) # let the server "rest"
def test_breezer_manual_send_gate(breezer_manual: Breezer): new_gate = 0 if breezer_manual.gate != 0 else 2 breezer_manual.gate = new_gate breezer_manual.send() assert breezer_manual.gate == new_gate, "Failed to set breezer gate!" sleep(TESTS_DELAY) # let the server "rest"