Add attribute entity_id to Zone

Now the Zone entities have a state counting the number of person entities in that Zone (thank you) it would be even better if we could immediately see which person entities are counted.

Please add an attribute entity_id to Zone to do that.

we could then easily template:

{{expand(state_attr('zone.home','entity_id')|list}}

thanks for considering

PR to add the state attribute to zone:

PR to make expand compatible with zones:

1 Like

This is so awesome. Thanks Frenck!

Both merged and will be available in 2022.5

1 Like

thanks Frenck, and working! so cool:

1 question: is there a specific reason you chose to use the attribute persons, and not entity_id, as eg on all other platform: group entities, and comparable ‘grouped’ integrations?

it would make it consistent with those if we could iterate any of these type of integration with what I posted in the opening FR:

{{expand(state_attr('zone.home','entity_id')|list}}

as it is now, we need to ‘remember’ the attributes name, and, more importantly, need to explicitly name that in generic templates, making those more complex than necessary.

It was reviewed as such, hence adjusted. Original I had entity_id. Nevertheless, I agree this provides more context in this situation and is a better variable name.

ok thanks Frenck, it does have its merits :wink: