mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-07-07 04:00:05 +00:00
Fix smartstrip for turn on and turn off with no index or name
This commit is contained in:
parent
eadf1203fc
commit
e0b6f09fda
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user