projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bunch of changes...
[python_utils.git]
/
smart_home
/
lights.py
diff --git
a/smart_home/lights.py
b/smart_home/lights.py
index 1c4081c750fe9fb3d6ea2a472fb66240b7299f55..e23569a69f60d35056faa1a795be536a3d103933 100644
(file)
--- a/
smart_home/lights.py
+++ b/
smart_home/lights.py
@@
-318,7
+318,10
@@
class TPLinkLight(BaseLight):
@overrides
def is_on(self) -> bool:
@overrides
def is_on(self) -> bool:
- return self.get_on_duration_seconds() > 0
+ self.info = self.get_info()
+ if self.info is None:
+ raise Exception('Unable to get info?')
+ return self.info.get("relay_state", "0") == "1"
@overrides
def is_off(self) -> bool:
@overrides
def is_off(self) -> bool: