Forgot to include topic for all alerts in an area
This commit is contained in:
@ -4,6 +4,7 @@ const tornadoWatchEvents = ["Tornado Watch"]
|
||||
const severeThunderstormWatchEvents = ["Severe Thunderstorm Watch"]
|
||||
const area = msg.area
|
||||
const mqttTopic = "weather/alerts/" + area
|
||||
const allTopic = mqttTopic + "/alerts"
|
||||
const tstormTopic = mqttTopic + "/severe_thunderstorm_warning"
|
||||
const tornadoWarnTopic = mqttTopic + "/tornado_warning"
|
||||
const tornadoWatchTopic = mqttTopic + "/tornado_watch"
|
||||
@ -95,7 +96,8 @@ let severe_thunderstorm_watch = alerts.filter(function(alert) {
|
||||
// If there are any alerts, return them
|
||||
|
||||
let allAlerts = {
|
||||
"payload": msg.payload.features
|
||||
"payload": msg.payload.features,
|
||||
"topic": allTopic
|
||||
}
|
||||
|
||||
let tstormMsg = {
|
||||
|
Reference in New Issue
Block a user