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

@@ -212,6 +212,11 @@ class Device(ABC):
"""Return True if the device is a plug."""
return self.device_type == DeviceType.Plug
@property
def is_wallswitch(self) -> bool:
"""Return True if the device is a switch."""
return self.device_type == DeviceType.WallSwitch
@property
def is_strip(self) -> bool:
"""Return True if the device is a strip."""