mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 10:28:01 +00:00
Change state_information to return feature values (#804)
This changes `state_information` to return the names and values of all defined features. It was originally a "temporary" hack to show some extra, device-specific information in the cli tool, but now that we have device-defined features we can leverage them.
This commit is contained in:
@@ -304,9 +304,9 @@ class Device(ABC):
|
||||
"""Return all the internal state data."""
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def state_information(self) -> Dict[str, Any]:
|
||||
"""Return the key state information."""
|
||||
"""Return available features and their values."""
|
||||
return {feat.name: feat.value for feat in self._features.values()}
|
||||
|
||||
@property
|
||||
def features(self) -> Dict[str, Feature]:
|
||||
|
Reference in New Issue
Block a user