Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion appdaemon/plugins/hass/hassapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}() }}}}')
Expand Down Expand Up @@ -1481,6 +1481,10 @@ def integration_entities(self, integration: str) -> list[str]:
<https://www.home-assistant.io/docs/configuration/templating/#entities-for-an-integration>`_ 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
Expand Down
2 changes: 1 addition & 1 deletion docs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Features**

None
- Filled in `integration_entities` stub

**Fixes**

Expand Down
Loading