I have an automation that is using Google Gemini to analyze a video and then send me a notification that contains the analysis.
The problem is that HA makes the call to Gemini for the analysis and then immediately advances to the next step of the automation. And the call to Gemini hasn’t returned yet so it errors because there is no response text for the notification.
I’ve tried adding an arbitrary/static delay of a few seconds but there are still certain instances where it’s not long enough.
I want a promise type behavior where HA waits to advance to the next step until the current step gets a response or errors out. Or at least an option to wait until a “response_variable” is defined before advancing.