diff --git a/custom_components/o365/notify.py b/custom_components/o365/notify.py index 4fa5e85..03cfd75 100644 --- a/custom_components/o365/notify.py +++ b/custom_components/o365/notify.py @@ -20,6 +20,7 @@ CONF_ACCOUNT_NAME, CONF_CONFIG_TYPE, DOMAIN, + LEGACY_ACCOUNT_NAME, PERM_MAIL_SEND, PERM_MINIMUM_SEND, ) @@ -61,7 +62,10 @@ def __init__(self, account, hass, config): ) self._cleanup_files = [] self._hass = hass - if account_name := config.get(CONF_ACCOUNT_NAME, None): + account_name = config.get(CONF_ACCOUNT_NAME, None) + if account_name == LEGACY_ACCOUNT_NAME: + account_name = "" + elif account_name: account_name = f"_{account_name}" self._account_name = account_name