Halt if speed = 0 for 5 minutes or longer

I have 2 HA sensors that use the Google Maps Distance Matrix api. Google charges $ if you have too many api requests. Therefore I only want to update the two sensors if the device tracker speed (mph) is either greater than 0 or if its 0 for less than 5 minutes. In other words, I want the flow to halt if the speed has been 0 for 5 minutes or longer. I’m not sure how to add a 5 min check to this flow:

[{"id":"f1531b66.6ab518","type":"inject","z":"5eb3594f.d294b8","name":"Get Speed: 10","topic":"","payload":"10","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":1168,"wires":[["40486c27.562094"]]},{"id":"7f22b8b1.c56518","type":"inject","z":"5eb3594f.d294b8","name":"Get Speed: 0","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":1200,"wires":[["40486c27.562094"]]},{"id":"40486c27.562094","type":"switch","z":"5eb3594f.d294b8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"gte","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":338,"y":1168,"wires":[["c6473921.6d8328"],["8c012178.3bcc3"]]},{"id":"4cbcaaab.964354","type":"debug","z":"5eb3594f.d294b8","name":"Call Services","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":822,"y":1168,"wires":[]},{"id":"8c012178.3bcc3","type":"traffic","z":"5eb3594f.d294b8","name":"","property_allow":"payload","filter_allow":"go","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"stop","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":true,"differ":false,"x":662,"y":1168,"wires":[["4cbcaaab.964354"]]},{"id":"c6473921.6d8328","type":"trigger","z":"5eb3594f.d294b8","op1":"go","op2":"stop","op1type":"str","op2type":"str","duration":"6","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":492,"y":1136,"wires":[["8c012178.3bcc3"]]}]