I had this working but recent weather events weren't popping up as alerts on my dash. When I went to investigate, I am sure I broke something, then fixed it, and broke it again. I could use a sanity check.
The flow is very simple: Go to NWS alerts.weather.gov page for a county, check to see if there is a standard "no alerts right now" message (which only appears when there are no alerts, obviously), does a check to see if a TRUE or FALSE is passed -- TRUE means no alert and nothing pops up, FALSE means there is an alert, and the payload should be displayed as an alert.
This has been devlishly difficult to test as I can only really test it when there are real alerts. Any help or advice would be appreciated, I tried to make the alert flow as simple as possible but still managed to bang it up somehow.
[{"id":"1279864a.6f913a","type":"tab","label":"Weather Alert Flow","disabled":false,"info":"This flow looks for current weather alerts. By default it looks for tornado or thunderstorm, but it can be changed to look for hurricane, flood, or other alert."},{"id":"d4bb8926.65fd68","type":"inject","z":"1279864a.6f913a","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":40,"wires":[["f6fe9d7c.fb7ad"]]},{"id":"cca7689b.bafc68","type":"http request","z":"1279864a.6f913a","name":"NWS Alert Feed","method":"GET","ret":"txt","paytoqs":false,"url":"https://alerts.weather.gov/cap/wwaatmget.php?x=HIC003&y=1","tls":"","persist":false,"proxy":"","authType":"","x":260,"y":140,"wires":[["4d989955.e8e8d8"]]},{"id":"f6fe9d7c.fb7ad","type":"function","z":"1279864a.6f913a","name":"Set User Agent String","func":"\nmsg.headers = {};\nmsg.headers['user-agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36';\nreturn msg;","outputs":1,"noerr":0,"x":180,"y":100,"wires":[["cca7689b.bafc68"]]},{"id":"d1464890.346298","type":"comment","z":"1279864a.6f913a","name":"Set feed to be your county alerts feed.","info":"Use the NWS alert rss feed for your state from this list.\n\nhttps://alerts.weather.gov/","x":170,"y":180,"wires":[]},{"id":"f20b3f92.7a35a","type":"ui_toast","z":"1279864a.6f913a","position":"dialog","displayTime":"5","highlight":"red","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":true,"topic":"ALERT","name":"nws alert","x":680,"y":140,"wires":[[]]},{"id":"5358ae02.bb6a1","type":"switch","z":"1279864a.6f913a","name":"alert choice","property":"payload[1]","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":200,"wires":[[],["f20b3f92.7a35a"]]},{"id":"bb5848c4.39b7d8","type":"debug","z":"1279864a.6f913a","name":"check","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload[1]","targetType":"msg","x":590,"y":80,"wires":[]},{"id":"8d613c6f.a190e","type":"comment","z":"1279864a.6f913a","name":"Alert Feed Address","info":"The check explicitly looks for \"There are no active watches, warnings or advisories\" in the second TITLE tag of the xml return and does a check on it. If FALSE, nothing pops up -- if TRUE, you get the verbose weather alert.\n\n\nCounty Alert Feed\nhttps://alerts.weather.gov/cap/wwaatmget.php?x=HIC003&y=1","x":430,"y":240,"wires":[]},{"id":"22347a4e.96aa16","type":"comment","z":"1279864a.6f913a","name":"Alert text still needs formatting","info":"","x":1030,"y":280,"wires":[]},{"id":"19a61356.77355d","type":"string","z":"1279864a.6f913a","name":"active?","methods":[{"name":"contains","params":[{"type":"str","value":"\"There are no active watches, warnings or advisories\""}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":500,"y":140,"wires":[["5358ae02.bb6a1"]]},{"id":"4d989955.e8e8d8","type":"html","z":"1279864a.6f913a","name":"","property":"payload","outproperty":"payload","tag":"title","ret":"text","as":"single","x":410,"y":200,"wires":[["19a61356.77355d","bb5848c4.39b7d8"]]},{"id":"b2461177.e877d","type":"play audio","z":"1279864a.6f913a","name":"","voice":"43","x":750,"y":20,"wires":[]}]