Compare commits

...

4 Commits

Author SHA1 Message Date
Andrey
289f52ef73 fix errors 2021-02-28 22:27:57 +03:00
Andrey
ce589c97b9 fix errors 2021-02-28 22:22:17 +03:00
Andrey
22a6f8f444 fix errors 2021-02-28 22:06:36 +03:00
Andrey
9a53de1d5d fix errors 2021-02-28 22:02:22 +03:00

View File

@@ -100,7 +100,7 @@ class MegaView(HomeAssistantView):
ret = 'd' if hub.force_d else '' ret = 'd' if hub.force_d else ''
if port is not None: if port is not None:
if is_ext(data): if is_ext(data):
ret = '' # пока ответ всегда пустой, неясно какая будет реакция на непустой ответ # ret = '' # пока ответ всегда пустой, неясно какая будет реакция на непустой ответ
if port in hub.extenders: if port in hub.extenders:
pt_orig = port pt_orig = port
else: else:
@@ -126,8 +126,9 @@ class MegaView(HomeAssistantView):
if template is not None: if template is not None:
template.hass = hass template.hass = hass
ret = template.async_render(_data) ret = template.async_render(_data)
hub.lg.debug(f'response={ret}, template={template}')
if ret == 'd' and act: 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 '' ret = 'd' if hub.force_d else ''
else: else:
hub.values[port] = data hub.values[port] = data