mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-04 07:08:21 +00:00
Fix smartstrip for turn on and turn off with no index or name
This commit is contained in:
@@ -127,11 +127,13 @@ class SmartStrip(SmartDevice):
|
|||||||
|
|
||||||
async def turn_on(self, **kwargs):
|
async def turn_on(self, **kwargs):
|
||||||
"""Turn the strip on."""
|
"""Turn the strip on."""
|
||||||
await self._query_helper("system", "set_relay_state", {"state": 1})
|
for plug in self.children:
|
||||||
|
await plug.turn_on()
|
||||||
|
|
||||||
async def turn_off(self, **kwargs):
|
async def turn_off(self, **kwargs):
|
||||||
"""Turn the strip off."""
|
"""Turn the strip off."""
|
||||||
await self._query_helper("system", "set_relay_state", {"state": 0})
|
for plug in self.children:
|
||||||
|
await plug.turn_off()
|
||||||
|
|
||||||
@property # type: ignore
|
@property # type: ignore
|
||||||
@requires_update
|
@requires_update
|
||||||
|
|||||||
Reference in New Issue
Block a user