✳ Toggle 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:

The most common automation used with a toggle switch to turn ON and OFF your entities :partying_face:

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

:newspaper: The Automation Process

  • When you press the toggle switch it will turn ON the main entity input.
  • When you press the toggle switch again 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 toggle switch must have a quick ON & OFF state normally found when using ESPHome toggle switches.

:rocket: CHANGELOG

Version: 1.3 - 1 Nov-23 major code update.
Version: 1.2 - 30 Oct-22 update description and wording.
Version: 1.1 - 30 Oct-22 initial release

:shield: MY OTHER BLUEPRINTS

: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
: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
:thermometer: Temperature Control Exhaust Fan
:snowflake: Temperature Control Exhaust Fan - Inverted
:nazar_amulet: Press Button - Turn ON & OFF Entities
:on: Switch - Turn ON & OFF Entities

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

2 Likes

FAQ

Q: What type of push button can I use?

A: The push button must have a state that goes ON/OFF in one press. When you press it again it will go ON/OFF again. If you have a switch that when your press it and the state goes ON, and then when you press it again the state goes OFF, then I have another blueprint called Smart 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.

Hi, thank you for your project, I’ve recently approached HA coming from Arduino Blynk and IFTTT, I’ve fully wired the house to automate everything and almost all my switches are with relays. Going back to your project, since I’m not fully prepared yet, can I better understand which entities I’ll have to insert to create a correct button? when i press the button it state ON, when i release it state OFF. What type of entity should I create?
Thank you!

@Andrewa I think the best way is to test it out on one switch first as it is hard to fully understand what and how you are doing it. This blueprint works like a relay but it not a relay. The push button switch is like you said, when you press it state is ON, when release it state OFF. The entity can be a switch or a light entity (anything) you would like to turn ON.

If you have physical relays then I would wire the switches to control the physical relay. Some relays will react to a push button and some you can switch.

Example: Shelly switches are relays and you can wire a switch to them.

Again it is very hard to understand what you are doing not knowing what you have done.

New update 1.3

: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:

Enjoy

Blacky :grinning: