diff --git a/kasa/__init__.py b/kasa/__init__.py index d16fcb0b..7dac1170 100755 --- a/kasa/__init__.py +++ b/kasa/__init__.py @@ -33,7 +33,7 @@ from kasa.exceptions import ( TimeoutException, UnsupportedDeviceException, ) -from kasa.feature import Feature, FeatureCategory, FeatureType +from kasa.feature import Feature, FeatureType from kasa.iot.iotbulb import BulbPreset, TurnOnBehavior, TurnOnBehaviors from kasa.iotprotocol import ( IotProtocol, @@ -57,7 +57,6 @@ __all__ = [ "DeviceType", "Feature", "FeatureType", - "FeatureCategory", "EmeterStatus", "Device", "Bulb", diff --git a/kasa/feature.py b/kasa/feature.py index 11444e8d..cf868dd0 100644 --- a/kasa/feature.py +++ b/kasa/feature.py @@ -7,14 +7,6 @@ if TYPE_CHECKING: from .device import Device -class FeatureCategory(Enum): - """Feature category.""" - - # TODO: we could probably do better than using the scheme homeassistant is using - Config = auto() - Diagnostic = auto() - - class FeatureType(Enum): """Type to help decide how to present the feature.""" @@ -40,10 +32,7 @@ class Feature: container: Any = None #: Icon suggestion icon: str | None = None - #: Hint for homeassistant - #: TODO: Replace with a set of flags to allow homeassistant make its own decision? - show_in_hass: bool = True - category: FeatureCategory = FeatureCategory.Diagnostic + #: Type of the feature type: FeatureType = FeatureType.Sensor @property diff --git a/kasa/iot/iotdevice.py b/kasa/iot/iotdevice.py index 85d95653..8ec7cd4b 100755 --- a/kasa/iot/iotdevice.py +++ b/kasa/iot/iotdevice.py @@ -313,11 +313,6 @@ class IotDevice(Device): device=self, name="RSSI", attribute_getter="rssi", icon="mdi:signal" ) ) - self._add_feature( - Feature( - device=self, name="Time", attribute_getter="time", show_in_hass=False - ) - ) if "on_time" in self._sys_info: self._add_feature( Feature( diff --git a/kasa/iot/iotplug.py b/kasa/iot/iotplug.py index 5182b10c..c7248966 100644 --- a/kasa/iot/iotplug.py +++ b/kasa/iot/iotplug.py @@ -4,7 +4,7 @@ from typing import Any, Dict, Optional from ..device_type import DeviceType from ..deviceconfig import DeviceConfig -from ..feature import Feature, FeatureCategory, FeatureType +from ..feature import Feature, FeatureType from ..protocol import BaseProtocol from .iotdevice import IotDevice, requires_update from .modules import Antitheft, Cloud, Schedule, Time, Usage @@ -64,7 +64,6 @@ class IotPlug(IotDevice): icon="mdi:led-{state}", attribute_getter="led", attribute_setter="set_led", - category=FeatureCategory.Config, type=FeatureType.Switch, ) ) diff --git a/kasa/smart/smartdevice.py b/kasa/smart/smartdevice.py index c9358df6..04b84c38 100644 --- a/kasa/smart/smartdevice.py +++ b/kasa/smart/smartdevice.py @@ -149,11 +149,6 @@ class SmartDevice(Device): icon="mdi:signal", ) ) - self._add_feature( - Feature( - device=self, name="Time", attribute_getter="time", show_in_hass=False - ) - ) self._add_feature( Feature(device=self, name="SSID", attribute_getter="ssid", icon="mdi:wifi") )