How to divide Switches/ Relays?

Hi All,

probably this is very easy task, but I am a newbie, so please forgive me.

I am doing the configuration for the garden sprinklers.
I have three solenoid valves with wemos D1 mini running tasmota with 4 relay board.

There are two Sprinkler zones : Zone1 and Zone2
To run one of the zones I need to include two valves:,
Zone1: Main Valve (switch.glowny_zawor) + second valve (switch.lewy_zawor)
Zone2: Main Valve (switch.glowny_zawor) + another valve (switch.prawy_zawor)

I have added the switches to the groups:

groups.yaml

Nawodnienie_Zone1:
 name: Zone1
  entities:
    - switch.glowny_zawor
    - switch.lewy_zawor

Nawodnienie_Zone2:
  name: Zone2
  entities:
    - switch.glowny_zawor
    - switch.prawy_zawor

The problem is, that when I Turn on the Zone1 the button from Zone2 is also On (as they have the same valve included - switch.glowny_zawor).

Can you please help me, how to divide this into real 2 zones?

Thank you in advance,
Tomasz

You just need to set the all: variable to true for your groups.

Nawodnienie_Zone1:
  name: Zone1
  all: true
  entities:
    - switch.glowny_zawor
    - switch.lewy_zawor

Nawodnienie_Zone2:
  name: Zone2
  all: true
  entities:
    - switch.glowny_zawor
    - switch.prawy_zawor

Read about the group all: variable here: https://www.home-assistant.io/components/group/#all

I knew it would be easy! But of course easy means when you know the answer :slight_smile:
Thanks a lot! Working like a charm :smile:

Or know where to look for an answer. Checking the variable options for a component is always a good start. The docs are pretty comprehensive.