How to turn off all light by pressing one button x times

I decided to try out Shelly smart switches. I set up all the switches in home assistant and now im trying to set it up so i can press the button (that controls the light by the front door) 3 times and it will turn off all the lights in the house. is this possible? and if so could someone point me in the right direction to figure this out.

Thanks

See Automations in the Shelly integration. If your button supports triple click it appears to be fairly straightforward.

Set up an automation with a trigger for triple clicked, then the automation action would be:

- service: light.turn_off
  entity_id: all

There is a blueprint that does this nicely


      triple_press:
      - type: turn_off
        device_id: d28f6d39e45765d480a6be0185f0ad59
        entity_id: light.lifx_mini_309c01
        domain: light