Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95451

Template Group Recursion

$
0
0

@danielhitch wrote:

Hi,

Would it be possible to create a jinja2 template that recurses through all groups associated with a specified group, and then list a particular entity type?

Example, I have a large hierarchy of groups as follows:

All -> Indoors -> Upstairs -> Bathroom
    |          |           |
    |          |           -> Bedroom
    |          |
    |          -> Downstairs -> Kitchen
    |                        |
    |                        -> Living Room
    -> Outdoors -> Porch
                |
                -> Garden

Entities will be linked to their lowest level group (i.e. Kitchen).

I would like to use a template which if I specified Upstairs, will list all entities (e.g. switches) of a given type and possibly of a given state.

Is this possible?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>