Jaap
October 26, 2019, 10:41am
#1
Hi,
I need help with some flows. I want to give my cleaning lady a Tile (beacon). And register when she comes in, and when she leaves. Then i want to calculate the hours she worked so i can sent her a message on the money i ow her.
Is this possible? I think i should use Logic for this and set some variables, but i really could use some help with this.
Any ideas?
why? you think she is lying about the hours she makes??
You could also install locative on her iphone or some other app when its android. I think presence detection is a way to do this.
Jaap
October 26, 2019, 12:57pm
#4
Just to pay her, she sometimes work one hour, other times more then 3 hours.
Jaap
October 26, 2019, 1:00pm
#5
The presence part isn’t the problem, i need help with the Logic part
Perhaps use the count up timer…
Not sure if it is still available, but I do remember an experimental app that does countdown and count up. So, when present, start countup.
JPe4619
October 26, 2019, 3:25pm
#7
Jaap
October 26, 2019, 7:58pm
#10
Using Chronograph helps. Now i can make a few flows:
when beacon in range, start stopwatch YYY
when beacon out of range, stop stopwatch YYY
when stopwatch YYY is stopped, calculate an value with Logic
Then i think i have to set a Numeric Variable… and then i get lost…
I can make a variable in More > Logic > New > Type should be Number probably, but what do i fill in at Value ?
JPe4619
October 27, 2019, 4:30pm
#11
You don’t need to calculate, juist read the stopwatch value. That is what you wanted!
Jaap
October 27, 2019, 6:33pm
#12
The stopwatch time/value is in Seconds.
And i want to sent a message with the worked time (hours) in it. (So the calculation part must be something like Stopwatch value / 3600)
How would you solve this?
Joka
October 27, 2019, 7:48pm
#13
in the app settings of Logic you have to define a variable (hours) before
Flow:
when: stop watch stopped
then: based on the duration, Logic calculates seconds to hours
Joka
October 27, 2019, 9:38pm
#15
You post the options of the when area. But you have to select the options in the then area.
Jaap
October 28, 2019, 8:24am
#16
You are correct. Thanx. I got it working now. Thanx all !!!
Now a bonus question
How can I round this number to two decimal places?
Osorkon
October 28, 2019, 8:31am
#17
{{round(dauer(s)/3600, 2)}}
Joka
October 28, 2019, 8:53am
#18
I think to round a number you have to use the app „better logic“ instead of the bulidin Logic app
Osorkon
October 28, 2019, 9:05am
#19
It works with the built in logic. No better Logic necessary.
Joka
October 28, 2019, 10:00am
#20