Actually I just realized I still have my “Get Calendar Events” subflow. Takes a calendar ID, a start datetime and an offset to calculate end datetime from the start. There’s also an option to add an offset to the start datetime although I kind of forget why I needed that lol. Returns you all the events in that range.
There’s no polling bit right now but that can be added. If you add the inject into this subflow along with a few more options this could just become a calendar trigger node. Also the calendar input on the subflow is a select right now. I removed most of my calendars but you’ll have to add your own or make it a text box.
[{"id":"a48f1f89.a998e","type":"subflow","name":"Get calendar events","info":"","category":"","in":[{"x":60,"y":100,"wires":[{"id":"47dfe4f7.46fdd4"}]}],"out":[{"x":440,"y":100,"wires":[{"id":"54ea5735.83108","port":0}]}],"env":[{"name":"calendar","type":"str","value":"family","ui":{"icon":"font-awesome/fa-calendar","label":{"en-US":"Calendar"},"type":"select","opts":{"opts":[{"l":{"en-US":"Family"},"v":"family"},{"l":{"en-US":"Holidays"},"v":"holidays_in_united_states"},{"l":{"en-US":"HA Devs"},"v":"home_assistant_devs"}]}}},{"name":"start_add","type":"json","value":"{\"years\":0,\"quarters\":0,\"months\":0,\"weeks\":0,\"days\":0,\"hours\":0,\"minutes\":0,\"seconds\":0,\"milliseconds\":0}","ui":{"label":{"en-US":"Add for start"},"type":"input","opts":{"types":["json","env"]}}},{"name":"start_set","type":"json","value":"{\"hour\":0,\"minute\":0,\"second\":0,\"millisecond\":0}","ui":{"label":{"en-US":"Set for start"},"type":"input","opts":{"types":["json","env"]}}},{"name":"end_add","type":"json","value":"{\"hours\":0,\"minutes\":0,\"seconds\":0,\"milliseconds\":1}","ui":{"label":{"en-US":"Add for end"},"type":"input","opts":{"types":["json","env"]}}}],"meta":{},"color":"#41BDF5","icon":"font-awesome/fa-calendar","status":{"x":240,"y":180,"wires":[{"id":"79d548ec.eaa548","port":0}]}},{"id":"47dfe4f7.46fdd4","type":"change","z":"a48f1f89.a998e","name":"Set params","rules":[{"t":"set","p":"start_add","pt":"msg","to":"$exists(start_add) ? start_add : $env('start_add')","tot":"jsonata"},{"t":"set","p":"end_add","pt":"msg","to":"$exists(end_add) ? end_add : $env('end_add')","tot":"jsonata"},{"t":"set","p":"params","pt":"msg","to":"(\t $start_add := start_add; $end_add := end_add;\t $start := $moment().add($env('start_add')).set($env('start_set'));\t $format := 'YYYY-MM-DDTHH:mm:ssZ';\t {\t \"start\": $start.format($format),\t \"end\": $start.add($end_add).format($format) \t } \t)","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"calendar","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":170,"y":100,"wires":[["54ea5735.83108"]]},{"id":"54ea5735.83108","type":"ha-api","z":"a48f1f89.a998e","name":"Get events","server":"","version":1,"debugenabled":false,"protocol":"http","method":"get","path":"/calendars/calendar.{{ topic }}?start={{ params.start }}&end={{ params.end }}","data":"null","dataType":"json","responseType":"json","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"results"}],"x":330,"y":100,"wires":[[]]},{"id":"79d548ec.eaa548","type":"status","z":"a48f1f89.a998e","name":"","scope":null,"x":120,"y":180,"wires":[[]]}]
Oh also the reason all the date inputs are objects is because they are passed to momentjs. I set the default to the complete object with all the options so hopefully its pretty straightforward, all fields are optional though. Look here for more info on each.