Warn users only when old config is actually used (#4691)

This commit is contained in:
Stefan Agner 2023-11-10 19:37:02 +01:00 committed by GitHub
parent 78870186d7
commit 68da328cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,7 +267,7 @@ def _migrate_addon_config(protocol=False):
# 2023-10 "config" became "homeassistant" so /config can be used for addon's public config
volumes = [RE_VOLUME.match(entry) for entry in config.get(ATTR_MAP, [])]
if any(volume and volume.group(1) for volume in volumes):
if any(volume and volume.group(1) == MAP_CONFIG for volume in volumes):
if any(
volume
and volume.group(1) in {MAP_ADDON_CONFIG, MAP_HOMEASSISTANT_CONFIG}