Thanks for the tip about the trigger node. Might be that this is better to use for my purpose.
I will try to modify my code accordingly, but here’s the code that has been failing. I can’t see where I’m going wrong here, so if you can take a look it’d be great.
[{"id":"db3820f6.08121","type":"api-call-service","z":"80fa73c2.63569","name":"","server":"e19c43d0.f9546","service_domain":"notify","service":"html5_oystein_laptop_work","data":"{\"message\":\"Garasjeporten er åpen, og blir stengt om to minutter.\",\"data\":{\"tag\":\"garage_door_open\",\"actions\":[{\"action\":\"postpone5\",\"title\":\"Utsett 5 minutter\"},{\"action\":\"postpone30\",\"title\":\"Utsett 30 minutter\"}]}}","render_data":true,"mergecontext":"","output_location":"payload","output_location_type":"msg","x":1390,"y":260,"wires":[[]]},{"id":"91e1d9a1.96c618","type":"server-events","z":"80fa73c2.63569","name":"","server":"e19c43d0.f9546","event_type":"html5_notification.clicked","x":170,"y":500,"wires":[["7561b427.90fddc"]]},{"id":"702742df.ad131c","type":"server-state-changed","z":"80fa73c2.63569","name":"","server":"e19c43d0.f9546","entityidfilter":"cover.garage_door_controller_barrier_state_label","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":270,"y":260,"wires":[[]]},{"id":"709b0e1d.cee9","type":"inject","z":"80fa73c2.63569","name":"","topic":"","payload":"opening","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410,"y":300,"wires":[["c0f34d3f.0dd81"]]},{"id":"798acf0c.12895","type":"inject","z":"80fa73c2.63569","name":"","topic":"","payload":"open","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410,"y":340,"wires":[["c0f34d3f.0dd81"]]},{"id":"ee51bb11.0393b8","type":"stoptimer","z":"80fa73c2.63569","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":1040,"y":240,"wires":[["db3820f6.08121","de1ebbac.6813a8","9ae534a9.e5cb38"],[]]},{"id":"7e4b29ed.c6b018","type":"inject","z":"80fa73c2.63569","name":"","topic":"","payload":"closing","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410,"y":380,"wires":[["c0f34d3f.0dd81"]]},{"id":"2232f852.97ae48","type":"inject","z":"80fa73c2.63569","name":"","topic":"","payload":"closed","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":410,"y":420,"wires":[["c0f34d3f.0dd81"]]},{"id":"9ae534a9.e5cb38","type":"api-call-service","z":"80fa73c2.63569","name":"","server":"e19c43d0.f9546","service_domain":"notify","service":"html5_oystein_phone","data":"{\"message\":\"Garasjeporten er åpen, og blir stengt om to minutter.\",\"data\":{\"tag\":\"garage_door_open\",\"actions\":[{\"action\":\"postpone5\",\"title\":\"Utsett 5 minutter\"},{\"action\":\"postpone30\",\"title\":\"Utsett 30 minutter\"}]}}","render_data":true,"mergecontext":"","output_location":"payload","output_location_type":"msg","x":1370,"y":180,"wires":[[]]},{"id":"de1ebbac.6813a8","type":"stoptimer","z":"80fa73c2.63569","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":1320,"y":340,"wires":[["8a31bb2e.f36228"],[]]},{"id":"7561b427.90fddc","type":"switch","z":"80fa73c2.63569","name":"","property":"payload.event.action","propertyType":"msg","rules":[{"t":"eq","v":"postpone5","vt":"str"},{"t":"eq","v":"postpone30","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":390,"y":500,"wires":[["c460393a.c00db8","7efe413c.32629"],["fb0ec758.5e3db8","7efe413c.32629"],[]]},{"id":"c460393a.c00db8","type":"stoptimer","z":"80fa73c2.63569","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":1040,"y":440,"wires":[["de1ebbac.6813a8","9ae534a9.e5cb38","db3820f6.08121"],[]]},{"id":"fb0ec758.5e3db8","type":"stoptimer","z":"80fa73c2.63569","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":1040,"y":500,"wires":[["de1ebbac.6813a8","9ae534a9.e5cb38","db3820f6.08121"],[]]},{"id":"c0f34d3f.0dd81","type":"switch","z":"80fa73c2.63569","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"opening","vt":"str"},{"t":"eq","v":"open","vt":"str"},{"t":"eq","v":"closing","vt":"str"},{"t":"eq","v":"closed","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":630,"y":260,"wires":[["ee51bb11.0393b8"],["ee51bb11.0393b8"],["17be1ec0.206991"],["17be1ec0.206991"]]},{"id":"17be1ec0.206991","type":"change","z":"80fa73c2.63569","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":280,"wires":[["c460393a.c00db8","ee51bb11.0393b8","fb0ec758.5e3db8","de1ebbac.6813a8"]]},{"id":"8a31bb2e.f36228","type":"debug","z":"80fa73c2.63569","name":"close_door","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1530,"y":340,"wires":[]},{"id":"7efe413c.32629","type":"change","z":"80fa73c2.63569","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":340,"wires":[["de1ebbac.6813a8"]]},{"id":"e19c43d0.f9546","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open"}]