Using variable / helper for grouping entities and reducing redundancy

I agree with petro. This isn’t a healthy Sensor Group Helper entity (state is unavailable and it lacks an entity_id attribute).

I also agree you should create a traditional group entity (now called a legacy group) as opposed to a Sensor Group Helper.

The template I originally suggested assumes your Sensor Group Helper is functional, but in fact it isn’t. After you create a functional Group entity, my template should work.

1 Like

I will try, thanks so long… Stay tuned :wink:

Now it works… Thanks a lot! My first automation and then such a “problem” :wink:

Your original question asked:

You had already created a Sensor Group Helper but didn’t realize you can use its entity_id attribute to achieve your goal of reducing redundancy. The solution to your question is to expand its entity_id attribute.

Obviously the ability to expand the entity_id attribute depends on it actually existing. The complication was that you had created an invalid Sensor Group Helper that lacked an entity_id attribute. That was a secondary issue to be resolved, not the primary one requested in your first post.

Simply making a legacy Group entity doesn’t solve your original request to reduce redundancy. It’s the use of “expand the entity_id attribute” that’s responsible for reducing redundancy. It’s the answer to your original question.

If you doubt it, consider how other users will interpret the chosen Solution post. The solution to reduce redundancy is by … creating a legacy Group entity. That’s misleading. Not only is a legacy Group not always needed (just in this isolated case) it alone doesn’t reduce redundant code. You have to use a template to expand its entity_id attribute.