Skip to content

Commit

Permalink
Merge pull request #170 from jack-blackson/v2.3.6
Browse files Browse the repository at this point in the history
V2.3.6
  • Loading branch information
jack-blackson authored May 27, 2023
2 parents be16ee6 + 990ba2a commit 7401faa
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Choose your country, and afterwards the region you want the warnings for. If you

## Changelog

## 2.3.6 (2023-05-27)
* (jack-blackson) Bugfix "No Alarm" Message

## 2.3.5 (2023-03-27)
* (jack-blackson) IOBROKER-METEOALARM-47 & IOBROKER-METEOALARM-48

Expand Down
15 changes: 14 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{
"common": {
"name": "meteoalarm",
"version": "2.3.5",
"version": "2.3.6",
"news": {
"2.3.6": {
"en": "Bugfix for notification \"All warnings ended\"",
"de": "Bugfix für die Benachrichtigung \"Alle Warnungen beendet\"",
"ru": "Bugfix для уведомления \"Все предупреждения закончились\"",
"pt": "Bugfix para notificação \"Todos os avisos terminados\"",
"nl": "Bugfix voor de melding \"Alle waarschuwingen eindigden\"",
"fr": "Bugfix pour la notification \"Tous les avertissements ont pris fin\"",
"it": "Bugfix per la notifica \"Tutti gli avvisi finiti\"",
"es": "Bugfix para notificación \"Todas las advertencias terminadas\"",
"pl": "Bugfix dla powiadomienia „Wszystkich ostrzeżeń zakończyło się”",
"uk": "Виправлення повідомлень \"Всі попередження закінчилися\"",
"zh-cn": "通知“所有警告结束”的命令"
},
"2.3.5": {
"en": "Bugfix",
"de": "Fehlerbehebung",
Expand Down
12 changes: 5 additions & 7 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,12 +631,9 @@ async function getData(){
])
adapter.log.debug('13: Set State for Widget')

if (notificationAlarmArray.length >= 1){
adapter.log.debug('14: Processing notifications')
const promises = await processNotifications(alarmAll)
}else{
adapter.log.debug('14: No new notifications to send')
}
adapter.log.debug('14: Processing notifications')
// Important, also go in there if no notifications are valid, because it could be that we need to trigger the "All warnings done" message
const promises = await processNotifications(alarmAll)


adapter.log.debug('15: All Done')
Expand Down Expand Up @@ -1002,7 +999,7 @@ async function processNotifications(alarms){
if (notificationAlarmArray.length >= 1){
adapter.log.debug('14.1: Notifications available for alarms: ' + util.inspect(notificationAlarmArray, {showHidden: false, depth: null, colors: true}))
}

adapter.log.debug('14.1.0 Details: noofAlarmsAtStart: ' + noOfAlarmsAtStart + ', noofAlarmsatEnd: ' + noOfAlarmsAtEnd + ' , noWarningsSetupActive: ' + adapter.config.noWarningsNotification)


for(var i = 0; i < notificationAlarmArray.length; i += 1) {
Expand Down Expand Up @@ -1031,6 +1028,7 @@ async function processNotifications(alarms){

if ((noOfAlarmsAtStart >= 1) &&(noOfAlarmsAtEnd == 0) && (adapter.config.noWarningsNotification)){
// all Alarms Ended notification should be sent
adapter.log.debug('14.1.1: Warning for "All warnings ended" sent')
var region = ""
if (adapter.config.showLocation){
region = ' - ' + regionName
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.meteoalarm",
"version": "2.3.5",
"version": "2.3.6",
"description": "Meteolaram",
"main": "main.js",
"repository": {
Expand Down

0 comments on commit 7401faa

Please sign in to comment.