Skip to content

Create an On/Off Toggle Switch With Home and Shortcuts

Create an On/Off Toggle Switch With Home and Shortcuts

Apple homekit is my accessible application for controlling my HomeKit devices and in general for the basic ones automation and scenes, is also the preferred option. It has some limitations, for which many third-party HomeKit applications help fill in the gaps, but I just like the look and the ease of use. That said, an apparently simple feature seems to have alluded to Home, which is a simple switching feature. Currently, you can program a smart switch to activate something, but you cannot program it to turn it on and off when it is switched on, which for a traditional switch is a fundamental function. Why this was not created, someone assumes and in fact this My Home the application is already capable of such a task. It is achievable through third party applications, using conditions, but it would be very nice to do everything in one place. Fortunately, with the integration of shortcuts in the Home application, this is now a possibility, although still not as easy as in the mentioned Mi Home application, but still.

  • Before explaining how to do this, it should be noted that the latest update to TVOS / iOS (13.3) seems to have broken light automation for those who use an Apple TV as our main hub. For those who use a HomePod as their primary hub, there seems to be no problem with these types of automation, so if an Apple TV is your primary hub, you should wait for the next update. Annoying, I know.

For this example, I will use two Vocolinc L2 (adjustable white) smart bulbs, which were grouped under the name of “Prayer Lights” (do not ask …) and an Aqara Double Rocker Switch. I have also configured two scenes that I will use in this automation – Prayer lights on and Prayer lights off.

The overview of this automation is actually very simple, but we went into it step by step, so you can easily create this automation. Automation works like this;

  1. When the rocker button is pressed …
  2. IF The lights of Prayer are OFF, then return them ON
  3. otherwise, rotate the Prayer Lights OFF.

Therefore, it essentially checks the status of the lights connected to the switch and turns them off or off, depending on the state they are in.

automatically

  • Press and hold the rocker switch * to get to the settings page
  • On the settings page, you will see your buttons, waiting for a scene or device added to them.
  • Click Add, and then select a device or scene instead, scroll to the bottom and select “Convert to shortcut”

* In this case, this double tilt switch is the older type, so it does not have double or long press options, only one press.

  • You will then see the shortcut screen with “Set – scenes and accessories” implicitly
  • Click the button + icon and select “Scripting”, then & # 39; If you & # 39; (If can be a ready-to-select option).
  • Then you need to rearrange these plates so that Scripting the tile is above the current Set tile
  • In the Scripting tile, press & # 39; entry & # 39; then choose “Select a home accessory” from the pop-up menu.
  • Your list of accessories will appear. In this case, I select Lights of prayer I mentioned initially.
  • As Lights of prayer it is actually two bulbs, it only shows one of the bulbs for this automation, which is fine
  • Then select & # 39; Name & # 39;and select & # 39; It’s off & # 39; **

** For these bulbs, there are more options than normal, which refer to special light effects in Vocolinc’s LinkWise application

  • Select Set grease and pull it up so that it is underneath If tile
  • Click on Scenes and accessories
  • Select the scene created for these lights – in this case, Prayer lights on. Click Next

The first part of your automation is now set, which is simply – IF the Prayer Lights are off, set the Prayer Lights on. Now to the second part.

  • Click the button + icon again
  • Select New Taipei Control (this is my HomeKit home name, so any name of your home will appear here)
  • Another tile is created. Click on Set – Scenes and Accessories again
  • Your scenes and accessories will appear, so in my case, I choose Prayer lights off, chose Prayer lights on in advance
  • Now I have to move this tile so that it is underneath Otherwise tile
  • Full automation is in place, that is;
    1. When I press Aqara Rocker Switch
    2. If the Prayer Lights (Vocolinc L2 2) is off
    3. Set (scene) – Prayer light on
    4. Otherwise Set (scene) – Prayer lights are off
    5. End If (the sense of automation is complete)
  • Click Next, and then click Done to save your automation.

That’s it. While it may seem complex due to my step-by-step instructions, it should take you literally a minute to create this automation, if not less. It certainly helps to create a few scenes (if you can keep them, with the current limit of 100 scenes) that have the lights off and on, but not necessary. It is important to note that in some cases, it is possible to control a set of lights (grouped at home) when it comes to automation that checks their status to determine if you turn them on or off, you just have to check a bulb in the group, so it’s a good practice to make sure that the same bulb is chosen as the bulb designated in all automation for the most part.