Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
Small fixes (condition detail trigger)
  • Loading branch information
RonnyWinkler committed Mar 20, 2022
1 parent 61ad15a commit 941670d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@
"1.0.2": {
"en": "Small fixes (Probability of precipitation).",
"de": "Kleine Korrekturen (Niederschalags-Wahrscheinlichkeit)."
},
"1.0.3": {
"en": "Small fixes (condition detail trigger).",
"de": "Kleine Korrekturen (Spez.Wetterbedingungs-Trigger)."
}
}
2 changes: 1 addition & 1 deletion .homeycompose/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "nu.baretta.openweathermap",
"version": "1.0.2",
"version": "1.0.3",
"compatibility": ">=5.0.0",
"sdk": 3,
"name": {
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "This file is generated. Please edit .homeycompose/app.json instead.",
"id": "nu.baretta.openweathermap",
"version": "1.0.2",
"version": "1.0.3",
"compatibility": ">=5.0.0",
"sdk": 3,
"name": {
Expand Down
5 changes: 3 additions & 2 deletions drivers/owmOnecallCurrent/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ class owmCurrent extends Homey.Device {
this.log("Main conditioncode: " + data.current.weather[0].main);

var conditioncode_detail = data.current.weather[0].id.toString();
var conditioncode_detail_number = data.current.weather[0].id;
this.log("Specific conditioncode: " + data.current.weather[0].id);

let now = new Date(data.current.dt*1000).toLocaleString('de-DE',
Expand Down Expand Up @@ -445,10 +446,10 @@ class owmCurrent extends Homey.Device {
this.log("Conditioncode_detail previous: " + this.getCapabilityValue('conditioncode_detail'));
this.log("Conditioncode_detail new: " + conditioncode_detail);
let state = {
"conditioncode": conditioncode_detail
"conditioncode": conditioncode_detail_number
};
let tokens = {
"conditioncode": conditioncode_detail,
"conditioncode": conditioncode_detail_number,
"location": GEOlocation
};
triggerList.push({'trigger':this._flowTriggerConditionDetailChanged, 'device':device, 'token':tokens, 'state':state});
Expand Down
5 changes: 3 additions & 2 deletions drivers/owmOnecallDaily/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ class owmOnecallDaily extends Homey.Device {
var conditioncode = data.weather[0].main;
this.log("Main conditioncode: " + data.weather[0].main);
var conditioncode_detail = data.weather[0].id.toString();
var conditioncode_detail_number = data.weather[0].id;
this.log("Specific conditioncode: " + data.weather[0].id);

var temp_min = Math.round(data.temp.min * 10) / 10;
Expand Down Expand Up @@ -492,10 +493,10 @@ class owmOnecallDaily extends Homey.Device {
this.log("Conditioncode_detail previous: " + this.getCapabilityValue('conditioncode_detail'));
this.log("Conditioncode_detail new: " + conditioncode_detail);
let state = {
"conditioncode": conditioncode_detail
"conditioncode": conditioncode_detail_number
};
let tokens = {
"conditioncode": conditioncode_detail,
"conditioncode": conditioncode_detail_number,
"location": GEOlocation
};
triggerList.push({'trigger':this._flowTriggerConditionDetailChanged, 'device':device, 'token':tokens, 'state':state});
Expand Down
5 changes: 3 additions & 2 deletions drivers/owmOnecallHourly/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class owmOnecallHourly extends Homey.Device {
var conditioncode = data.weather[0].main;
this.log("Main conditioncode: " + data.weather[0].main);
var conditioncode_detail = data.weather[0].id.toString();
var conditioncode_detail_number = data.weather[0].id;
this.log("Specific conditioncode: " + data.weather[0].id);

var temp = Math.round(data.temp* 10) / 10;
Expand Down Expand Up @@ -347,10 +348,10 @@ class owmOnecallHourly extends Homey.Device {
this.log("Conditioncode_detail previous: " + this.getCapabilityValue('conditioncode_detail'));
this.log("Conditioncode_detail new: " + conditioncode_detail);
let state = {
"conditioncode": conditioncode_detail
"conditioncode": conditioncode_detail_number
};
let tokens = {
"conditioncode": conditioncode_detail,
"conditioncode": conditioncode_detail_number,
"location": GEOlocation
};
triggerList.push({'trigger':this._flowTriggerConditionDetailChanged, 'device':device, 'token':tokens, 'state':state});
Expand Down

0 comments on commit 941670d

Please sign in to comment.