mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-11 07:17:10 +00:00
b2f3971a4c
Some devices (like KS200M) support ambient and motion, but as they are detected as wall switches, they don't get the modules added. This PR enables the respective modules for wall switches when the `dev_name` contains `PIR`.
10 lines
349 B
Python
10 lines
349 B
Python
from kasa.tests.device_fixtures import wallswitch_iot
|
|
|
|
|
|
@wallswitch_iot
|
|
def test_wallswitch_motion(dev):
|
|
"""Check that wallswitches with motion sensor get modules enabled."""
|
|
has_motion = "PIR" in dev.sys_info["dev_name"]
|
|
assert "motion" in dev.modules if has_motion else True
|
|
assert "ambient" in dev.modules if has_motion else True
|