Migrate Light module to feature based capability checks

This commit is contained in:
Steven B
2024-11-22 17:02:38 +00:00
parent c5830a4cdc
commit 8bfddbdd71
8 changed files with 167 additions and 155 deletions

View File

@@ -52,9 +52,9 @@ True
>>> await dev.update()
>>> light.brightness
50
>>> light.is_color
>>> light.has_feature(light.set_hsv)
True
>>> if light.is_color:
>>> if light.has_feature(light.set_hsv):
>>> print(light.hsv)
HSV(hue=0, saturation=100, value=50)