This commit is contained in:
Andrey
2021-02-18 12:36:43 +03:00
parent 4f8f38fde6
commit 75a41c9667
3 changed files with 6 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ async def validate_input(hass: core.HomeAssistant, data):
class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle a config flow for mega."""
VERSION = 6
VERSION = 7
CONNECTION_CLASS = config_entries.CONN_CLASS_ASSUMED
async def async_step_user(self, user_input=None):

View File

@@ -84,7 +84,7 @@ class MegaView(HomeAssistantView):
return ret
async def later_update(self, hub):
_LOGGER.debug('force update')
await asyncio.sleep(1)
_LOGGER.debug('force update')
await hub.updater.async_refresh()

View File

@@ -260,7 +260,10 @@ class MegaD:
if 'busy' in ret:
return None
if ':' in ret:
if ';' in ret:
ret = ret.split(';')
elif '/' in ret:
ret = ret.split('/')
ret = {'value': dict([
x.split(':') for x in ret if x.count(':') == 1
])}