mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 01:24:29 +05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c48a3632d2 | ||
|
|
e06ba65ead |
@@ -63,7 +63,7 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||||||
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
"""Handle a config flow for mega."""
|
"""Handle a config flow for mega."""
|
||||||
|
|
||||||
VERSION = 13
|
VERSION = 14
|
||||||
CONNECTION_CLASS = config_entries.CONN_CLASS_ASSUMED
|
CONNECTION_CLASS = config_entries.CONN_CLASS_ASSUMED
|
||||||
|
|
||||||
async def async_step_user(self, user_input=None):
|
async def async_step_user(self, user_input=None):
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ class MegaView(HomeAssistantView):
|
|||||||
return Response(status=200)
|
return Response(status=200)
|
||||||
for e, v in data.items():
|
for e, v in data.items():
|
||||||
if e.startswith('ext') in data:
|
if e.startswith('ext') in data:
|
||||||
idx = e[-1]
|
idx = e[3:]
|
||||||
pt = f'{pt_orig}e{idx}'
|
pt = f'{pt_orig}e{idx}'
|
||||||
data['pt_orig'] = pt_orig
|
data['pt_orig'] = pt_orig
|
||||||
data['value'] = 'ON' if v == '1' else 'OFF'
|
data['value'] = 'ON' if v == '1' else 'OFF'
|
||||||
|
|||||||
Reference in New Issue
Block a user