diff --git a/esphome/config_validation.py b/esphome/config_validation.py index 51f908c113..371ae0eea1 100644 --- a/esphome/config_validation.py +++ b/esphome/config_validation.py @@ -1170,8 +1170,8 @@ class OnlyWith(Optional): # pylint: disable=unsupported-membership-test if (self._component in CORE.raw_config or (CONF_PACKAGES in CORE.raw_config and - self._component in - {list(x.keys())[0] for x in CORE.raw_config[CONF_PACKAGES].values()})): + self._component in + {list(x.keys())[0] for x in CORE.raw_config[CONF_PACKAGES].values()})): return self._default return vol.UNDEFINED