Not sure if I follow … so you use tasker to set a vriable in pimatic. What is the variable used for in pimatic? Does it actually do something or do you only use it to enable some devices xx minutes before the specific time ?
-
Rule to trigger action xx minutes before $var
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
I use it to display my next alarm in Pimatic like this: and I want to create rules on the basis of this variable.
But I assume I have to create another variable to pass to pimatic (%alarm - x minutes or so) and have to create rules on basis of this.
-
Could you explain more about the times you are using? Do you work in shifts so you need an alarm for 6, 12 and 16.00?
If so, you can use three buttons that echo the times to a file(when button6 is pressed then execute “echo > 6.00 path/to/file” and that file output can be used as a variable. When shellsensor device = “6.00” then set variable.
-
@Gleno0h No I am not working in shifts, but I get up on different times in the morning, e.g. 6.30, 6.45, 7.30… It varies. I usually use my phone as alarm. So I had the idea to use tasker and autoalarm to read my next alarm on the phone and pass this time to pimatic. I do so with the method I have linked to in the first post.
Now I want to use this time (which changes every time I change my alarm on the phone) and tell pimatic to execute some actions some time before the alarm goes off, e.g. to turn on the heating in the kitchen (because it usually takes some time until the kitchen gets warm after the heating is turned on).
But after what I have read so far this seems not to be possible.
-
Extend your tasker script to fill several variables with earlier times (based on the input time) for the several devices you want to trigger on certain times
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Okay, I have solved this by creating 3 variables in pimatic/tasker $alarm, $alarm_status and $before_alarm. $alarm is my actual alarm time set on my phone. $before_alarm is calculated within tasker (alarm - x seconds). I pass everything to pimatic so I can create rules based on $alarm and $before_alarm (in combination with $alarm_status “on/off”. More a work around but it seems to run good (at least today morning it worked).
-
i have a value-variable $alarm_time = 06:00 wich i could edit with an VariableTimeInputDevice.
for getting a between-time-range i have a Second variable as expression $alarm_time_plus_35 = timeFormat(timeDecimal($alarm_time) + 35/60).
this would output 06:35:00 and change dynamic by editing $alarm_time
so the rule would be like:
if it is after $alarm_time and before $alarm_time_plus_35 and $bewegung_40_minuten_bad = “Ja” then <dosomething>
-
@xCite86 that would reduce the use of tasker, nice example.
-
Any new development on this?
I have some rules that are triggered on xx minutes before sunset starts. Although sunset timing is good enoug per season, during the year I have to change that timing a bit. Would be really nice to use a variable for this.Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm