Move has_emeter to device level for multiple plug outlets (#41)

This commit is contained in:
Andrew May
2020-04-12 07:00:15 -07:00
committed by GitHub
parent c90465c5dd
commit b6c3a7c54b
3 changed files with 8 additions and 26 deletions

View File

@@ -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: