Merge pull request #58 from andvikt/fix/57

Fix/57
This commit is contained in:
andvikt
2021-09-15 14:02:52 +03:00
committed by GitHub
3 changed files with 24 additions and 3 deletions

21
.bumpversion.cfg Normal file
View File

@@ -0,0 +1,21 @@
[bumpversion]
current_version = 1.0.10b0
parse = (?P<major>\d+)(\.(?P<minor>\d+))(\.(?P<patch>\d))(?P<release>[bf]*)(?P<build>\d*)
commit = True
tag = True
serialize =
{major}.{minor}.{patch}{release}{build}
{major}.{minor}.{patch}
[bumpversion:part:release]
optional_value = f
values =
b
f
[bumpversion:part:build]
first_value = 0
[bumpversion:file:custom_components/mega/manifest.json]
search = "version": "v{current_version}"
replace = "version": "v{new_version}"

View File

@@ -210,7 +210,7 @@ async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
id = entry.data.get('id', entry.entry_id)
hub: MegaD = hass.data[DOMAIN].get(id)
if hub is None:
return
return True
_LOGGER.debug(f'remove {id}')
_hubs.pop(id, None)
hass.data[DOMAIN].pop(id, None)
@@ -221,7 +221,7 @@ async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
if task is not None:
task.cancel()
if hub is None:
return
return True
await hub.stop()
return True

View File

@@ -15,5 +15,5 @@
"@andvikt"
],
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
"version": "v1.0.9"
"version": "v1.0.10b0"
}