projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add inital cut of iter_utils with a coupel of iters I needed. Tweak
[python_utils.git]
/
smart_home
/
lights.py
diff --git
a/smart_home/lights.py
b/smart_home/lights.py
index 9a5a2311ee516587e2515ae8e1c30be716c26e0d..ee23fb08f4e60ef4664338cde7e53bdefd340544 100644
(file)
--- a/
smart_home/lights.py
+++ b/
smart_home/lights.py
@@
-1,5
+1,7
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
+# © Copyright 2021-2022, Scott Gasch
+
"""Utilities for dealing with the smart lights."""
import datetime
"""Utilities for dealing with the smart lights."""
import datetime
@@
-283,7
+285,7
@@
class TPLinkLight(BaseLight):
if extra_args is not None:
cmd += f" {extra_args}"
logger.debug('About to execute: %s', cmd)
if extra_args is not None:
cmd += f" {extra_args}"
logger.debug('About to execute: %s', cmd)
- return tplink.tplink_command(cmd)
+ return tplink.tplink_command
_wrapper
(cmd)
@overrides
def turn_on(self) -> bool:
@overrides
def turn_on(self) -> bool:
@@
-365,7
+367,7
@@
class TPLinkLight(BaseLight):
self.get_cmdline()
+ '-j \'{"smartlife.iot.dimmer":{"set_brightness":{"brightness":%d}}}\'' % level
)
self.get_cmdline()
+ '-j \'{"smartlife.iot.dimmer":{"set_brightness":{"brightness":%d}}}\'' % level
)
- return tplink.tplink_command(cmd)
+ return tplink.tplink_command
_wrapper
(cmd)
# class GoogleLightGroup(GoogleLight):
# class GoogleLightGroup(GoogleLight):