Skip to content

Commit

Permalink
Merge branch 'master' into v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson authored Feb 4, 2022
2 parents b6787de + ea808b5 commit 3fc8996
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
node-version: [12.x, 14.x, 16.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ os:
- windows
language: node_js
node_js:
- '10'
- '12'
- '14'
- '16'
- 'node'
sudo: required
before_script:
- export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ If you don't find your country, please create an issue on github, and I will be
## 2.0.9 (2021-11-27)
* (jack-blackson) Calculate date in words correctly - this time for real :)

## 2.0.10 (2021-12-10)
* (jack-blackson) Bugfix Sentry IOBROKER-METEOALARM-2K
* (jack-blackson) BUgfix for Ireland

## 2.0.9 (2021-11-27)
* (jack-blackson) Calculate date in words correctly - this time for real :)
* (jack-blackson) Bugfix Sentry IOBROKER-METEOALARM-2N

## 2.0.8 (2021-11-26)
* (jack-blackson) Added new datapoint "No. of active alarms"
Expand Down
20 changes: 14 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async function getData(){
adapter.log.debug('4: Process Atom')
var newdate = moment(new Date()).local().format('DD.MM.YYYY HH:mm')
adapter.setState({device: '' , channel: '',state: 'lastUpdate'}, {val: newdate, ack: true});
adapter.log.debug('4.1 Content: ' + util.inspect(result.feed.entry, {showHidden: false, depth: null, colors: true}))
//adapter.log.debug('4.1 Content: ' + util.inspect(result.feed.entry, {showHidden: false, depth: null, colors: true}))
if (result.feed.entry){
if (result.feed.entry[0]){
adapter.log.debug('4.1.1: Check Entries')
Expand Down Expand Up @@ -239,7 +239,16 @@ async function getData(){
adapter.log.error("Fehler: " + err);
adapter.terminate ? adapter.terminate(0) : process.exit(0);
} else {
result.alert.info.forEach(function (element){
var info = []
if (result.alert.info[0]){
info = result.alert.info
}
else {
info = [result.alert.info]
}

for (var j = 0, l = info.length; j < l; j++){
var element = info[j]
if (element.language == xmlLanguage){
element.parameter.forEach(function (parameter){
if (parameter.valueName == "awareness_type") {
Expand All @@ -248,13 +257,12 @@ async function getData(){
awarenesstype = awarenesstype.substring(0, n)
typeRelevant = checkTypeRelevant(awarenesstype)
adapter.log.debug('Alarm ' + countURL + ' with type ' + awarenesstype + ' relevant: ' + typeRelevant)

}
})
jsonResult = element

}
})
}

}
});
Expand Down Expand Up @@ -308,7 +316,6 @@ async function getData(){
maxAlarmLevel = Number(level.val)
}
}
adapter.log.debug('10.1: Added Alarm for ' + headline.val)

if (!adapter.config.noIcons){
// Dummy cell to move picture away from the left side
Expand Down Expand Up @@ -342,6 +349,7 @@ async function getData(){

htmlCode += '<td style="width: 90%; border-style: none; ' + colorHTML + '">'
if (headline && headline.val){
adapter.log.debug('10.1: Added Alarm for ' + headline.val)
htmlCode += '<h4 style = "margin-top: 5px;margin-bottom: 1px;">' + headline.val + ': '
}
if (effectiveDate && effectiveDate.val && expiresDate && expiresDate.val){
Expand Down Expand Up @@ -1064,7 +1072,7 @@ function getXMLLanguage(country){
return 'is-IS'
break;
case 'IE':
return ''
return 'en-GB'
break;
case 'IL':
return 'he-IL'
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@iobroker/testing": "^2.5.1",
"moment": "2.29.1",
"bent": "^7.3.12",
"csv-parse": "4.16.2",
"csv-parse": "4.16.3",
"xml2js": "^0.4.22"
},
"scripts": {
Expand Down

0 comments on commit 3fc8996

Please sign in to comment.