diff --git a/miio/philips_moonlight.py b/miio/philips_moonlight.py index 3df222dd7..7cb1aa780 100644 --- a/miio/philips_moonlight.py +++ b/miio/philips_moonlight.py @@ -249,7 +249,7 @@ def set_brightness_and_rgb(self, brightness: int, rgb: Tuple[int, int, int]): ) def set_scene(self, number: int): """Set scene number.""" - if number < 1 or number > 4: + if number < 1 or number > 6: raise PhilipsMoonlightException("Invalid fixed scene number: %s" % number) return self.send("apply_fixed_scene", [number]) diff --git a/miio/tests/test_philips_moonlight.py b/miio/tests/test_philips_moonlight.py index 3cd69892e..a2ff3bc8b 100644 --- a/miio/tests/test_philips_moonlight.py +++ b/miio/tests/test_philips_moonlight.py @@ -235,8 +235,8 @@ def scene(): self.device.set_scene(1) assert scene() == 1 - self.device.set_scene(2) - assert scene() == 2 + self.device.set_scene(6) + assert scene() == 6 with pytest.raises(PhilipsMoonlightException): self.device.set_scene(-1) @@ -245,4 +245,4 @@ def scene(): self.device.set_scene(0) with pytest.raises(PhilipsMoonlightException): - self.device.set_scene(5) + self.device.set_scene(7)