From 7bbb29c648131a80b4645586748c04aaf134c68c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 17 Sep 2022 16:01:56 +0200 Subject: [PATCH] Fix device mode to allow schedule (#227) --- src/demetriek/const.py | 1 + tests/fixtures/device2.json | 2 +- tests/test_device.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/demetriek/const.py b/src/demetriek/const.py index 4b8a76d7..32f83ca2 100644 --- a/src/demetriek/const.py +++ b/src/demetriek/const.py @@ -16,6 +16,7 @@ class DeviceMode(str, Enum): AUTO = "auto" KIOSK = "kiosk" MANUAL = "manual" + SCHEDULE = "schedule" class DeviceState(str, Enum): diff --git a/tests/fixtures/device2.json b/tests/fixtures/device2.json index 244af341..48504bd3 100644 --- a/tests/fixtures/device2.json +++ b/tests/fixtures/device2.json @@ -53,7 +53,7 @@ "width": 37 }, "id": "12345", - "mode": "auto", + "mode": "schedule", "model": "LM 37X8", "name": "Frenck's LaMetric", "os_version": "2.2.2", diff --git a/tests/test_device.py b/tests/test_device.py index 730913ce..94850e62 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -85,7 +85,7 @@ async def test_get_device2(aresponses: ResponsesMockServer) -> None: assert device.device_id == "12345" assert device.name == "Frenck's LaMetric" assert device.os_version == "2.2.2" - assert device.mode is DeviceMode.AUTO + assert device.mode is DeviceMode.SCHEDULE assert device.model == "LM 37X8" assert device.audio.volume == 100 assert device.audio.volume_range