Skip to content

Commit

Permalink
Fix incorrect service name created after conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Dec 1, 2022
1 parent d054a46 commit 41ccbde
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/o365/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
CONF_ACCOUNT_NAME,
CONF_CONFIG_TYPE,
DOMAIN,
LEGACY_ACCOUNT_NAME,
PERM_MAIL_SEND,
PERM_MINIMUM_SEND,
)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 41ccbde

Please sign in to comment.