Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Ludeeus
a1fa495bb6 Disable instad of hard block integrations with version issues 2022-02-16 18:49:40 +00:00

View file

@ -350,7 +350,10 @@ class Integration:
"See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details",
integration.domain,
)
return None
integration.disable(
"Does not have a version defined in the manifest file"
)
return integration
try:
AwesomeVersion(
integration.version,
@ -370,7 +373,9 @@ class Integration:
integration.domain,
integration.version,
)
return None
integration.disable(
f"Does not have a valid version ({integration.version})"
)
return integration
return None
@ -543,6 +548,10 @@ class Integration:
return self._all_dependencies_resolved
def disable(self, reason: str) -> None:
"""Disable the integration."""
self.manifest["disabled"] = reason
def get_component(self) -> ModuleType:
"""Return the component."""
cache: dict[str, ModuleType] = self.hass.data.setdefault(DATA_COMPONENTS, {})