power: fix tasmota command encoding

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-03-24 14:46:46 -04:00
parent ac8c44095a
commit 1bdedd009f
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 2 additions and 2 deletions

View File

@ -868,9 +868,9 @@ class Tasmota(HTTPDevice):
password: Optional[str] = None
) -> Dict[str, Any]:
if command in ["on", "off"]:
out_cmd = f"Power{self.output_id}%20{command}"
out_cmd = f"Power{self.output_id} {command}"
if self.timer != "" and command == "off":
out_cmd = f"Backlog%20Delay%20{self.timer}0%3B%20{out_cmd}"
out_cmd = f"Backlog Delay {self.timer}0; {out_cmd}"
elif command == "info":
out_cmd = f"Power{self.output_id}"
else: