mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Remove last remnants from 'descriptor'
This commit is contained in:
@@ -302,12 +302,12 @@ class IotDevice(Device):
|
||||
self._set_sys_info(response["system"]["get_sysinfo"])
|
||||
|
||||
if not self._features:
|
||||
await self._initialize_descriptors()
|
||||
await self._initialize_features()
|
||||
|
||||
await self._modular_update(req)
|
||||
self._set_sys_info(self._last_update["system"]["get_sysinfo"])
|
||||
|
||||
async def _initialize_descriptors(self):
|
||||
async def _initialize_features(self):
|
||||
self.add_feature(
|
||||
Feature(
|
||||
device=self, name="RSSI", attribute_getter="rssi", icon="mdi:signal"
|
||||
|
@@ -38,7 +38,7 @@ class IotModule(ABC):
|
||||
self._module_features: Dict[str, Feature] = {}
|
||||
|
||||
def add_feature(self, feature: Feature):
|
||||
"""Add module descriptor."""
|
||||
"""Add module feature."""
|
||||
feature_name = f"{self._module}_{feature.name}"
|
||||
if feature_name in self._module_features:
|
||||
raise SmartDeviceException("Duplicate name detected %s" % feature_name)
|
||||
|
Reference in New Issue
Block a user