Skip to content

Commit

Permalink
var
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson committed Mar 27, 2023
1 parent 7384b52 commit be4628b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 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.5 (2023-03-27)
* (jack-blackson) IOBROKER-METEOALARM-47 & IOBROKER-METEOALARM-48

## 2.3.4 (2023-03-26)
* (jack-blackson) IOBROKER-METEOALARM-4A

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.4",
"version": "2.3.5",
"news": {
"2.3.5": {
"en": "Bugfix",
"de": "Fehlerbehebung",
"ru": "Исправление ошибок",
"pt": "Correções de bugs",
"nl": "Bugfixes",
"fr": "Corrections de bugs",
"it": "Correzioni di bug",
"es": "Corrección de errores",
"pl": "Poprawki",
"zh-cn": "Bug修复",
"uk": "Виправлення помилок"
},
"2.3.4": {
"en": "Bugfix",
"de": "Fehlerbehebung",
Expand Down
28 changes: 23 additions & 5 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ async function getData(){
const csv = await getCSVData()

const temp = await adapter.getStateAsync('noOfAlarms')
noOfAlarmsAtStart = temp.val
if (temp){
noOfAlarmsAtStart = temp.val
}
adapter.log.debug('0: Existing alarm objects at adapter start: ' + noOfAlarmsAtStart)

const temp2 = await saveAlarmNamesForLater()
Expand Down Expand Up @@ -731,6 +733,10 @@ function checkRelevante(entry){
}

var eventType = element['cap:event']

if (locationRelevant){
adapter.log.debug('4.1.2: Check Result: dateRelevant = ' + dateRelevant + "statusrelevant= " + statusRelevant + " messagetyperelevant = " + messagetypeRelevant )
}

if (locationRelevant && (dateRelevant) && statusRelevant && messagetypeRelevant){
for(var i = 0; i < element.link.length; i += 1) {
Expand Down Expand Up @@ -905,7 +911,10 @@ async function saveAlarmNamesForLater(){
async function saveAlarmsForLater(alarmName){
let path = 'alarms.' + alarmName

const effective = await adapter.getStateAsync(path + '.effective')
var effective = await adapter.getStateAsync(path + '.effective')
if (effective == null){
effective = ""
}
var referenz = await adapter.getStateAsync(path + '.updateIdentifier')
if (referenz == null){
referenz = ""
Expand All @@ -914,9 +923,18 @@ async function saveAlarmsForLater(alarmName){
if (sent == null){
sent = ""
}
const expires = await adapter.getStateAsync(path + '.expires')
const tempLevel = await adapter.getStateAsync(path + '.effective')
const type = await adapter.getStateAsync(path + '.type')
var expires = await adapter.getStateAsync(path + '.expires')
if (expires == null){
expires = ""
}
var tempLevel = await adapter.getStateAsync(path + '.level')
if (tempLevel == null){
tempLevel = ""
}
var type = await adapter.getStateAsync(path + '.type')
if (type == null){
type = ""
}
alarmOldArray.push(
{
Alarm_Identifier: alarmName,
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.4",
"version": "2.3.5",
"description": "Meteolaram",
"main": "main.js",
"repository": {
Expand Down

0 comments on commit be4628b

Please sign in to comment.