1 switch press on many switches works , how?

i have connected some of my electrical equipments with esphome and nodemcu and made them switches and binary switches ,
now i want to make a switch in which if i press it then multiple switch and binary switch goes on and if i press it again then all those multiple switches goes off ,

how to do that ?

There is no such thing as “binary switch” in HA.
One of the ways to get what you want is:

  1. create a group group.your_switches and include in it all the switches you want to control
  2. create an automation with trigger: state of your esphome: ‘on’ that calls service homeassistant.turn_on with entity_id: group.your_switches
  3. create an automation with trigger: state of your esphome: ‘off’ that calls service homeassistant.turn_off with entity_id: group.your_switches

However, I suspect that your esphome device act as a button so you might use homeassistant.toggle rather than turn_xxx