From 0ea2ff34d468e36f3ee468d59e3322c8c0cf6277 Mon Sep 17 00:00:00 2001 From: Chris <1105672+firstof9@users.noreply.github.com> Date: Sat, 13 Jul 2024 13:32:41 -0700 Subject: [PATCH] fix: workaround for release workflow issue (#951) * fix: workaround for release workflow issue * fix tests * update const in config flow --- custom_components/mail_and_packages/__init__.py | 4 ++-- custom_components/mail_and_packages/config_flow.py | 4 ++-- custom_components/mail_and_packages/const.py | 2 +- tests/conftest.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/mail_and_packages/__init__.py b/custom_components/mail_and_packages/__init__.py index 02308510..00bbd727 100644 --- a/custom_components/mail_and_packages/__init__.py +++ b/custom_components/mail_and_packages/__init__.py @@ -20,7 +20,7 @@ CONF_PATH, CONF_SCAN_INTERVAL, CONF_VERIFY_SSL, - CONFIG_VERSION, + CONFIG_VER, COORDINATOR, DEFAULT_AMAZON_DAYS, DOMAIN, @@ -101,7 +101,7 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> async def async_migrate_entry(hass, config_entry): """Migrate an old config entry.""" version = config_entry.version - new_version = CONFIG_VERSION + new_version = CONFIG_VER _LOGGER.debug("Migrating from version %s", version) updated_config = {**config_entry.data} diff --git a/custom_components/mail_and_packages/config_flow.py b/custom_components/mail_and_packages/config_flow.py index 9910dd9b..75d0631a 100644 --- a/custom_components/mail_and_packages/config_flow.py +++ b/custom_components/mail_and_packages/config_flow.py @@ -31,7 +31,7 @@ CONF_PATH, CONF_SCAN_INTERVAL, CONF_VERIFY_SSL, - CONFIG_VERSION, + CONFIG_VER, DEFAULT_ALLOW_EXTERNAL, DEFAULT_AMAZON_DAYS, DEFAULT_AMAZON_DOMAIN, @@ -263,7 +263,7 @@ def _get_default(key: str, fallback_default: Any = None) -> None: class MailAndPackagesFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): """Config flow for Mail and Packages.""" - VERSION = CONFIG_VERSION + VERSION = CONFIG_VER CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL def __init__(self): diff --git a/custom_components/mail_and_packages/const.py b/custom_components/mail_and_packages/const.py index 8e575da0..d65af466 100644 --- a/custom_components/mail_and_packages/const.py +++ b/custom_components/mail_and_packages/const.py @@ -22,7 +22,7 @@ OVERLAY = ["overlay.png", "vignette.png", "white.png"] SERVICE_UPDATE_FILE_PATH = "update_file_path" CAMERA = "cameras" -CONFIG_VERSION = 9 +CONFIG_VER = 9 # Attributes ATTR_AMAZON_IMAGE = "amazon_image" diff --git a/tests/conftest.py b/tests/conftest.py index e6828776..5b43b403 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,7 +16,7 @@ from custom_components.mail_and_packages.const import ( CONF_AMAZON_DOMAIN, - CONFIG_VERSION, + CONFIG_VER, DOMAIN, ) from tests.const import ( @@ -59,7 +59,7 @@ async def integration_fixture(hass): domain=DOMAIN, title="imap.test.email", data=FAKE_CONFIG_DATA, - version=CONFIG_VERSION, + version=CONFIG_VER, ) entry.add_to_hass(hass) await hass.config_entries.async_setup(entry.entry_id)