"Group" entities of different domains

I need to “group” 2 entities of different domains. One is a switch. and the other is a number… The number. entity will always be either 1 or 0 (on or off). Possible? I’m going to assume if this is possible it will require yaml and templating, so if anyone responding can provide VERY clear examples, I would appreciate it.

You can do that using “old-style” groups, which have to be defined in yaml:

I tried this, but it doesn’t appear to work with domain number.

Because switch and number have different values (on/off vs integer). A number entity with a value of 1 is not interpreted to be equivalent to on.

I suggest you consider creating a Template Binary Sensor helper that employs a suitable template to compute the appropriate result based on the states of the switch and number entities.

For example:

{{ is_state('switch.your_switch', 'on') and is_state('number.your_number', '1') }}

The Template Binary Sensor will report on if the switch is on and the number is 1. It will report off for all other combinations.

Thanks for the response.

Your reply made me realize I asked the wrong question. “Group” is not what I am looking for. Rather than try to make a correction here and hope someone sees it, I’m going start a new post instead.

It’s preferable if you continue in this topic. Simply rephrase your requirements (you already have the attention of jackjourneyman and me).

What I’m really looking to do is “Link” or “Sync” the 2 entities together. I see there are some available blueprints that do this, but they are not going to work with my entity with the numeric domain. Right now I have a solution running with 2 automations, but I was really hoping to consolidate/simplify.

So if you turn on the switch you want the number entity to have a value of 1? If you set the number entity to 0 then the switch should turn off?

Is that what you mean by ‘sync’ them? If so then you’re already syncing them the usual way (via automations).

Yes, yes, and yes. Thanks for the help.

Just a tip for the future: even if you find it hard to find the right terminology, if you share what you want to achieve you will most likely get the right help.