Trigger a flow from a Power-tag

Here is what i am trying to do;
I have a power plug with an energy meter. Connected to the plug there is a coffee machine.
when i turn my machine on it will be on for a maximum of 1 hour. After that the plug will turn it off.
But if i turn the machine off within an hour, the plug will remain unaffected.
A power tag, a virtual device and countdown is included in 3 flows.

The problem is that the plug does not have a power card, just on and off, wich is irrelevant.
The only way i can see the power meter is via a tag - and i dont know if it is possible to trigger a flow this way, or if it is possible to convert it to a variable?

Any help is appreciated

Trigger using Logic card with the tag as a variable. If you use the app Better Logic you can even trigger on change within a given range.

Thank you for replying
I think that i have tried that,
I used “a variable changed” in the when column - pulled the power tag from the switch and added it to the card. when I use “Test” it runs, but not when I turn the machine on.
I can see that it registers the power on the tag.
is a tag a variable? or do I have to create a variable in the better logic setting, and somehow link them together?

What kind of powerplug are u using and what setting did u take while adding it. There is an option to tell what kind of device is in the plug. When u put “another” in there , there should also be power meassuring.
And u can use the normal logic card with tags. Gonna add e screenie:


This is in the middle colom and the card is Normal logic card.

I am using a Plug-in Switch Mini (TZWP-102) from Telldus, Z-wave.
Not sure what you mean, i added it via the Telldus beta app. when i go to setting on the device, i can see different variables for power meassuring.
Ah, i see now that i was using the homey logic card for the When - with no luck

And a tag is not a variable as in u cannot take the "a variable has changed’ card.

Alright, that is what i started to suspect, good to know.
Is there a way to make it a variable? because there isnt a way to add a tag to normal logics “When” right? just for the middle column, and that wont trigger anyting.

If i use the “set a variable” can i create a variable that way, linking the power tag to the card?
I can see that i get a new tag that way, although the new logic tag doesnt change when the power tag does…

Well, imo the Better Logic app is perfect for that. U make a variable and then u make flows with like WHEN power changed THEN set variable. After that u can make: WHEN variable changed THEN…Advantage of the better logic app is that u can actually see the variables in settings. Can make a screenie of that if u like?

I have tried several thing with better logic, i just cant wrap my head around how i can get it to trigger this way.
If it isnt necessary, i rather not use the plug for on/off - i want it to be on - the thing triggering is when i turn the machine on and thous generate a change in watt.
yes please do, all help is appreciated, I am far from pro with “logic”

Plz tell us then exactly what u want to achieve. In ur first post u want the plug/switch to turn off the coffemachine and in ur last post u want the plug/switch to be on so maybe tell us again what u want. The more precise the better.

Sorry, I thought that a was cristal clear :slight_smile:
I want to operate the coffee machine by it self - therefore the plug must be on.
When i turn the machine on and I forget to turn it off, then after one hour the plug will turn off.
but if i turn the coffee machine off, that will reset the countdown and therefore the plug will remain on.

Therefore it needs to trigger on change of the watt

Hmmm, still not clear. When u turn off the machine the countdown resets? How do u do that?

The watt goes down to 0, this as well counts on that it is possible to use the power-tag

I guess i could just use the plug and put a timer on that. But no fun!
I am trying aswell to make it as easy as possible for my wife, who dont understand and therefore hates all these things :slight_smile:

Ur next problem will be when to turn the plug on again!
What if u want coffee after 1 hour? The plug will be off and she’s gonna be angry!

haha :smile: yheah there is that too!
no, we never have the machine on for more then half an hour or so. and if we forget and the plug goes off, then its okay to manualy turn it on again. or use a virtual switch perhaps

Then u can do WHEN plug is set to on THEN start a timer for 60 minutes.
WHEN timer is empty AND (normal logic with tag from plug) power < 100 THEN kill the plug, ELSE reset timer for 30 minutes.

yeah, you are probably right, i might have to rethink the idé
Perhaps it cant be done to make a trigger from just a tag…

nice idé, although a problem with the 30 minutes timer loop is if u turn on the coffee maker when there is just a few minutes left on it, then it will shut the machine off mid-brew… (if i understand you right)

It will not shut down when power is more then 100 or whatever u fill in there

but havent i then left out what i tried to accomplish in first place, to turn the plug off if i forget to turn the machine off? :smile:
I think i might have to scratch this little project insteed, caused way too much headache :face_with_head_bandage: