mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Deprecate is_something attributes (#912)
Deprecates the is_something attributes like is_bulb and is_dimmable in favour of the modular approach.
This commit is contained in:
@@ -14,7 +14,6 @@ from ..deviceconfig import DeviceConfig
|
||||
from ..emeterstatus import EmeterStatus
|
||||
from ..exceptions import AuthenticationError, DeviceError, KasaException, SmartErrorCode
|
||||
from ..feature import Feature
|
||||
from ..interfaces.light import LightPreset
|
||||
from ..module import Module
|
||||
from ..modulemapping import ModuleMapping, ModuleName
|
||||
from ..smartprotocol import SmartProtocol
|
||||
@@ -444,11 +443,6 @@ class SmartDevice(Device):
|
||||
"""Return if the device has emeter."""
|
||||
return Module.Energy in self.modules
|
||||
|
||||
@property
|
||||
def is_dimmer(self) -> bool:
|
||||
"""Whether the device acts as a dimmer."""
|
||||
return self.is_dimmable
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
"""Return true if the device is on."""
|
||||
@@ -648,8 +642,3 @@ class SmartDevice(Device):
|
||||
return DeviceType.Thermostat
|
||||
_LOGGER.warning("Unknown device type, falling back to plug")
|
||||
return DeviceType.Plug
|
||||
|
||||
@property
|
||||
def presets(self) -> list[LightPreset]:
|
||||
"""Return a list of available bulb setting presets."""
|
||||
return []
|
||||
|
Reference in New Issue
Block a user