Get a notification when the washingmachine is ready

Time to add some more functionality to the flows

As requested i made some extra cards to add the powermeter to the flows and a notification with the outcome of 1 laundry cycle.

What to use

This is an addition to the flows i posted above. So there is what you need also.

Making the variables

I created 2 extra variables for this. How to create the variables is stated in the top post so no more explanation needed for that.
First we need a variable for the start position. In my example i called it “WashingmachineStart” and it’s a number variable. 2nd variable we need is for the result and in my case i called it “WashingmachineTotal”. It’s a number variable again.

Start making the extra flows

In this case i added 2 extra flows. One for the beginning of the cycle and one for the end.
Before we go on you have to make 2 flows. For the trigger part choose “Flow” and “This flow is started”.
Call them whatever you like but i refer to them later as “Flow 1” and “Flow 2”. Hit save and done.

Flow 1

Now we go edit the first flow you just made.

WHEN part

Is already there if you was still reading along.

AND part

There is no AND part in this flow so leave it empty.

THEN part

Here we pick the Better Logic for starters and we choose “Set number variable” . Name is “WashingmachineStart” and at the value line we click the grey tag on the very right. Then click the tag again in the same line but this time on the left. Find your plug and choose the “Power meter” tag.
Next we choose “Flow” and “Disable a flow” . At select item we pick the number 1 flow you just made. Add a delay of 2 seconds just to be sure the variable is set.
The THEN part is done and your number 1 flow should look like this now:

Flow 2

Now we go edit the 2nd flow you just made.

WHEN part

Is already there if you was still reading along.

AND part

There is no AND part in this flow so leave it empty.

THEN part

Here we pick the Better Logic for starters and we choose “Execute mathjs expression”. In the top line we click the grey tag, find your plug and pick “Power meter”. Click after the tag and add the minus (-) and then click the tag again on the right. Now find the “WashingmachineStart” tag and click it. So the line will be: “Power meter tag - WashingmachineStart”. At “name” we choose “WashingmachineTotal”.

Next we pick “Mobile” and “Send a push notification”. We pick a user ofcourse. Then we click the message line and we start to type: Your washingmachine used (And here we click the grey tag and find “WashingmachineTotal” Then we add a delay of 3 seconds.

Next we pick “Flow” and “Enable a flow”. For item we choose “Flow 1”. Set a delay of 5 seconds.

Next we pick “Better Logic” and we choose “Set number variable”. Choose “WashingmachineStart” and value “0”. Set the delay at 8 seconds. Your 2nd flow should now look like this:

Adding the flow cards to the Washingmachine flows

Now we go back to the flows you made for the Washingmachine like stated in the top post. For the first flow you add 1 card to the THEN part. Card starts with “Flow” and then “Start a flow” . Choose “Flow 1” for the item.

For the 3rd flow you add 1 card to the THEN part. Card starts with “Flow” and then “Start a flow”. Choose “Flow 2”

5 Likes