How to...

Flashing Light Alert with Shortcuts

Smart lighting is great but what if we could take smart light bulbs even further by using them for more than just lighting a room? Today’s automation will be showing you how we can use Siri Shortcuts to use our lights to send us visual alerts.

For my use case, I want the lights to blink when my vacuum cleaner has finished cleaning but this can be used for any sensor or device that can be automated in HomeKit. However, if you want to try this out with your vacuum you’ll need to have it exposed to HomeKit. There aren’t any vacuum cleaners currently certified with HomeKit but I was able to use a Roborock plugin for HomeBridge to expose my Mi Robot vacuum to the Home app.

Based on the way my vacuum has been set up in HomeBridge, it creates an occupancy sensor that triggers when the vacuum returns to the dock which is what I’ll be using as my condition for this automation.

To get started, we want to create a new automation in the Home app, and choose the “a sensor detects something” option for the automation. I have yet to test it but you can likely use this “when an accessory is controlled” as well. To continue, I’ll be selecting my “Robot Vacuum Dock” and then when it “detects occupancy”.

From here, instead of choosing an accessory to trigger, we’re going to scroll to the bottom and select “Convert to Shortcut”. However, to do this you need to have an up to date home hub such as a current model iPad, Apple TV 4 or later, or an Apple HomePod. Once you select Convert to Shortcut, we’ll clear the “Set Scenes and Accessories” and start with a blank console. Press “Add Action” and search for the “Repeat” action. We’re going to set that to repeat three times so the lights will blink three times, but that is ultimately up to you.

Once you have your repeat action setup, we’ll start by choosing the “Control Home” option and we’re going to set a light to turn on to 100%, I’m using my Living Room Lamp as it’s in a common area of the house. We’re going to put that Control Home action within the Repeat and End Repeat tags.

Next, find the “Wait” action in scripting and we’re going to set that to one second, again that is up to you how long the light stays on. Finally, choose the “Control Home” option again and this time we’ll set the light to turn off. Make sure the Wait and second control home are within the Repeat tags and come after the first control home option, and your shortcut should look similar to what I have in the image below.

When you’re finished, save that shortcut and you’re finished. You’ll notice now when the vacuum returns to the dock (or whatever you decide to automate, maybe a door sensor or when a smart plug is turned on), the lights will blink three times to let you know that the vacuum has finished its job.

6 thoughts on “Flashing Light Alert with Shortcuts

  • Is there a way to read the status of the lamp before and restore it after?

    Because currently, you’d be left in the dark if the vacuum cleaner finished it’s work when the light was initially on…

    • Hi Mike. I hadn’t actually thought of that until I saw your comment. It took me a while but I figured out a way you could it.

      At the start of the automation you can use the “Get Status of Home” Action to get the “Power State” of the light we are using.

      After that, we’ll use the “Get text from Input” and use it to get the Power State from the Get status action we just used. This will either be On or Off.

      Next, complete the automation as I’ve specified above, and then when that’s finished add an If Statement. We’re going to use that If Statement to check the text of the Get text action. So for me I did “If Text is On”. I’m sure you can see where it goes from there so you’ll do “If Text is On, turn Lamp on, OTHERWISE, turn Lamp off, End If”.

      I’ve tested this and it seems to work as expected. I might do a follow up article to this or post a YouTube video to show how to accomplish this but until then I hope this helps you.

  • I am deaf and I do use Homekit as well as Smart Things. With HomeKit, I can only flash one light. Not a group of lights flashing that I can do in Smart Things. For deaf people at home, they definitely need lot more than just one light bulb in house as there are several rooms in house to alert to.

    • It is possible to control a group, you can either set up the automation to control lights individually or you can create a scene for when the lights go on, and a scene for the lights to go off. And then you can put those scenes in the repeat action.

    • You should be able to setup a scene with as many lights in it as you would like and then flash that scene shouldn’t you?

      • Hi Doug. Yes, that is correct.

Comments are closed.