I’m trying to modify the developer tools demo template. Original is:
{% for state in states.weather -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name | lower }} is {{state.state_with_unit}}
{%- endfor %}.
I want to change “states.weather” to “states.sensor.pentair*” (pentair has several sub entities); is this possible? I tried using * but it doesn’t work.
My problem is it’s not the word pentair. It’s pentair_4563_randomword. That’s why I need a wild card character to fetch all of the pentair names. Around thirty. Is this not possible?
{% for state in states.binary_sensor if 'pentair_' in state.name -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name | lower }} is {{state.state_with_unit}}
{%- endfor %}.
It should pick up all the binary_sensor.pentair_* entities.