mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Allow core integrations to describe their triggers (#147075)
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
This commit is contained in:
@@ -857,15 +857,20 @@ class Integration:
|
||||
# True.
|
||||
return self.manifest.get("import_executor", True)
|
||||
|
||||
@cached_property
|
||||
def has_services(self) -> bool:
|
||||
"""Return if the integration has services."""
|
||||
return "services.yaml" in self._top_level_files
|
||||
|
||||
@cached_property
|
||||
def has_translations(self) -> bool:
|
||||
"""Return if the integration has translations."""
|
||||
return "translations" in self._top_level_files
|
||||
|
||||
@cached_property
|
||||
def has_services(self) -> bool:
|
||||
"""Return if the integration has services."""
|
||||
return "services.yaml" in self._top_level_files
|
||||
def has_triggers(self) -> bool:
|
||||
"""Return if the integration has triggers."""
|
||||
return "triggers.yaml" in self._top_level_files
|
||||
|
||||
@property
|
||||
def mqtt(self) -> list[str] | None:
|
||||
|
||||
Reference in New Issue
Block a user