From 076544a1b5869f5aea63974409446a25d424e182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Fri, 28 May 2021 14:00:16 +0200 Subject: [PATCH] Revert "Bump config version to 2 for AVM Fritz Tools (#51176)" (#51193) --- homeassistant/components/fritz/__init__.py | 20 ------------------- homeassistant/components/fritz/config_flow.py | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/homeassistant/components/fritz/__init__.py b/homeassistant/components/fritz/__init__.py index b310d44a0f9..35e924c807c 100644 --- a/homeassistant/components/fritz/__init__.py +++ b/homeassistant/components/fritz/__init__.py @@ -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] diff --git a/homeassistant/components/fritz/config_flow.py b/homeassistant/components/fritz/config_flow.py index 9d3c9044765..4001dcadc71 100644 --- a/homeassistant/components/fritz/config_flow.py +++ b/homeassistant/components/fritz/config_flow.py @@ -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