mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
This commit is contained in:
parent
fe0771f7f1
commit
076544a1b5
@ -3,10 +3,6 @@ import logging
|
||||
|
||||
from fritzconnection.core.exceptions import FritzConnectionException, FritzSecurityError
|
||||
|
||||
from homeassistant.components.device_tracker.const import (
|
||||
CONF_CONSIDER_HOME,
|
||||
DEFAULT_CONSIDER_HOME,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
@ -67,22 +63,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
|
||||
"""Migrate config entry."""
|
||||
_LOGGER.debug("Migrating from version %s", config_entry.version)
|
||||
|
||||
if config_entry.version == 1:
|
||||
config_entry.version = 2
|
||||
hass.config_entries.async_update_entry(
|
||||
config_entry,
|
||||
options={CONF_CONSIDER_HOME: DEFAULT_CONSIDER_HOME.total_seconds()},
|
||||
)
|
||||
|
||||
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload FRITZ!Box Tools config entry."""
|
||||
fritzbox: FritzBoxTools = hass.data[DOMAIN][entry.entry_id]
|
||||
|
@ -38,7 +38,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
class FritzBoxToolsFlowHandler(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a FRITZ!Box Tools config flow."""
|
||||
|
||||
VERSION = 2
|
||||
VERSION = 1
|
||||
|
||||
@staticmethod
|
||||
@callback
|
||||
|
Loading…
x
Reference in New Issue
Block a user