From e32db2464b59d045c48e1427bea70cd428a216c0 Mon Sep 17 00:00:00 2001 From: Ola Thoresen Date: Mon, 8 Aug 2022 16:30:09 +0200 Subject: [PATCH] Fix #30 --- custom_components/plant/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/plant/__init__.py b/custom_components/plant/__init__.py index 636aff2..4083aad 100644 --- a/custom_components/plant/__init__.py +++ b/custom_components/plant/__init__.py @@ -44,6 +44,7 @@ ATTR_TEMPERATURE, DATA_SOURCE, DOMAIN, + DOMAIN_PLANTBOOK, FLOW_CONDUCTIVITY_TRIGGER, FLOW_DLI_TRIGGER, FLOW_HUMIDITY_TRIGGER, @@ -111,8 +112,9 @@ async def async_setup(hass: HomeAssistant, config: dict): if not config_entry: _LOGGER.debug("Old setup - with config: %s", config[DOMAIN]) for plant in config[DOMAIN]: - _LOGGER.warning("Migrating plant: %s", plant) - await async_migrate_plant(hass, plant, config[DOMAIN][plant]) + if plant != DOMAIN_PLANTBOOK: + _LOGGER.warning("Migrating plant: %s", plant) + await async_migrate_plant(hass, plant, config[DOMAIN][plant]) else: _LOGGER.warning( "Config already imported. Please delete all your %s related config from configuration.yaml",