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