Add missed saves

This commit is contained in:
Steven B 2024-11-25 13:48:45 +00:00
parent da83bcc589
commit 2b34b9efc6
No known key found for this signature in database
GPG Key ID: 6D5B46B3679F2A43
2 changed files with 9 additions and 9 deletions

View File

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

View File

@ -529,23 +529,23 @@ class Device(ABC):
vals: dict[str, tuple[ModuleName, Callable[[Any], Any], str]] = { vals: dict[str, tuple[ModuleName, Callable[[Any], Any], str]] = {
"is_dimmable": ( "is_dimmable": (
Module.Light, Module.Light,
lambda c: c.has_feature("set_brightness"), lambda c: c.has_feature("brightness"),
"light_module.has_feature('set_brightness')", "light_module.has_feature('brightness')",
), ),
"is_color": ( "is_color": (
Module.Light, Module.Light,
lambda c: c.has_feature("set_hsv"), lambda c: c.has_feature("hsv"),
"light_module.has_feature('set_hsv')", "light_module.has_feature('hsv')",
), ),
"is_variable_color_temp": ( "is_variable_color_temp": (
Module.Light, Module.Light,
lambda c: c.has_feature("set_color_temp"), lambda c: c.has_feature("color_temp"),
"light_module.has_feature('set_color_temp')", "light_module.has_feature('color_temp')",
), ),
"valid_temperature_range": ( "valid_temperature_range": (
Module.Light, Module.Light,
lambda c: c._deprecated_valid_temperature_range(), lambda c: c._deprecated_valid_temperature_range(),
"minimum and maximum value of get_feature('set_color_temp')", "minimum and maximum value of get_feature('color_temp')",
), ),
"has_effects": ( "has_effects": (
Module.Light, Module.Light,