From c62a5a2d92d507244fc516a4297a6f29a247408a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=D0=BE=D0=B2=20=D0=90?= =?UTF-8?q?=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=93=D0=B5=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B8=D1=87?= Date: Thu, 26 Aug 2021 11:16:57 +0300 Subject: [PATCH] fix formating --- custom_components/mega/http.py | 2 +- custom_components/mega/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/mega/http.py b/custom_components/mega/http.py index be41a03..0f8a5c4 100644 --- a/custom_components/mega/http.py +++ b/custom_components/mega/http.py @@ -117,7 +117,7 @@ class MegaView(HomeAssistantView): _data = data.copy() if e.startswith('ext'): idx = e[3:] - pt = f'{pt_orig}e{idx}' if not hub.new_naming else f'{pt_orig:02d}e{idx:02d}' + pt = f'{pt_orig}e{idx}' if not hub.new_naming else f'{int(pt_orig):02d}e{int(idx):02d}' _data['pt_orig'] = pt_orig _data['value'] = 'ON' if v == '1' else 'OFF' _data['m'] = 1 if _data[e] == '0' else 0 # имитация поведения обычного входа, чтобы события обрабатывались аналогично diff --git a/custom_components/mega/manifest.json b/custom_components/mega/manifest.json index db88fae..cff7e7f 100644 --- a/custom_components/mega/manifest.json +++ b/custom_components/mega/manifest.json @@ -15,5 +15,5 @@ "@andvikt" ], "issue_tracker": "https://github.com/andvikt/mega_hacs/issues", - "version": "v1.0.9b2" + "version": "v1.0.9b3" } \ No newline at end of file