node-red-contrib-home-assistant-websocket icon indicating copy to clipboard operation
node-red-contrib-home-assistant-websocket copied to clipboard

Calendar event trigger offset doesn't work

Open nabahr opened this issue 1 year ago • 9 comments

Describe the bug

I am trying to set up a calendar event trigger to go off 15 minutes before the event start. I have tried setting the offset value to both 15 and -15 minutes and both times it will trigger 15 minutes after the event start. It is my understanding that an offset of -15 minutes should fire 15 minutes before the event start.

To Reproduce

Create calendar event trigger node with offset -15 minutes on event start. Wire to debug node. Wait until 15 minutes before calendar event start. Nothing logged in debug. Wait until 15 minutes after calendar event start. Event fires and gets logged.

Expected behavior

Calendar event should fire 15 minute before event start.

Screenshots

No response

Example Flow

No response

Environment Information

Version: 0.63.0

Home Assistant version: 2024.1.6 Companion version: 3.1.3

Node-RED version: 3.1.5 Docker: no Add-on: no

Node.js version: v18.17.1 x64 linux OS: Linux 5.15.131-1-pve x64

Additional context

No response

nabahr avatar Feb 13 '24 14:02 nabahr

The offset doesn't work for me at all I set plus or minus 5 mins event fires 1 minute before for some reason.

blair287 avatar Feb 16 '24 10:02 blair287

Offset does not work as it should. Multiple events that overlap do not always work. Changing the time of an event does not result in an output in the debug node. and so on...

Could it be that the calendar in HA is only updated every 15 minutes? And not when changing the values

rallep71 avatar Feb 17 '24 15:02 rallep71

Same here. I've tried many offsets +ve and -ve and it will only occasionally work. I also see it sometimes say 'queued' underneath, but not always.

lukejagger avatar Mar 22 '24 11:03 lukejagger

So I've got it halfway working. I do notice that longer offsets like 10 minutes or above seem to not fire. If I do like 2 minutes it does. Im doing more testing. Although, for me I have two separate event listeners. One for 10 mins and one for 2 minutes. I noticed it said queued on both. Just like you guys said. Then only the 2 minute one actually changed to "sent". The 10 minute just disappeared and went back to no pending. Did not fire at all.

CoreyJ87 avatar Mar 26 '24 17:03 CoreyJ87

Any progress on a fix for this? It's a really useful addition :)

lukejagger avatar May 05 '24 18:05 lukejagger

This issue is still present, minus offset triggers after start/end.

FedericoDieleke avatar Aug 14 '24 10:08 FedericoDieleke