mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-08 11:44:02 +00:00
Support for on_off_gradually v2+ (#793)
Previously, only v1 of on_off_gradually is supported, and the newer versions are not backwards compatible. This PR adds support for the newer versions of the component, and implements `number` type for `Feature` to expose the transition time selection. This also adds a new `supported_version` property to the main module API.
This commit is contained in:
@@ -80,3 +80,8 @@ class SmartModule(Module):
|
||||
return next(iter(filtered_data.values()))
|
||||
|
||||
return filtered_data
|
||||
|
||||
@property
|
||||
def supported_version(self) -> int:
|
||||
"""Return version supported by the device."""
|
||||
return self._device._components[self.REQUIRED_COMPONENT]
|
||||
|
Reference in New Issue
Block a user