diff --git a/homeassistant/components/blink/__init__.py b/homeassistant/components/blink/__init__.py index c9c03dc654db..1cef331c0bb2 100644 --- a/homeassistant/components/blink/__init__.py +++ b/homeassistant/components/blink/__init__.py @@ -67,11 +67,15 @@ async def async_setup(hass, config): async def async_migrate_entry(hass, entry): """Handle migration of a previous version config entry.""" + _LOGGER.debug("Migrating from version %s", entry.version) data = {**entry.data} if entry.version == 1: data.pop("login_response", None) await hass.async_add_executor_job(_reauth_flow_wrapper, hass, data) return False + if entry.version == 2: + await hass.async_add_executor_job(_reauth_flow_wrapper, hass, data) + return False return True @@ -148,7 +152,7 @@ async def async_unload_entry(hass, entry): return True hass.services.async_remove(DOMAIN, SERVICE_REFRESH) - hass.services.async_remove(DOMAIN, SERVICE_SAVE_VIDEO_SCHEMA) + hass.services.async_remove(DOMAIN, SERVICE_SAVE_VIDEO) hass.services.async_remove(DOMAIN, SERVICE_SEND_PIN) return True diff --git a/homeassistant/components/blink/config_flow.py b/homeassistant/components/blink/config_flow.py index 5c77add31185..c6c3f0b27bee 100644 --- a/homeassistant/components/blink/config_flow.py +++ b/homeassistant/components/blink/config_flow.py @@ -44,7 +44,7 @@ def _send_blink_2fa_pin(auth, pin): class BlinkConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Handle a Blink config flow.""" - VERSION = 2 + VERSION = 3 CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL def __init__(self): diff --git a/tests/components/blink/test_config_flow.py b/tests/components/blink/test_config_flow.py index 912649977698..f7dc89b4cbb6 100644 --- a/tests/components/blink/test_config_flow.py +++ b/tests/components/blink/test_config_flow.py @@ -273,7 +273,7 @@ async def test_options_flow(hass): data={"username": "blink@example.com", "password": "example"}, options={}, entry_id=1, - version=2, + version=3, ) config_entry.add_to_hass(hass)