Emergency shutoff based on run time

I had a number of automations that started things like sprinklers and pool pumps. I am often messing with HA and wanted a fail safe to shut off something if it is left on by automation or manual activation. It is not elegant, but this is the flow I use to shut things off if they are left on. The flow continues to my email notification that I did not include in the example.

[{"id":"4b3f1da7.bf5c14","type":"ha-get-entities","z":"ab0f925a.60f97","server":"f4cbb1cb.03814","name":"Sprinkler Runtime","rules":[{"property":"entity_id","logic":"starts_with","value":"switch.sprinklers","valueType":"str"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":1870,"y":580,"wires":[["56df4c52.b6d024"]]},{"id":"56df4c52.b6d024","type":"switch","z":"ab0f925a.60f97","name":"45 Minute off","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gt","v":"2700000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":2050,"y":580,"wires":[["a88f755c.6c9608"]],"info":"Turns off sprinklers if runtime is greater than 45 minutes on any one zone\n"},{"id":"a88f755c.6c9608","type":"api-call-service","z":"ab0f925a.60f97","name":"Sprinklers off","server":"f4cbb1cb.03814","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.sprinklers","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":2210,"y":580,"wires":[["ecdc20f9.9ed02"]]},{"id":"3896cb81.4e3d34","type":"poll-state","z":"ab0f925a.60f97","name":"Check Sprinklers On","server":"f4cbb1cb.03814","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":false,"outputonchanged":false,"entity_id":"switch.sprinklers","state_type":"str","halt_if":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":1630,"y":580,"wires":[["4b3f1da7.bf5c14"],[]]},{"id":"ecdc20f9.9ed02","type":"function","z":"ab0f925a.60f97","name":"Add Subj","func":"msg.topic=\"Sprinkler Emergency Off Activated\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":2360,"y":580,"wires":[["975ee086.9164e"]]},{"id":"3c6c7090.a0adb","type":"comment","z":"ab0f925a.60f97","name":"Sprinkler better emergency shutoff","info":"Starts a timer when the sprinklers are on to shut them off after 45 minutes.\n\nResets each time the sprinklers are turned off.","x":2140,"y":540,"wires":[]},{"id":"f4cbb1cb.03814","type":"server","z":"","name":"Home Assistant"}]