diff --git a/custom_components/mega/config_flow.py b/custom_components/mega/config_flow.py index 45fa5e2..60485ce 100644 --- a/custom_components/mega/config_flow.py +++ b/custom_components/mega/config_flow.py @@ -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): diff --git a/custom_components/mega/http.py b/custom_components/mega/http.py index 08b490d..5812938 100644 --- a/custom_components/mega/http.py +++ b/custom_components/mega/http.py @@ -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() diff --git a/custom_components/mega/hub.py b/custom_components/mega/hub.py index fbdd1e7..5ff0c97 100644 --- a/custom_components/mega/hub.py +++ b/custom_components/mega/hub.py @@ -260,7 +260,10 @@ class MegaD: if 'busy' in ret: return None if ':' in ret: - ret = ret.split(';') + 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 ])}