From 289f52ef734c85df282d38a4b2c0303ffdbf5afb Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 28 Feb 2021 22:27:57 +0300 Subject: [PATCH] fix errors --- custom_components/mega/http.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/mega/http.py b/custom_components/mega/http.py index 6c00829..4dba493 100644 --- a/custom_components/mega/http.py +++ b/custom_components/mega/http.py @@ -127,9 +127,8 @@ class MegaView(HomeAssistantView): template.hass = hass ret = template.async_render(_data) hub.lg.debug(f'response={ret}, template={template}') - ret = ret.replace(':3', f':{v}') if ret == 'd' and act: - await hub.request(cmd=act) + await hub.request(cmd=act.replace(':3', f':{v}')) ret = 'd' if hub.force_d else '' else: hub.values[port] = data