Add rest api command to the cli

This commit is contained in:
Steven B
2024-12-24 15:23:12 +00:00
parent 63f4f82791
commit 6f58c99bf7
5 changed files with 554 additions and 6 deletions

View File

@@ -96,6 +96,10 @@ class HSV(NamedTuple):
saturation: int
value: int
def to_dict(self) -> dict:
"""Return dict represenation."""
return {"hue": self.hue, "saturation": self.saturation, "value": self.value}
class Light(Module, ABC):
"""Base class for TP-Link Light."""