Require core config detection to be triggerd manually (#24019)
* Detect core config * Remove elevation * Lint * Lint * Fix type
This commit is contained in:
1 parent
f207e01510
commit
9e96397e6a
12 files changed
+188
-323
No files matched your search
@@ -3,10 +3,11 @@ from homeassistant.core import callback
|
||||
from homeassistant.loader import bind_hass
|
||||
from homeassistant.helpers.storage import Store
|
||||
|
||||
from .const import DOMAIN, STEP_USER, STEPS, STEP_INTEGRATION
|
||||
from .const import (
|
||||
DOMAIN, STEP_USER, STEPS, STEP_INTEGRATION, STEP_CORE_CONFIG)
|
||||
|
||||
STORAGE_KEY = DOMAIN
|
||||
STORAGE_VERSION = 2
|
||||
STORAGE_VERSION = 3
|
||||
|
||||
|
||||
class OnboadingStorage(Store):
|
||||
@@ -15,7 +16,10 @@ class OnboadingStorage(Store):
|
||||
async def _async_migrate_func(self, old_version, old_data):
|
||||
"""Migrate to the new version."""
|
||||
# From version 1 -> 2, we automatically mark the integration step done
|
||||
old_data['done'].append(STEP_INTEGRATION)
|
||||
if old_version < 2:
|
||||
old_data['done'].append(STEP_INTEGRATION)
|
||||
if old_version < 3:
|
||||
old_data['done'].append(STEP_CORE_CONFIG)
|
||||
return old_data
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user