Umbrella Butler using LaMetric

use-case
Umbrella Butler using LaMetric
0

#1

Note from @Anna: @pebneter had a long-running IFTTT recipe that sent him the weather forecast for the day early in the morning. But he noticed that actually all he really wanted to know is if he needed to take an umbrella with him or not. This automation was originally built with Amazon IoT Buttons, which have now been discontinued, but it can be built in many different ways!

If you have a LaMetric smart clock, this is a nice automation that can tell you whether you need to grab your umbrella on the way out, with a press of your LaMetric button. On the day we published this article, you had to take your umbrella with you:

Setting up the variable

We will have a string variable that stores the weather for today. Create your string variable in Apilio, and call it todays_condition:

Creating the condition

We will compare the string of text that stores today’s weather condition to a string with the text “Rain Showers Snow Thunderstorm”. This means, in any of these 4 conditions, I should be told to grab my umbrella.

How to update the string variable via IFTTT

We will update our string variable every day, at a very early time, for example 5AM, so the variable is ready and updated by the time we are up and pressing our LaMetric button. This is how to set it up, step-by-step:

  1. Create an applet in IFTTT
  2. As the"If this", choose Weather Underground

  1. Complete the details with your location:

  1. As the “then that”, choose Apilio, and update a string variable:

  1. Choose the string variable you created earlier and remove all the unnecessary text, we just need to save the ingredient {{TodaysCondition}}:

  1. Your finished applet will look like this:

How to create the logicblock

To trigger the logicblock, we will use the LaMetric button. We will create this applet:

  1. Go to IFTTT and choose create https://ifttt.com/create
  2. As the “If this”, choose LaMetric, and the trigger “Action button pressed”:

  1. Complete the trigger fields:

  1. As the “then that”, choose Apilio, and evaluate a logicblock

  1. Complete the action by choosing your logicblock name from earlier

  1. Complete the applet, it will look something like this:

Setting up my actions in IFTTT

Whenever I press my LaMetric button, I want to know whether I should take my umbrella with me, or if the day is going to be a dry one. I will setup two action chains, one for the positive result (I should take my umbrella with me) and one for the negative result (dry day ahead!):

To display the message to grab my umbrella:

  1. Go to IFTTT and create a new applet
  2. For the “If this”; choose Apilio, and the trigger to receive an event from Apilio:

  1. Choose the event grab_umbrella:

  1. For the “then that”, choose LaMetric and the action to display a notification:

  1. Complete the details

This will display a raining cloud:

  1. Your finished applet will look like this:

To display the message that today will be a dry day and no need to grab my dear umbrella, we will create a new applet that will wait to receive the second event (from the negative action chain):

  1. Go to IFTTT and create a new applet
  2. For the “If this”; choose Apilio, and the trigger to receive an event from Apilio:

  1. For the “then that”; choose LaMetric and the action to display a notification. Set up the details to your choice of icon and message:

  1. Your finished applet will look like this:

And now when you press your LaMetric button, you’ll be told whether you need to take your umbrella or not. This is a nice example that can be customised to your needs. Maybe you want to be notified of high polen counts, or UV index over a certain threshold. You can choose your icons and messages for clarity and fun! Let us know if you are using your LaMetric with Apilio :slight_smile: