mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Update light transition module to work with child devices (#1017)
Fixes module to work with child devices, i.e. ks240 Interrogates the data to see whether maximums are available. Fixes a bug whereby setting a duration while the feature is not enabled does not actually enable it.
This commit is contained in:
@@ -107,6 +107,8 @@ class Feature:
|
||||
Number = Type.Number
|
||||
Choice = Type.Choice
|
||||
|
||||
DEFAULT_MAX = 2**16 # Arbitrary max
|
||||
|
||||
class Category(Enum):
|
||||
"""Category hint to allow feature grouping."""
|
||||
|
||||
@@ -155,7 +157,7 @@ class Feature:
|
||||
#: Minimum value
|
||||
minimum_value: int = 0
|
||||
#: Maximum value
|
||||
maximum_value: int = 2**16 # Arbitrary max
|
||||
maximum_value: int = DEFAULT_MAX
|
||||
#: Attribute containing the name of the range getter property.
|
||||
#: If set, this property will be used to set *minimum_value* and *maximum_value*.
|
||||
range_getter: str | None = None
|
||||
|
Reference in New Issue
Block a user