Skip to content

Commit

Permalink
Small improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsK1 committed Nov 27, 2024
1 parent 47f5423 commit 8919b7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/solvis_control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):

new_data = {**config_entry.data}
if config_entry.minor_version < 3:
_LOGGER.info(f"Migrating from version {config_entry.version}")
_LOGGER.info(f"Migrating from version {config_entry.version}_{config_entry.minor_version}")
if CONF_OPTION_1 not in new_data:
new_data[CONF_OPTION_1] = False
if CONF_OPTION_2 not in new_data:
Expand All @@ -132,12 +132,12 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):
new_data[DEVICE_VERSION] = "SC3"
config_entry.minor_version = 3
if config_entry.minor_version < 4:
_LOGGER.info(f"Migrating from version {config_entry.version}")
_LOGGER.info(f"Migrating from version {config_entry.version}_{config_entry.minor_version}")
if POLL_RATE_DEFAULT not in new_data:
new_data[POLL_RATE_DEFAULT] = 30
if POLL_RATE_SLOW not in new_data:
new_data[POLL_RATE_SLOW] = 300
config_entry.minor_version = 4
hass.config_entries.async_update_entry(config_entry, data=new_data)
_LOGGER.info(f"Migration to version {config_entry.version} successful")
_LOGGER.info(f"Migration to version {config_entry.version}_{config_entry.minor_version} successful")
return True

0 comments on commit 8919b7f

Please sign in to comment.