diff --git a/custom_components/husqvarna_automower/__init__.py b/custom_components/husqvarna_automower/__init__.py index 72b7772..295cca9 100644 --- a/custom_components/husqvarna_automower/__init__.py +++ b/custom_components/husqvarna_automower/__init__.py @@ -168,7 +168,7 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry): MOWER_IMG_PATH, MAP_IMG_PATH, ]: - new_options.pop(opt_key) + new_options.pop(opt_key, None) config_entry.version = CURRENT_CONFIG_VER hass.config_entries.async_update_entry(config_entry, options=new_options) diff --git a/custom_components/husqvarna_automower/config_flow.py b/custom_components/husqvarna_automower/config_flow.py index 5a02df3..c4982a1 100644 --- a/custom_components/husqvarna_automower/config_flow.py +++ b/custom_components/husqvarna_automower/config_flow.py @@ -435,7 +435,9 @@ async def async_step_camera_config(self, user_input=None): ] else: errors[HOME_LOCATION] = pnt_error - self.options[self.sel_mower_id][ADD_CAMERAS] = user_input.get(ADD_CAMERAS) + self.options[self.sel_mower_id][ADD_CAMERAS] = user_input.get( + ADD_CAMERAS, [] + ) if not errors: return await self._update_config()