๐Ÿ”› Switch - Turn ON & OFF Entities

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

GitHub Click Here

Like this blueprint? Consider hitting the :heart: button below :+1:

Version: 1.3 :fire:

Need help? :eyes: See our FAQ: Click Here

:newspaper: The Automation Process

  • When you turn any switch ON it will turn ON the main entity input.
  • When you turn all the switches OFF it will turn OFF the main entity input.
  • You have the option to input an alternating entity that will be the opposite state to the main entity.

NOTE - The switch can be any entity with an ON & OFF state.

:rocket: CHANGELOG

Version: 1.3 - 2 Dec-23 You can now add multiple switches.
Version: 1.2 - 1 Nov-23 major code update.
Version: 1.1 - 30 Oct-22 initial release


:bulb: Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time
:infinity: Sensor Light Add On - Media & Movie Lights - House Alarm Lights - Smoke Alarm Lights & Exhaust Fans + More
:shower: Bathroom Humidity Exhaust Fan
:low_battery: Low Battery Notifications & Actions
:vibration_mode: Appliance Notifications & Actions - Washing Machine - Clothes Dryer - Dish Washer - ETC
:calendar: Calendar Notifications & Actions
:round_pushpin: State Notifications & Actions
:toilet: Toilet Exhaust Fan with time delay
:hourglass_flowing_sand: Entity - Run ON Timer
:stopwatch: Trigger - Run ON Timer
:gear: Turn Light, Switch or Scene On & Off with Trigger Conditions
:magic_wand: Manual light control with auto OFF
:timer_clock: Timer
:thermometer: Temperature Control Exhaust Fan
:snowflake: Temperature Control Exhaust Fan - Inverted
:eight_spoked_asterisk: Toggle Switch - Turn ON & OFF Entities
:nazar_amulet: Press Button - Turn ON & OFF Entities

Like this blueprint? Consider hitting the :heart: button below :+1:



Q: What type of switch can I use?

A: The switch must have a state that goes ON when you switch / press it, and then when you switch / press it again the state goes OFF. If you have a push button that goes ON/OFF in one press and when you press it again it will go ON/OFF then I have a different Blueprint called Push Button Relay - Contactor. It works the same as this blueprint but the trigger is different.

Q: Can I put the same entity into the normally open & normally closed fields?

A: No, you must only choose one field, normally open or normally closed per entity.

How can this handle dual input switches?
Switch 1: Shelly running in detached mode, this works fine by itself
Switch 2: EP1 showing presence as (Detected/Clear)

not sure what you are asking. Maybe explain what you are trying to do.

I have a light group that is controlled from HA.

Then I have 2 separate inputs that I would like to control them from.
The first is a wall switch that is exposed to HA, with ON/OFF.
The second is mmWave presence, this reports Detected/Clear.

At the moment I have your blueprint working only with the switch, but without the mmWave.

Using the blueprint without adding lots of extra logic would be great as I will need to replicate it for each room.

Have you seen my :bulb: Sensor Light blueprint?

In the sensor light blueprint, your MMWave would be the trigger and your wall switch would be the by-pass. For by-pass selection you would select โ€œEnable the By-pass - Turn lights ONโ€. Then you would just add all your lights in as entities.

Let me know it this works for you

Oh wow, that looks perfect.

The only other one I noticed was the push button. Thank you very much

no problem, you will have a lot of options now and there is a bigger plan on the road map ahead.

New update 1.2

:warning: Breaking Change :broken_heart:

New Feature :new:

Code Update - This is a major code and blueprint update. It will break your existing blueprint. Hopefully this is a lot cleaner & will survive a HA restart. Sorry it had to be done.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:


Blacky :grinning:

New update 1.3

:warning: Some work is required in this upgrade. Please see below on the steps when upgrading. It is easy and not a breaking change.

New Feature :new:

Switch - You can add as many switches as you like. If any switch is ON it will turn ON the main entity. All switches must be OFF to turn OFF the main entity.

Why multiple switches? I use this to control my WLED lights transformer. WLED has a feature for adding in a relay but you have to wire it all up etc. What I do is add all my lights (In WLED it is call segments) into the switch. In the main entity I add my smart plug (plug my transformer into smart plug) and the main switch for WLED. The transformer feeds the LEDโ€™s not the ESP32 and I have another cable (USB C) supplying the ESP32 so everything is available in HA 24/7. Now when any light is turned ON, it turns on the main entities that are my smart plug (transformer) and WLED main switch and the lights turn ON. When all the light are turned OFF the transformer and WLED main switch is turned OFF.

Why do this? Because even though the LED lights are turned OFF they still draw power. This way they only draw power when they are turned ON :wink:

You can do other things with it but this is one example.

:warning: :stethoscope: STEPS REQUIRED WHEN UPGRADING :white_check_mark:

1 - Upgrade your blueprint.
2 - Go into your automation (the ones using this blueprint). You will see the switch has a missing input.

3 - Click the 3 dots top right and โ€œEdit in YAMLโ€.


4 - We are looking for the words or input called โ€œswitch: ???


  1. Delete this line,(โ€œswitch: ???โ€)


6 - Then click 3 dots and select โ€œEdit in visual editorโ€


  1. Enter in your switch again.

8 - Click save, and youโ€™re done.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:


Blacky :grinning: