mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 09:04:27 +05:00
fix formating
This commit is contained in:
@@ -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:02}e{idx:02}'
|
||||
pt = f'{pt_orig}e{idx}' if not hub.new_naming else f'{pt_orig:02d}e{idx:02d}'
|
||||
_data['pt_orig'] = pt_orig
|
||||
_data['value'] = 'ON' if v == '1' else 'OFF'
|
||||
_data['m'] = 1 if _data[e] == '0' else 0 # имитация поведения обычного входа, чтобы события обрабатывались аналогично
|
||||
|
||||
Reference in New Issue
Block a user