Fix Packages when using MQTT (#2210)

This commit is contained in:
Paul Monigatti 2021-08-30 09:27:38 +12:00 committed by GitHub
parent b5de43b225
commit 56225701f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1457,7 +1457,11 @@ class OnlyWith(Optional):
if self._component in CORE.raw_config or ( if self._component in CORE.raw_config or (
CONF_PACKAGES in CORE.raw_config CONF_PACKAGES in CORE.raw_config
and self._component and self._component
in {list(x.keys())[0] for x in CORE.raw_config[CONF_PACKAGES].values()} in [
k
for package in CORE.raw_config[CONF_PACKAGES].values()
for k in package.keys()
]
): ):
return self._default return self._default
return vol.UNDEFINED return vol.UNDEFINED