The Wayback Machine - https://web.archive.org/web/20200521092958/https://github.com/home-assistant/core/issues/34715
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateAssertionError: no filter named 'expand' #34715

Open
jamieshaw opened this issue Apr 26, 2020 · 1 comment
Open

TemplateAssertionError: no filter named 'expand' #34715

jamieshaw opened this issue Apr 26, 2020 · 1 comment

Comments

@jamieshaw
Copy link

@jamieshaw jamieshaw commented Apr 26, 2020

The problem

Despite being documented, using expand as a filter (i.e. ['group.users']|expand) is flagged as invalid checking the configuration files.

Environment

  • Home Assistant Core release with the issue: 0.108.9
  • Last working Home Assistant Core release (if known): N/A
  • Operating environment (Home Assistant/Supervised/Docker/venv): venv
  • Integration causing this issue: template
  • Link to integration documentation on our website: https://www.home-assistant.io/docs/configuration/templating/

Problem-relevant configuration.yaml

{%- set enti = (entities.split(',') if entities is string else entities)|map('trim')|list -%}
{{
    enti|expand
    |map(attribute="entity_id")|reject('eq','')
    |unique|sort
    |tojson
}}

Traceback/Error logs

Invalid config for [script]: invalid template (TemplateAssertionError: no filter named 'expand') for dictionary value @…

Additional information

@probot-home-assistant
Copy link

@probot-home-assistant probot-home-assistant bot commented Apr 26, 2020

Hey there @PhracturedBlue, @tetienne, mind taking a look at this issue as its been labeled with a integration (template) you are listed as a codeowner for? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.