I used this post to build a node red flow. if anybody prefers node red, here it is
in the calculation you can trigger things before alarm by subtracting required amount from msg.delay. for instance, my master bedroom alarm, will open the curtains 30 minutes before the alarm and if it is cloudy it will turn on the lights 10 minutes before alarm.
[{"id":"2b3a8437.ab11ec","type":"group","z":"a5b701dc.0bcb6","style":{"stroke":"#2e333a","stroke-opacity":"1","fill":"#2e333a","fill-opacity":"0.75","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["79c85a8f.e31344","21d200dc.7c11","64f37e7a.6d1cd","19d300ba.cae61f","ccf5e163.de4c8","6c782e97.bf185","61e93bcd.b09bd4","49a19c89.177c64","f6c191bd.1b84","3f5e37a.276d9c8","b200308e.b6717","81f50c60.7f197","366449cb.e922c6"],"x":54,"y":1739,"w":792,"h":342},{"id":"79c85a8f.e31344","type":"server-state-changed","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","server":"505ea12e.03f8b","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.fire_tv_cube_next_timer","entityidfiltertype":"substring","outputinitially":true,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":false,"x":260,"y":1820,"wires":[["64f37e7a.6d1cd"],["19d300ba.cae61f"]]},{"id":"21d200dc.7c11","type":"server-state-changed","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","server":"505ea12e.03f8b","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.fire_tv_cube_next_alarm","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":false,"x":260,"y":1920,"wires":[["6c782e97.bf185"],["61e93bcd.b09bd4"]]},{"id":"64f37e7a.6d1cd","type":"function","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"Calc difference ms","func":"msg.delay = new Date(msg.payload) - new Date();\n//msg.delay = msg.delay + 5 * 60 *60 *1000 ;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":1800,"wires":[["ccf5e163.de4c8"]],"info":"LocalDateTime dateTime = LocalDateTime.parse(msg.payload);"},{"id":"19d300ba.cae61f","type":"change","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":1840,"wires":[["ccf5e163.de4c8"]]},{"id":"ccf5e163.de4c8","type":"delay","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","pauseType":"delayv","timeout":"7","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":760,"y":1820,"wires":[[]]},{"id":"6c782e97.bf185","type":"function","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"Calc difference ms","func":"msg.delay = new Date(msg.payload) - new Date();\n//msg.delay = msg.delay + 5 * 60 *60 *1000 ;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":1900,"wires":[["49a19c89.177c64"]],"info":"LocalDateTime dateTime = LocalDateTime.parse(msg.payload);"},{"id":"61e93bcd.b09bd4","type":"change","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":1940,"wires":[["49a19c89.177c64"]]},{"id":"49a19c89.177c64","type":"delay","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","pauseType":"delayv","timeout":"7","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":760,"y":1920,"wires":[[]]},{"id":"f6c191bd.1b84","type":"server-state-changed","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","server":"505ea12e.03f8b","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.fire_tv_cube_next_reminder","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"unavailable","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":false,"x":270,"y":2020,"wires":[["3f5e37a.276d9c8"],["b200308e.b6717"]]},{"id":"3f5e37a.276d9c8","type":"function","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"Calc difference ms","func":"msg.delay = new Date(msg.payload) - new Date();\n//msg.delay = msg.delay + 5 * 60 *60 *1000 ;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":570,"y":2000,"wires":[["81f50c60.7f197"]],"info":"LocalDateTime dateTime = LocalDateTime.parse(msg.payload);"},{"id":"b200308e.b6717","type":"change","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":2040,"wires":[["81f50c60.7f197"]]},{"id":"81f50c60.7f197","type":"delay","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"","pauseType":"delayv","timeout":"7","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":760,"y":2020,"wires":[[]]},{"id":"366449cb.e922c6","type":"comment","z":"a5b701dc.0bcb6","g":"2b3a8437.ab11ec","name":"Living Room","info":"","x":150,"y":1780,"wires":[]},{"id":"505ea12e.03f8b","type":"server","name":"your_server![Screenshot 2020-12-06 050204|690x306]","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]![Screenshot 2020-12-06 050204|690x306]