diff --git a/README.md b/README.md index 1b2675e..b9e107d 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ The discovery works with a UDP Broadcast request and collects all bulbs in the n ## Bulb paramters (UDP RAW) -- **sceneId** - calls one of the predefined scenes (int from 1 to 32) [List of names in code](https://github.com/sbidy/pywizlight/blob/master/pywizlight/scenes.py) +- **sceneId** - calls one of the predefined scenes (int from 1 to 35) [List of names in code](https://github.com/sbidy/pywizlight/blob/master/pywizlight/scenes.py) - **speed** - sets the color changing speed in percent - **dimming** - sets the dimmer of the bulb in percent - **temp** - sets the color temperature in kelvins diff --git a/pywizlight/bulb.py b/pywizlight/bulb.py index f1f2f4c..7260a3d 100755 --- a/pywizlight/bulb.py +++ b/pywizlight/bulb.py @@ -189,7 +189,7 @@ def _set_scene(self, scene_id: int) -> None: """Set the scene by id.""" if scene_id not in SCENES: # id not in SCENES ! - raise ValueError("Scene is not available. Only 1 to 32 are supported") + raise ValueError("Scene is not available. Only 1 to 35 are supported") self.pilot_params["sceneId"] = scene_id def _set_rgbw(self, rgbw: Tuple[int, int, int, int]) -> None: diff --git a/pywizlight/scenes.py b/pywizlight/scenes.py index 6c2fe4b..db3f5c0 100755 --- a/pywizlight/scenes.py +++ b/pywizlight/scenes.py @@ -12,10 +12,10 @@ 5: "Fireplace", 6: "Cozy", 7: "Forest", - 8: "Pastel Colors", - 9: "Wake up", + 8: "Pastel colors", + 9: "Wake-up", 10: "Bedtime", - 11: "Warm White", + 11: "Warm white", 12: "Daylight", 13: "Cool white", 14: "Night light", @@ -23,11 +23,11 @@ 16: "Relax", 17: "True colors", 18: "TV time", - 19: "Plantgrowth", + 19: "Plant growth", 20: "Spring", 21: "Summer", 22: "Fall", - 23: "Deepdive", + 23: "Deep dive", 24: "Jungle", 25: "Mojito", 26: "Club", @@ -37,11 +37,14 @@ 30: "Golden white", 31: "Pulse", 32: "Steampunk", + 33: "Diwali", + 34: "White", + 35: "Alarm", 1000: "Rhythm", } SCENE_NAME_TO_ID = {scene_name: scene_id for (scene_id, scene_name) in SCENES.items()} -TW_SCENES = [6, 9, 10, 11, 12, 13, 14, 15, 16, 18, 29, 30, 31, 32] -DW_SCENES = [9, 10, 13, 14, 29, 30, 31, 32] +TW_SCENES = [6, 9, 10, 11, 12, 13, 14, 15, 16, 18, 29, 30, 31, 32, 33, 35] +DW_SCENES = [9, 10, 14, 29, 31, 32, 34, 35] SCENES_BY_CLASS: Dict[BulbClass, List[str]] = { BulbClass.RGB: list(cast(Iterable, SCENES.values())), diff --git a/pywizlight/tests/test_bulb_dimmable_white.py b/pywizlight/tests/test_bulb_dimmable_white.py index 891293f..922341c 100644 --- a/pywizlight/tests/test_bulb_dimmable_white.py +++ b/pywizlight/tests/test_bulb_dimmable_white.py @@ -40,12 +40,12 @@ async def test_model_description_dimmable_bulb(dimmable_bulb: wizlight) -> None: async def test_supported_scenes(dimmable_bulb: wizlight) -> None: """Test supported scenes.""" assert await dimmable_bulb.getSupportedScenes() == [ - "Wake up", + "Wake-up", "Bedtime", - "Cool white", "Night light", "Candlelight", - "Golden white", "Pulse", "Steampunk", + "White", + "Alarm", ] diff --git a/pywizlight/tests/test_bulb_light_strip_1_25_0.py b/pywizlight/tests/test_bulb_light_strip_1_25_0.py index 61efd91..a519d68 100644 --- a/pywizlight/tests/test_bulb_light_strip_1_25_0.py +++ b/pywizlight/tests/test_bulb_light_strip_1_25_0.py @@ -38,10 +38,10 @@ async def test_supported_scenes(light_strip: wizlight) -> None: "Fireplace", "Cozy", "Forest", - "Pastel Colors", - "Wake up", + "Pastel colors", + "Wake-up", "Bedtime", - "Warm White", + "Warm white", "Daylight", "Cool white", "Night light", @@ -49,11 +49,11 @@ async def test_supported_scenes(light_strip: wizlight) -> None: "Relax", "True colors", "TV time", - "Plantgrowth", + "Plant growth", "Spring", "Summer", "Fall", - "Deepdive", + "Deep dive", "Jungle", "Mojito", "Club", @@ -63,6 +63,8 @@ async def test_supported_scenes(light_strip: wizlight) -> None: "Golden white", "Pulse", "Steampunk", + "Diwali", + "Alarm", "Rhythm", ] diff --git a/pywizlight/tests/test_bulb_rgbw_1_21_4.py b/pywizlight/tests/test_bulb_rgbw_1_21_4.py index 2fced71..72a1a3c 100644 --- a/pywizlight/tests/test_bulb_rgbw_1_21_4.py +++ b/pywizlight/tests/test_bulb_rgbw_1_21_4.py @@ -47,10 +47,10 @@ async def test_supported_scenes(rgbw_bulb: wizlight) -> None: "Fireplace", "Cozy", "Forest", - "Pastel Colors", - "Wake up", + "Pastel colors", + "Wake-up", "Bedtime", - "Warm White", + "Warm white", "Daylight", "Cool white", "Night light", @@ -58,11 +58,11 @@ async def test_supported_scenes(rgbw_bulb: wizlight) -> None: "Relax", "True colors", "TV time", - "Plantgrowth", + "Plant growth", "Spring", "Summer", "Fall", - "Deepdive", + "Deep dive", "Jungle", "Mojito", "Club", @@ -72,5 +72,7 @@ async def test_supported_scenes(rgbw_bulb: wizlight) -> None: "Golden white", "Pulse", "Steampunk", + "Diwali", + "Alarm", "Rhythm", ] diff --git a/pywizlight/tests/test_bulb_turnable_white.py b/pywizlight/tests/test_bulb_turnable_white.py index 77dd6eb..3ed2ebb 100644 --- a/pywizlight/tests/test_bulb_turnable_white.py +++ b/pywizlight/tests/test_bulb_turnable_white.py @@ -41,9 +41,9 @@ async def test_supported_scenes(turnable_bulb: wizlight) -> None: """Test supported scenes.""" assert await turnable_bulb.getSupportedScenes() == [ "Cozy", - "Wake up", + "Wake-up", "Bedtime", - "Warm White", + "Warm white", "Daylight", "Cool white", "Night light", @@ -54,4 +54,6 @@ async def test_supported_scenes(turnable_bulb: wizlight) -> None: "Golden white", "Pulse", "Steampunk", + "Diwali", + "Alarm", ]