Hi I'm attempting to receive an alert when its time to leave for a scheduled appointment, based on the travel drive time required to get there.
I'm using the Google Directions node from "node-red-node-google". And the home assistant "events : calendar" node.
The calendar entry flows into the google directions node and I receive a msg.duration value in seconds. So what seems like the complicated part, I have worked out. However I cannot figure out how to now create a delay based on that output.
So for example, I trigger the calendar entry 18000 seconds (5 Hours) ahead of the scheduled appointment time, the Google Directions node determines that the appointment location is 3600 seconds away (1 Hour)
Now i'm struggling to figure out how to take 18000 seconds, minus 3600 seconds and then create a timer/delay based on the resulting answer. Once the delay is over, it would fire a notification telling me it's time to leave.