ignoring dwd garbage
This commit is contained in:
parent
139d9a1695
commit
91a751de78
1 changed files with 3 additions and 1 deletions
4
index.js
4
index.js
|
@ -56,12 +56,14 @@ async function checkWOMAS() {
|
|||
let dashboardData = await axios.get('https://warnung.bund.de/api31/dashboard/' + regId + '.json')
|
||||
//console.log('dashboardData', dashboardData.data)
|
||||
for (let alarmHead of dashboardData.data) {
|
||||
if (alarmHead.id.indexOf('dwd.') == 0) continue
|
||||
if (!stateMachine[ alarmHead.id ]) {
|
||||
let alarmData = await axios.get('https://nina.api.proxy.bund.dev/api31/warnings/' + alarmHead.id + '.json')
|
||||
for (let infoData of alarmData.data.info) {
|
||||
await sendPage(region.preset, replaceUmlaute(infoData.headline))
|
||||
break
|
||||
}
|
||||
console.log(stateMachine[ alarmHead.id ])
|
||||
console.log(alarmHead.id, stateMachine[ alarmHead.id ])
|
||||
stateMachine[ alarmHead.id ] = alarmData.data.info.length
|
||||
}
|
||||
//console.log('alarmData', alarmData.data)
|
||||
|
|
Loading…
Add table
Reference in a new issue