Here is what I use to start heater Xmn before alarm set. (so it’s warm when we have to get up).
There is one input_datetime and one input_number used, the alarm_clock, and the anticipation time, defined like this.
Input datetime :
alarm_clock:
name: Heure de réveil
has_date: false
has_time: true
Hi guys I also have a stupid question. I have a robotic lawnmower which mows on certain days. I set the whole thing in the app and via the Landroid Cloud I get the day and time written as a value in a data point.
Now I want to pick up this time stamp but I want to perform another action 30 seconds beforehand and that is to raise the garage doors of my robotic lawnmower garage.
My idea was to create a helper where I set the seconds, how much earlier he should raise the shutters and then another helper then updates the new time stamp. But maybe I’m thinking too complicated and it’s much easier. Ultimately, I just need a trigger (i.e. an automation) which triggers, for example, 30 seconds beforehand and then raises the roller shutters.
What is the best way to do this? If possible, please explain in a beginner-friendly way. Thank you very much
The Landroid entity for the next start looks like this:
And the second problem is that the time is displayed 2 hours back, even though I have set the correct time zone for Germany. So the planned start is 11:30 but the time displayed is 9:30 as shown in the picture.
I would not write automation that does one thing then another that figures out how to do something before that… I’d write the automation to trigger the very first action. Then trigger the next… Based upon completion of the first if possible, but doing a delay for a set time if necessary. Easier usually to think progressively in time rather than backwards
Btw, if you have a new question, it’s generally best to start a new thread, even if it is somewhat related to a 2 year old thread…
Yes, I agree with you. Only in my case, I set the mowing time for today at 18:00. As soon as this value is entered in the Worx Landroid app, the value also appears in HA. At that moment, it can already write the value to a new data point, which then has the time stamp 1 minute before, for example.
As soon as it is then 5:59 pm, another automation can start which then opens the garage doors, but unfortunately I don’t know how to do these two things in the smartest way.
TypeError: unsupported operand type(s) for -: ‘str’ and ‘datetime.timedelta’
And unfortunately, the sensor shows me the time 2 hours back. This means it is supposed to mow at 9:30 a.m. the next time, but something seems to be wrong with the time conversion.
This works, but I would have to add 2 hours on top:
What I don’t understand is that it shows the correct time here, but when I display it under templates, it shows a completely different time. is that normal?
i think if you look at the original string, it’s actually the right time (but look at the timezone… it may be in utc/gmt time). you are 2 hrs from gmt?
if i’m right. that’s why it looks fine in the graph and why it shows “differently”… if you want it in local time just do this:
for the trigger, you have to express the trigger as something that becomes true… Like when ‘now()’ passes that time… for your trigger template. warning, doing these all in mobile… so giving you the concept but not testing…
the trigger (all triggers) fire when it turns from false to true. did that happen? triggers do not fire when they are simply true.
if you validated that (have the automation set and saved… Have the trigger false then make the trigger true) if that didn’t trigger then… Are there other conditions in the automation? post the whole automation you currently have.
when you say “change the whole thing to seconds” what do you mean? do you mean 'input_number.worx_garagentore_vorher_offnen" is seconds? or do you mean something else? if you mean that’s in seconds, just change the minutes= to seconds=
btw… the “as_local” is unnecessary in the trigger because both “now()” and your full expression are fully qualified… ie, both include the timezone info that they are set in. so the comparisons will do the right thing even if the two are in different timezones.