Add WallSwitch device type and autogenerate supported devices docs (#758)

This commit is contained in:
Steven B
2024-03-01 18:32:45 +00:00
committed by GitHub
parent 0306e05fb9
commit fcad0d2344
21 changed files with 714 additions and 211 deletions

View File

@@ -29,8 +29,9 @@ from .conftest import (
dimmer,
lightstrip,
new_discovery,
plug,
plug_iot,
strip_iot,
wallswitch_iot,
)
UNSUPPORTED = {
@@ -55,7 +56,14 @@ UNSUPPORTED = {
}
@plug
@wallswitch_iot
async def test_type_detection_switch(dev: Device):
d = Discover._get_device_class(dev._last_update)("localhost")
assert d.is_wallswitch
assert d.device_type == DeviceType.WallSwitch
@plug_iot
async def test_type_detection_plug(dev: Device):
d = Discover._get_device_class(dev._last_update)("localhost")
assert d.is_plug