mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-04-27 09:06:24 +00:00
strip unused
This commit is contained in:
parent
ff756a7a79
commit
6f821707a0
@ -393,12 +393,6 @@ class SmartDevice:
|
||||
sys_info = self.sys_info
|
||||
return str(sys_info["alias"])
|
||||
|
||||
@property # type: ignore
|
||||
@requires_update
|
||||
def has_children(self) -> bool:
|
||||
"""Check if the device has children devices."""
|
||||
return bool(self._sys_info.get("child_num"))
|
||||
|
||||
async def set_alias(self, alias: str) -> None:
|
||||
"""Set the device name (alias)."""
|
||||
return await self._query_helper("system", "set_dev_alias", {"alias": alias})
|
||||
|
@ -170,16 +170,6 @@ async def test_representation(dev):
|
||||
assert pattern.match(str(dev))
|
||||
|
||||
|
||||
async def test_children(dev):
|
||||
"""Make sure that children property is exposed by every device."""
|
||||
if dev.is_strip:
|
||||
assert len(dev.children) > 0
|
||||
assert dev.has_children is True
|
||||
else:
|
||||
assert len(dev.children) == 0
|
||||
assert dev.has_children is False
|
||||
|
||||
|
||||
async def test_internal_state(dev):
|
||||
"""Make sure the internal state returns the last update results."""
|
||||
assert dev.internal_state == dev._last_update
|
||||
|
Loading…
x
Reference in New Issue
Block a user