No that won’t work. I am curious if the sensor just has to be swapped in front of the timestamp. Or… we can create a sensor that equals the timestamp +300 and do an == on that. Either way, both would end up being ‘true’. Thats how I understood the value template. If the value = what your equation is, match and then true.
From my understanding you would need a sensor as trigger that triggers every second. Else you would never match the exact timestamp. For example I have a sensor that counts the hours I am alive and I update it with the entity sensor.date. But it is only updated once a day because thats when sensor.date changes state.
Can we do less than ? Greater than ? so it wouldn’t need an exact second to trigger, just went it gets past that 10 minute window, it would then class as true, and then trigger on the next minute ?
I opened a feature request fo a UNIX time sensor. Maybe you want to leave your upvote there so we can get this automation to work. See Unix time sensor
No problems, its all good. I have updated the automation to see what happens, shame we have to wait a few weeks to find out, but thank you very much for helping out.
The date time sensor updates every 10 minutes. To getbitvvto triggervaround 10 minutes before launch I subtract 11 minutes from now then do the comparison. That value less than zero is around 10 minutes before launch.
Automation worked! And on top of it I have an automation to TTS the mission details and then immediately play Elton John’s “Rocket Man” starting 5 min before launch. I cannot have wanted it to work out any more perfect. The mission details lasted about 20s approx and then the song kicked in. It ended exactly when the rocket launched!!! Unreal timing!
Just some added detail… I have the mp3 hosted and redacted above.
The Elton John song is exactly 4:42 in length but ends at about 4:39. Now whats great is that the details of the mission “if” they last around 20s, that will time the launch PERFECTLY if its on time! So just like tonight (by sheer luck!) the launch happened right when the song ended. So awesome!
I am going to guess you are based in America then somewhere. I sat up till 1 hour before launch, and was waiting to check if it worked, and then it failed for me. So I looked into it, and realised that, as the launch was scheduled for late evening America time, it ended up rolling over to the next day here in the UK, so the condition failed, as I was technically 1 day ahead. It was 1:45am GMT it due to launch, so I guess as long as it isn’t the 5-8 hour window when the timezones are on different days, it should work fine for me. I should also probably be asleep in that time frame as well anyway.