mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 00:54:28 +05:00
fix i2c
This commit is contained in:
@@ -57,7 +57,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 = 6
|
VERSION = 7
|
||||||
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):
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class MegaView(HomeAssistantView):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
async def later_update(self, hub):
|
async def later_update(self, hub):
|
||||||
_LOGGER.debug('force update')
|
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
_LOGGER.debug('force update')
|
||||||
await hub.updater.async_refresh()
|
await hub.updater.async_refresh()
|
||||||
|
|
||||||
|
|||||||
@@ -260,7 +260,10 @@ class MegaD:
|
|||||||
if 'busy' in ret:
|
if 'busy' in ret:
|
||||||
return None
|
return None
|
||||||
if ':' in ret:
|
if ':' in ret:
|
||||||
ret = ret.split(';')
|
if ';' in ret:
|
||||||
|
ret = ret.split(';')
|
||||||
|
elif '/' in ret:
|
||||||
|
ret = ret.split('/')
|
||||||
ret = {'value': dict([
|
ret = {'value': dict([
|
||||||
x.split(':') for x in ret if x.count(':') == 1
|
x.split(':') for x in ret if x.count(':') == 1
|
||||||
])}
|
])}
|
||||||
|
|||||||
Reference in New Issue
Block a user