New type of Group with slighty diferent behavior

Have a group that when a switch turns on/off everything on that group turns on/off.

This would be usefull for 2-3way light switchs that are often used in stairs or if you have several devices turn on when using another device.

I have seen some automation scripts but none work well. Think this would be simple and usefull.

Do you mean if any of the switches in the group turns on, turn the other switches on as well?

Can you show the automation scripts that didn’t work well?

All the one that i tried work, but often turn off right after turning on, and sometimes do some crazy stuff that makes my house look like it has one strobe light lol

####################################################
#                                                  #
#                3 way switches automation         #
#                                                  #
####################################################

- alias: Kitchen Lights On
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: group.kitchen_lights
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: group.kitchen_lights

- alias: Kitchen Lights Off
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: light.kitchen_light
      to: 'off'
    - platform: state
      entity_id: light.kitchen_secondary_light
      to: 'off'
  action:
    service: homeassistant.turn_off
    entity_id: group.kitchen_lights

Here are some more

Do you mean if any of the switches in the group turns on, turn the other switches on as well?

Yes, and if one of them turn off, everything on that group would turn off.
Because from what i can see from trying the existing group, if i turn on a device on that group it turns on the group mas anything thats turned off will remain off.

here is a example from my setup: HallSala is turned on, the group turn on, but sonoff2 remains OFF
group

Are you familiar with Python?

Nops, only some notion of lua/dzvents thats used in domoticz