mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
Adds model check to current_consumption() and removes whitespace
This commit is contained in:
parent
605abfdebb
commit
dc3de3fa10
@ -203,7 +203,6 @@ class SmartPlug(object):
|
||||
True: Success
|
||||
False: Failure or not supported by switch
|
||||
"""
|
||||
|
||||
if self.model == 100:
|
||||
return False
|
||||
|
||||
@ -216,6 +215,8 @@ class SmartPlug(object):
|
||||
|
||||
def current_consumption(self):
|
||||
"""Get the current power consumption in Watt."""
|
||||
if self.model == 100:
|
||||
return False
|
||||
|
||||
response = self.get_emeter_realtime()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user