diff --git a/appdaemon/plugins/hass/hassapi.py b/appdaemon/plugins/hass/hassapi.py index ac0090234..6677850c1 100644 --- a/appdaemon/plugins/hass/hassapi.py +++ b/appdaemon/plugins/hass/hassapi.py @@ -1378,7 +1378,7 @@ async def render_template(self, template: str, namespace: str | None = None) -> except (SyntaxError, ValueError): return result - def _template_command(self, command: str, *args: tuple[str, ...]) -> str | list[str]: + def _template_command(self, command: str, *args: str) -> str | list[str]: """Internal AppDaemon function to format calling a single template command correctly.""" if len(args) == 0: return self.render_template(f'{{{{ {command}() }}}}') @@ -1481,6 +1481,10 @@ def integration_entities(self, integration: str) -> list[str]: `_ for more information. """ + entities = self._template_command('integration_entities', integration) + assert isinstance(entities, list) and all(isinstance(e, str) for e in entities), \ + 'Invalid return type from integration_entities' + return entities # Labels # https://www.home-assistant.io/docs/configuration/templating/#labels diff --git a/docs/HISTORY.md b/docs/HISTORY.md index 956285def..7248bbaf5 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -4,7 +4,7 @@ **Features** -None +- Filled in `integration_entities` stub **Fixes**