def messages(self): if self.is_hev: return [LightMessages.GetHevCycleConfiguration()] return Skip
@pytest.fixture() def m(self, fake_the_time): return fake_the_time[1] async it "responds to starting a cycle when light is off", device, assertResponse, m: await device.change_one("power", 0, event=None) assert device.attrs.clean_details.enabled is False assert device.attrs.clean_details.duration_s == 0 assert device.attrs.clean_details.remaining_s == 0 assert device.attrs.clean_details.last_result is LightLastHevCycleResult.NONE assert device.attrs.clean_details.indication is False assert device.attrs.clean_details.default_duration_s == 7200 getter = LightMessages.GetHevCycleConfiguration() state = LightMessages.StateHevCycleConfiguration(indication=False, duration_s=7200) await assertResponse(getter, [state]) assert device.attrs.clean_details.indication is False assert device.attrs.clean_details.default_duration_s == 7200 getter = LightMessages.GetLightPower() state = DeviceMessages.StatePower(level=0) await assertResponse(getter, [state]) assert device.attrs.power == 0 getter = DeviceMessages.GetPower() state = DeviceMessages.StatePower(level=0) await assertResponse(getter, [state]) assert device.attrs.power == 0 setter = LightMessages.SetHevCycle(enable=True, duration_s=0, res_required=False)