Fix dimmer level JSON command.
authorScott Gasch <[email protected]>
Thu, 17 Feb 2022 20:01:10 +0000 (12:01 -0800)
committerScott Gasch <[email protected]>
Thu, 17 Feb 2022 20:01:10 +0000 (12:01 -0800)
smart_home/lights.py

index fd9a091cb0b8be8b0669857b8c274bd54e89eb5d..096e0de6b6812fc2c8f17110e96f227b8d5fe649 100644 (file)
@@ -361,8 +361,7 @@ class TPLinkLight(BaseLight):
             return False
         cmd = (
             self.get_cmdline()
-            + '-j \'{{"smartlife.iot.dimmer":{{"set_brightness":{{"brightness":{%d} }} }} }}\''
-            % level
+            + '-j \'{"smartlife.iot.dimmer":{"set_brightness":{"brightness":%d}}}\'' % level
         )
         return tplink.tplink_command(cmd)