From c48a3632d299e03edcf548bb93652103544d3831 Mon Sep 17 00:00:00 2001 From: andvikt <39195436+andvikt@users.noreply.github.com> Date: Sun, 28 Feb 2021 13:04:00 +0300 Subject: [PATCH] Update http.py --- custom_components/mega/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/mega/http.py b/custom_components/mega/http.py index f75ea4f..6114349 100644 --- a/custom_components/mega/http.py +++ b/custom_components/mega/http.py @@ -110,7 +110,7 @@ class MegaView(HomeAssistantView): return Response(status=200) for e, v in data.items(): if e.startswith('ext') in data: - idx = e[-1] + idx = e[3:] pt = f'{pt_orig}e{idx}' data['pt_orig'] = pt_orig data['value'] = 'ON' if v == '1' else 'OFF'