1 """The Home Assistant SkyConnect integration."""
3 from __future__
import annotations
11 _LOGGER = logging.getLogger(__name__)
15 """Set up a Home Assistant SkyConnect config entry."""
20 """Unload a config entry."""
25 """Migrate old entry."""
28 "Migrating from version %s:%s", config_entry.version, config_entry.minor_version
31 if config_entry.version == 1:
32 if config_entry.minor_version == 1:
37 hass, config_entry.data[
"device"]
40 new_data = {**config_entry.data}
41 new_data[
"firmware"] = firmware_guess.firmware_type.value
44 new_data[
"product"] = new_data[
"description"]
46 hass.config_entries.async_update_entry(
54 "Migration to version %s.%s successful",
56 config_entry.minor_version,
FirmwareGuess guess_firmware_type(HomeAssistant hass, str device_path)
bool async_setup_entry(HomeAssistant hass, ConfigEntry entry)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_migrate_entry(HomeAssistant hass, ConfigEntry config_entry)