Area Triggers --> Area Actions

Hi,

this looks very interesting to me as I got several areas in the house with a group of lights which I’d like to control as areas. However I am somewhat struggling with the logic.

one example is the bathrooms, it has 3 individual light switches:

Switch    GF_MasterBath_Main_Light     "Main Light"            <light>         (gGF_MasterBath_Trigger,gGF_MasterBath_Action,GF_MasterBath)   ["Lighting", "Switchable"] 
Switch    GF_MasterBath_Toilet_Light   "Toilet Light"          <light>         (gGF_MasterBath_Action,GF_MasterBath)   ["Lighting", "Switchable"]   
Switch    GF_MasterBath_Shower_Light   "Shower Light"          <light>         (gGF_MasterBath_Action,GF_MasterBath)   ["Lighting", "Switchable"] 
Switch    GF_MasterBath_Closet_Light   "Closet Light"          <light>         (gGF_MasterBath_Action,GF_MasterBath)   ["Lighting", "Switchable"] 

Group:Switch:OR(ON, OFF)         gGF_MasterBath_Trigger         "Master Bath Lights"           (gArea_Trigger) 
Group                            gGF_MasterBath_Action          "Master Bath Lights"           (gArea_Action)

ideally I’d like to push one switch to have all lights turned on. however when I pus the main light on it inverts the state on the other lights. ig I use NAND or NOR instead of AND or OR it get into an infinite on/off loop.
I’ve build the logic as stand alone rule before, however I’d like to get more in general design pattern to make behavior easier reproducable throughout the house…

Any hint on what I am doing wrong?

PS I think I figured it out how to switch all with one, however now I am trying to figure out how to trigger when any of the groups switches is switched ON/OFF

Cheers

Christian