Skip to content

Commit

Permalink
fix: workaround for release workflow issue (#951)
Browse files Browse the repository at this point in the history
* fix: workaround for release workflow issue

* fix tests

* update const in config flow
  • Loading branch information
firstof9 authored Jul 13, 2024
1 parent 9d26338 commit 0ea2ff3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions custom_components/mail_and_packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
CONF_PATH,
CONF_SCAN_INTERVAL,
CONF_VERIFY_SSL,
CONFIG_VERSION,
CONFIG_VER,
COORDINATOR,
DEFAULT_AMAZON_DAYS,
DOMAIN,
Expand Down Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions custom_components/mail_and_packages/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/mail_and_packages/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from custom_components.mail_and_packages.const import (
CONF_AMAZON_DOMAIN,
CONFIG_VERSION,
CONFIG_VER,
DOMAIN,
)
from tests.const import (
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0ea2ff3

Please sign in to comment.