mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Embed FeatureType inside Feature (#860)
Moves `FeatureType` into `Feature` to make it easier to use the API. This also enforces that no invalid types are accepted (i.e., `Category.Config` cannot be a `Sensor`) If `--verbose` is used with the cli tool, some extra information is displayed for features when in the state command.
This commit is contained in:
@@ -26,6 +26,7 @@ class TemperatureControl(SmartModule):
|
||||
attribute_getter="target_temperature",
|
||||
attribute_setter="set_target_temperature",
|
||||
icon="mdi:thermometer",
|
||||
type=Feature.Type.Number,
|
||||
)
|
||||
)
|
||||
# TODO: this might belong into its own module, temperature_correction?
|
||||
@@ -38,6 +39,7 @@ class TemperatureControl(SmartModule):
|
||||
attribute_setter="set_temperature_offset",
|
||||
minimum_value=-10,
|
||||
maximum_value=10,
|
||||
type=Feature.Type.Number,
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user