Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / smart_home / outlets.py
index b9bfe22e694f7645df142c73335492aa41831b50..fcc3c4eb8f7fa74d428d31c7ebe4814c5cb11cbd 100644 (file)
@@ -1,5 +1,7 @@
 #!/usr/bin/env python3
 
+# © Copyright 2021-2022, Scott Gasch
+
 """Utilities for dealing with the smart outlets."""
 
 import asyncio
@@ -87,7 +89,7 @@ class TPLinkOutlet(BaseOutlet):
         cmd = self.get_cmdline() + f"-c {cmd}"
         if extra_args is not None:
             cmd += f" {extra_args}"
-        return tplink.tplink_command(cmd)
+        return tplink.tplink_command_wrapper(cmd)
 
     @overrides
     def turn_on(self) -> bool:
@@ -152,7 +154,7 @@ class TPLinkOutletWithChildren(TPLinkOutlet):
         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)
 
     def get_children(self) -> List[str]:
         return self.children