From f91e42546323f5e75911619e899cd58cb69a87c9 Mon Sep 17 00:00:00 2001 From: Arksine Date: Fri, 25 Dec 2020 19:30:21 -0500 Subject: [PATCH] power: fix formatting issues with tasmota impelmentation Signed-off-by: Eric Callahan --- moonraker/plugins/power.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/moonraker/plugins/power.py b/moonraker/plugins/power.py index 4720a89..75bcd22 100644 --- a/moonraker/plugins/power.py +++ b/moonraker/plugins/power.py @@ -351,11 +351,12 @@ class Tasmota: if command in ["on", "off"]: out_cmd = f"Power{self.output_id}%20{command}" elif command == "info": - out_cmd = "Power{self.output_id}" + out_cmd = f"Power{self.output_id}" else: raise self.server.error(f"Invalid tasmota command: {command}") - - url = f"http://{self.addr}/cm?user=admin&password={self.password}&cmnd={out_cmd}" + + url = f"http://{self.addr}/cm?user=admin&password=" \ + f"{self.password}&cmnd={out_cmd}" data = "" http_client = AsyncHTTPClient() try: