mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-20 06:18:01 +00:00
Add LightEffect module for smart light strips (#918)
Implements the `light_strip_lighting_effect` components for `smart` devices. Uses a new list of effects captured from a L900 which are similar to the `iot` effects but include some additional properties and a few extra effects. Assumes that a device only implements `light_strip_lighting_effect` or `light_effect` but not both.
This commit is contained in:
@@ -390,12 +390,8 @@ async def test_light_effect(dev: Device, runner: CliRunner):
|
||||
assert light_effect.effect == light_effect.LIGHT_EFFECTS_OFF
|
||||
|
||||
res = await runner.invoke(effect, obj=dev)
|
||||
msg = (
|
||||
"Setting an effect requires a named built-in effect: "
|
||||
+ f"{light_effect.effect_list}"
|
||||
)
|
||||
assert msg in res.output
|
||||
assert res.exit_code == 2
|
||||
assert f"Light effect: {light_effect.effect}" in res.output
|
||||
assert res.exit_code == 0
|
||||
|
||||
res = await runner.invoke(effect, [light_effect.effect_list[1]], obj=dev)
|
||||
assert f"Setting Effect: {light_effect.effect_list[1]}" in res.output
|
||||
|
Reference in New Issue
Block a user