mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-13 10:58:02 +00:00
Move has_emeter to device level for multiple plug outlets (#41)
This commit is contained in:
@@ -45,10 +45,6 @@ class SmartStrip(SmartDevice):
|
||||
and should be handled by the user of the library.
|
||||
"""
|
||||
|
||||
def has_emeter(self) -> bool:
|
||||
"""Return True as strips has always an emeter."""
|
||||
return True
|
||||
|
||||
def __init__(self, host: str, *, cache_ttl: int = 3) -> None:
|
||||
super().__init__(host=host)
|
||||
self.emeter_type = "emeter"
|
||||
@@ -281,12 +277,6 @@ class SmartStripPlug(SmartPlug):
|
||||
"""
|
||||
return f"{self.mac}_{self.child_id}"
|
||||
|
||||
@property # type: ignore
|
||||
@requires_update
|
||||
def has_emeter(self):
|
||||
"""Single sockets have always an emeter."""
|
||||
return True
|
||||
|
||||
@property # type: ignore
|
||||
@requires_update
|
||||
def alias(self) -> str:
|
||||
|
Reference in New Issue
Block a user