Deprecate device level light, effect and led attributes (#916)

Deprecates the attributes at device level for light, light effects, and led. i.e. device.led, device.is_color. Will continue to support consumers using these attributes and emit a warning.
This commit is contained in:
Steven B
2024-05-15 18:49:08 +01:00
committed by GitHub
parent 133a839f22
commit a2e8d2c4e8
10 changed files with 232 additions and 172 deletions

View File

@@ -79,16 +79,6 @@ class IotPlug(IotDevice):
"""Turn the switch off."""
return await self._query_helper("system", "set_relay_state", {"state": 0})
@property # type: ignore
@requires_update
def led(self) -> bool:
"""Return the state of the led."""
return self.modules[Module.Led].led
async def set_led(self, state: bool):
"""Set the state of the led (night mode)."""
return await self.modules[Module.Led].set_led(state)
class IotWallSwitch(IotPlug):
"""Representation of a TP-Link Smart Wall Switch."""