X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=smart_home%2Flights.py;h=ac1cc885f94973a74f3b7dabcb41f45a9dbac957;hb=dfc2136113428b99719c49a57d3ce68391dcb307;hp=240e7da84412f089702b7b50bd4ce5b5080ca0eb;hpb=6ba90a1f30f1c0cf4df12fcd0c62181f29bc3668;p=python_utils.git diff --git a/smart_home/lights.py b/smart_home/lights.py index 240e7da..ac1cc88 100644 --- a/smart_home/lights.py +++ b/smart_home/lights.py @@ -124,15 +124,11 @@ class GoogleLight(BaseLight): @overrides def turn_on(self) -> bool: - return GoogleLight.parse_google_response( - ask_google(f"turn {self.goog_name()} on") - ) + return GoogleLight.parse_google_response(ask_google(f"turn {self.goog_name()} on")) @overrides def turn_off(self) -> bool: - return GoogleLight.parse_google_response( - ask_google(f"turn {self.goog_name()} off") - ) + return GoogleLight.parse_google_response(ask_google(f"turn {self.goog_name()} off")) @overrides def status(self) -> str: @@ -187,9 +183,7 @@ class GoogleLight(BaseLight): @overrides def make_color(self, color: str) -> bool: - return GoogleLight.parse_google_response( - ask_google(f"make {self.goog_name()} {color}") - ) + return GoogleLight.parse_google_response(ask_google(f"make {self.goog_name()} {color}")) class TuyaLight(BaseLight): @@ -335,6 +329,7 @@ class TPLinkLight(BaseLight): @timeout(10.0, use_signals=False, error_message="Timed out waiting for tplink.py") def get_info(self) -> Optional[Dict]: cmd = self.get_cmdline() + "-c info" + logger.debug(f'Getting status of {self.mac} via "{cmd}"...') out = subprocess.getoutput(cmd) logger.debug(f'RAW OUT> {out}') out = re.sub("Sent:.*\n", "", out)