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:
Teemu R
2024-03-26 19:28:39 +01:00
committed by GitHub
parent d63f43a230
commit 35dbda7049
13 changed files with 70 additions and 115 deletions

View File

@@ -1,6 +1,6 @@
"""Module for smart plugs (HS100, HS110, ..)."""
import logging
from typing import Any, Dict, Optional
from typing import Optional
from ..device_type import DeviceType
from ..deviceconfig import DeviceConfig
@@ -99,12 +99,6 @@ class IotPlug(IotDevice):
"system", "set_led_off", {"off": int(not state)}
)
@property # type: ignore
@requires_update
def state_information(self) -> Dict[str, Any]:
"""Return switch-specific state information."""
return {}
class IotWallSwitch(IotPlug):
"""Representation of a TP-Link Smart Wall Switch."""