diff --git a/.homeychangelog.json b/.homeychangelog.json index e11ae8a..9a14e1c 100644 --- a/.homeychangelog.json +++ b/.homeychangelog.json @@ -246,5 +246,13 @@ "1.4.5": { "en": "Clear capability if value is not provided by OWM.", "de": "Lösche Attribut, wenn keine OWM-Daten verfügbar sind." + }, + "1.4.6": { + "en": "Check for invalid values before triggering flows.", + "de": "Prüfe auf ungültige Werte vor Flows-Trigger-Auslösung." + }, + "1.5.0": { + "en": "Added OneCall API device for historical daily summary. Added instructions to pair view.", + "de": "OneCall API Gerät für historische tägliche Zusammenfassung ergänzt. Anleitung für Greät-Hinzufügen-Dialog ergänzt" } } diff --git a/.homeycompose/app.json b/.homeycompose/app.json index be098f5..2810384 100644 --- a/.homeycompose/app.json +++ b/.homeycompose/app.json @@ -1,6 +1,6 @@ { "id": "nu.baretta.openweathermap", - "version": "1.4.5", + "version": "1.5.0", "compatibility": ">=8.1.1", "sdk": 3, "name": { diff --git a/.homeycompose/flow/actions/update_device.json b/.homeycompose/flow/actions/update_device.json index e4fcd40..f1b2e68 100644 --- a/.homeycompose/flow/actions/update_device.json +++ b/.homeycompose/flow/actions/update_device.json @@ -13,7 +13,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmAirPollutionCurrent|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmAirPollutionCurrent|owmCurrentWeather|owmOnecallDailySummary" } ] } diff --git a/.homeycompose/flow/conditions/Clouds.json b/.homeycompose/flow/conditions/Clouds.json index 2c3cfcb..3ff90ba 100644 --- a/.homeycompose/flow/conditions/Clouds.json +++ b/.homeycompose/flow/conditions/Clouds.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "cloudiness", diff --git a/.homeycompose/flow/conditions/Humidity.json b/.homeycompose/flow/conditions/Humidity.json index 165aadc..cac9dfe 100644 --- a/.homeycompose/flow/conditions/Humidity.json +++ b/.homeycompose/flow/conditions/Humidity.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "humidity", diff --git a/.homeycompose/flow/conditions/Pressure.json b/.homeycompose/flow/conditions/Pressure.json index ca57817..5165c0e 100644 --- a/.homeycompose/flow/conditions/Pressure.json +++ b/.homeycompose/flow/conditions/Pressure.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "bar", diff --git a/.homeycompose/flow/conditions/Rain.json b/.homeycompose/flow/conditions/Rain.json index e72b424..12b7216 100644 --- a/.homeycompose/flow/conditions/Rain.json +++ b/.homeycompose/flow/conditions/Rain.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "rain", diff --git a/.homeycompose/flow/conditions/Tempday.json b/.homeycompose/flow/conditions/Tempday.json index 388eafd..cd22561 100644 --- a/.homeycompose/flow/conditions/Tempday.json +++ b/.homeycompose/flow/conditions/Tempday.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", diff --git a/.homeycompose/flow/conditions/Tempeve.json b/.homeycompose/flow/conditions/Tempeve.json index dfa7cc2..4cd21b9 100644 --- a/.homeycompose/flow/conditions/Tempeve.json +++ b/.homeycompose/flow/conditions/Tempeve.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", diff --git a/.homeycompose/flow/conditions/Tempmax.json b/.homeycompose/flow/conditions/Tempmax.json index 05bb1ec..1fb4b74 100644 --- a/.homeycompose/flow/conditions/Tempmax.json +++ b/.homeycompose/flow/conditions/Tempmax.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "degrees", diff --git a/.homeycompose/flow/conditions/Tempmin.json b/.homeycompose/flow/conditions/Tempmin.json index f7d7384..f9de1c8 100644 --- a/.homeycompose/flow/conditions/Tempmin.json +++ b/.homeycompose/flow/conditions/Tempmin.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "degrees", diff --git a/.homeycompose/flow/conditions/Tempmorn.json b/.homeycompose/flow/conditions/Tempmorn.json index 33fe804..6e58a9d 100644 --- a/.homeycompose/flow/conditions/Tempmorn.json +++ b/.homeycompose/flow/conditions/Tempmorn.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", diff --git a/.homeycompose/flow/conditions/Tempnight.json b/.homeycompose/flow/conditions/Tempnight.json index 923fb34..974cda3 100644 --- a/.homeycompose/flow/conditions/Tempnight.json +++ b/.homeycompose/flow/conditions/Tempnight.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", diff --git a/.homeycompose/flow/conditions/Winddirection.json b/.homeycompose/flow/conditions/Winddirection.json index 38af738..427b5bd 100644 --- a/.homeycompose/flow/conditions/Winddirection.json +++ b/.homeycompose/flow/conditions/Winddirection.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "winddirection", "type": "dropdown", diff --git a/.homeycompose/flow/conditions/Windforce.json b/.homeycompose/flow/conditions/Windforce.json index 0e6b7f4..8533e34 100644 --- a/.homeycompose/flow/conditions/Windforce.json +++ b/.homeycompose/flow/conditions/Windforce.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "windforce", diff --git a/.homeycompose/flow/conditions/Windspeed.json b/.homeycompose/flow/conditions/Windspeed.json index b5e8a8b..cea1308 100644 --- a/.homeycompose/flow/conditions/Windspeed.json +++ b/.homeycompose/flow/conditions/Windspeed.json @@ -18,7 +18,7 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "windspeed", diff --git a/.homeycompose/flow/triggers/CloudinessChanged.json b/.homeycompose/flow/triggers/CloudinessChanged.json index fe7111d..9fd3e57 100644 --- a/.homeycompose/flow/triggers/CloudinessChanged.json +++ b/.homeycompose/flow/triggers/CloudinessChanged.json @@ -37,6 +37,6 @@ "args": [{ "name": "ChangedCloudiness", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/HumidityChanged.json b/.homeycompose/flow/triggers/HumidityChanged.json index f597497..bf6ea22 100644 --- a/.homeycompose/flow/triggers/HumidityChanged.json +++ b/.homeycompose/flow/triggers/HumidityChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/PressureChanged.json b/.homeycompose/flow/triggers/PressureChanged.json index 22ce620..c8ea461 100644 --- a/.homeycompose/flow/triggers/PressureChanged.json +++ b/.homeycompose/flow/triggers/PressureChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/RainChanged.json b/.homeycompose/flow/triggers/RainChanged.json index 45cc46e..6f30b45 100644 --- a/.homeycompose/flow/triggers/RainChanged.json +++ b/.homeycompose/flow/triggers/RainChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/TemperatureDayChanged.json b/.homeycompose/flow/triggers/TemperatureDayChanged.json index 9040983..e19d9a7 100644 --- a/.homeycompose/flow/triggers/TemperatureDayChanged.json +++ b/.homeycompose/flow/triggers/TemperatureDayChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/TemperatureEveningChanged.json b/.homeycompose/flow/triggers/TemperatureEveningChanged.json index f61fc87..bd34843 100644 --- a/.homeycompose/flow/triggers/TemperatureEveningChanged.json +++ b/.homeycompose/flow/triggers/TemperatureEveningChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/TemperatureMaxChanged.json b/.homeycompose/flow/triggers/TemperatureMaxChanged.json index 316d762..c53d61c 100644 --- a/.homeycompose/flow/triggers/TemperatureMaxChanged.json +++ b/.homeycompose/flow/triggers/TemperatureMaxChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/TemperatureMinChanged.json b/.homeycompose/flow/triggers/TemperatureMinChanged.json index 7069036..8adbfb8 100644 --- a/.homeycompose/flow/triggers/TemperatureMinChanged.json +++ b/.homeycompose/flow/triggers/TemperatureMinChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/TemperatureMorningChanged.json b/.homeycompose/flow/triggers/TemperatureMorningChanged.json index 2015c39..eda408a 100644 --- a/.homeycompose/flow/triggers/TemperatureMorningChanged.json +++ b/.homeycompose/flow/triggers/TemperatureMorningChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/TemperatureNightChanged.json b/.homeycompose/flow/triggers/TemperatureNightChanged.json index 4402bd2..8e4c333 100644 --- a/.homeycompose/flow/triggers/TemperatureNightChanged.json +++ b/.homeycompose/flow/triggers/TemperatureNightChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/WindAngleChanged.json b/.homeycompose/flow/triggers/WindAngleChanged.json index 681904d..d0b6b1c 100644 --- a/.homeycompose/flow/triggers/WindAngleChanged.json +++ b/.homeycompose/flow/triggers/WindAngleChanged.json @@ -37,6 +37,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/WindBeaufortChanged.json b/.homeycompose/flow/triggers/WindBeaufortChanged.json index e0f3343..17c3acc 100644 --- a/.homeycompose/flow/triggers/WindBeaufortChanged.json +++ b/.homeycompose/flow/triggers/WindBeaufortChanged.json @@ -37,6 +37,6 @@ "args": [{ "name": "ChangedWindspeedBeaufort", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/WindCombinedChanged.json b/.homeycompose/flow/triggers/WindCombinedChanged.json index 539c817..fe3408b 100644 --- a/.homeycompose/flow/triggers/WindCombinedChanged.json +++ b/.homeycompose/flow/triggers/WindCombinedChanged.json @@ -39,6 +39,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/WindDirectionCompassChanged.json b/.homeycompose/flow/triggers/WindDirectionCompassChanged.json index a7ecab0..43d6e4f 100644 --- a/.homeycompose/flow/triggers/WindDirectionCompassChanged.json +++ b/.homeycompose/flow/triggers/WindDirectionCompassChanged.json @@ -39,6 +39,6 @@ "args": [{ "name": "ChangedWindDirectionCompass", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.homeycompose/flow/triggers/WindStrengthChanged.json b/.homeycompose/flow/triggers/WindStrengthChanged.json index 241694e..b164023 100644 --- a/.homeycompose/flow/triggers/WindStrengthChanged.json +++ b/.homeycompose/flow/triggers/WindStrengthChanged.json @@ -38,6 +38,6 @@ "args": [{ "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }] } \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 61c7090..9d8c958 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,7 @@ "restart": true, "name": "Attach OpenWeather to Homey Dev", "address": "192.168.1.13", - "port": 9222, + "port": 9230, "localRoot": "${workspaceFolder}", "remoteRoot": "/" }, @@ -20,7 +20,7 @@ "restart": true, "name": "Attach OpenWeather to Homey Pro", "address": "192.168.1.12", - "port": 9222, + "port": 9230, "localRoot": "${workspaceFolder}", "remoteRoot": "/" }, @@ -30,7 +30,7 @@ "restart": true, "name": "Attach OpenWeather to Homey Pro23", "address": "192.168.1.14", - "port": 9222, + "port": 9230, "localRoot": "${workspaceFolder}", "remoteRoot": "/app/" } diff --git a/app.js b/app.js index bd416fc..298424f 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ if (process.env.DEBUG === '1') { - require('inspector').open(9222, '0.0.0.0', true); + require('inspector').open(9230, '0.0.0.0', true); } 'use strict'; diff --git a/app.json b/app.json index a60892c..a38061d 100644 --- a/app.json +++ b/app.json @@ -1,7 +1,7 @@ { "_comment": "This file is generated. Please edit .homeycompose/app.json instead.", "id": "nu.baretta.openweathermap", - "version": "1.4.5", + "version": "1.5.0", "compatibility": ">=8.1.1", "sdk": 3, "name": { @@ -165,7 +165,7 @@ { "name": "ChangedCloudiness", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -401,7 +401,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1143,7 +1143,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1189,7 +1189,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1416,7 +1416,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" } ] }, @@ -1462,7 +1462,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" } ] }, @@ -1554,7 +1554,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1600,7 +1600,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1646,7 +1646,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" } ] }, @@ -1692,7 +1692,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" } ] }, @@ -1892,7 +1892,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1937,7 +1937,7 @@ { "name": "ChangedWindspeedBeaufort", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -1984,7 +1984,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -2031,7 +2031,7 @@ { "name": "ChangedWindDirectionCompass", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] }, @@ -2123,7 +2123,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" } ] } @@ -2165,7 +2165,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "cloudiness", @@ -2750,7 +2750,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "humidity", @@ -3222,7 +3222,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "bar", @@ -3251,7 +3251,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "rain", @@ -3338,7 +3338,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallDaily" + "filter": "driver_id=owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", @@ -3367,7 +3367,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", @@ -3425,7 +3425,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "degrees", @@ -3454,7 +3454,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "degrees", @@ -3483,7 +3483,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", @@ -3512,7 +3512,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmLongterm|owmOnecallDaily" + "filter": "driver_id=owmLongterm|owmOnecallDaily|owmOnecallDailySummary" }, { "name": "degrees", @@ -3570,7 +3570,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "winddirection", @@ -3729,7 +3729,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "windforce", @@ -3787,7 +3787,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather" + "filter": "driver_id=owmCurrent|owmForecast|owmLongterm|owmOnecallCurrent|owmOnecallHourly|owmOnecallDaily|owmCurrentWeather|owmOnecallDailySummary" }, { "name": "windspeed", @@ -3812,7 +3812,7 @@ { "name": "device", "type": "device", - "filter": "driver_id=owmOnecallCurrent|owmAirPollutionCurrent|owmCurrentWeather" + "filter": "driver_id=owmOnecallCurrent|owmAirPollutionCurrent|owmCurrentWeather|owmOnecallDailySummary" } ], "id": "update_device" @@ -3823,9 +3823,9 @@ { "id": "owmAirPollutionCurrent", "name": { - "en": "5. Air quality current (location)", - "de": "5. Luftqualität aktuell (Standort)", - "nl": "5. luchtkwaliteit actueel (locatie)" + "en": "6. Air quality current (location)", + "de": "6. Luftqualität aktuell (Standort)", + "nl": "6. luchtkwaliteit actueel (locatie)" }, "images": { "large": "/drivers/owmAirPollutionCurrent/assets/images/large.png", @@ -3855,6 +3855,12 @@ "next": "list_my_devices" } }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } + }, { "id": "apikey_error", "navigation": { @@ -3951,15 +3957,34 @@ } } ] + }, + { + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] } ] }, { "id": "owmAirPollutionHourly", "name": { - "en": "6. Air quality, hourly forecast", - "de": "6. Luftqualität, stündliche Vorhersage", - "nl": "6. luchtkwaliteit, uurlijkse voorspeling" + "en": "7. Air quality, hourly forecast", + "de": "7. Luftqualität, stündliche Vorhersage", + "nl": "7. luchtkwaliteit, uurlijkse voorspeling" }, "images": { "large": "/drivers/owmAirPollutionHourly/assets/images/large.png", @@ -4177,9 +4202,9 @@ { "id": "owmCurrentWeather", "name": { - "en": "7. Weather, current (free Current Weather API)", - "de": "7. Wetter, aktuell (freie Current Weather API)", - "nl": "7. Weerbericht, actueel (vrij Current Weather API)" + "en": "8. Weather, current (free Current Weather API)", + "de": "8. Wetter, aktuell (freie Current Weather API)", + "nl": "8. Weerbericht, actueel (vrij Current Weather API)" }, "images": { "large": "/drivers/owmCurrentWeather/assets/images/large.png", @@ -4220,6 +4245,12 @@ "next": "list_my_devices" } }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } + }, { "id": "apikey_error", "navigation": { @@ -4326,6 +4357,25 @@ } } ] + }, + { + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] } ] }, @@ -4855,6 +4905,12 @@ "next": "list_my_devices" } }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } + }, { "id": "apikey_error", "navigation": { @@ -4990,6 +5046,25 @@ } } ] + }, + { + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] } ] }, @@ -5119,6 +5194,197 @@ } ] }, + { + "id": "owmOnecallDailySummary", + "name": { + "en": "5. Weather, daily summary", + "de": "5. Wetter, tägliche Zusammenfassung", + "nl": "5. Weerbericht, dagelijkse samenvatting" + }, + "images": { + "large": "/drivers/owmOnecallDailySummary/assets/images/large.png", + "small": "/drivers/owmOnecallDailySummary/assets/images/small.png" + }, + "class": "other", + "connectivity": [ + "cloud" + ], + "capabilities": [ + "forecast_time", + "measure_cloudiness", + "measure_rain", + "measure_humidity", + "measure_temperature_min", + "measure_temperature_max", + "measure_temperature_morning", + "measure_temperature_day", + "measure_temperature_evening", + "measure_temperature_night", + "measure_wind_combined", + "measure_wind_strength", + "measure_pressure", + "measure_wind_angle", + "measure_wind_direction_string", + "measure_windstrength_beaufort" + ], + "pair": [ + { + "id": "city_geocode", + "navigation": { + "next": "list_my_devices" + } + }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } + }, + { + "id": "apikey_error", + "navigation": { + "prev": "city_geocode" + } + }, + { + "id": "geolocation_error", + "navigation": { + "prev": "city_geocode" + } + }, + { + "id": "list_my_devices", + "template": "list_devices", + "navigation": { + "next": "add_my_devices", + "prev": "city_geocode" + }, + "options": { + "singular": true + } + }, + { + "id": "add_my_devices", + "template": "add_devices" + } + ], + "settings": [ + { + "type": "group", + "label": { + "en": "OpenWeatherMap daily summary and location", + "de": "OpenWeatherMap tägliche Zusammenfassung und Standort", + "nl": "OpenWeatherMap dagelijkse samenvatting en locatie" + }, + "children": [ + { + "id": "APIKey", + "type": "text", + "value": "", + "label": { + "en": "OpenWeatherMap API key", + "de": "OpenWeatherMap API-Key", + "nl": "OpenWeatherMap API sleutel" + } + }, + { + "id": "lat", + "type": "number", + "label": { + "en": "Latitude:", + "de": "Breitengrad:", + "nl": "Breedtegraad:" + } + }, + { + "id": "lon", + "type": "number", + "label": { + "en": "Longitude:", + "de": "Längengrad:", + "nl": "Lengtegraad:" + } + }, + { + "id": "days", + "type": "number", + "value": -1, + "min": -365, + "max": 4, + "units": { + "en": "Days", + "de": "Tage", + "nl": "Dagen" + }, + "label": { + "en": "Day difference for the historical data or forecast:", + "de": "Tages-Differenz für die historischen Daten oder die Vorhersage:", + "nl": "dagelijks verschil voor de historische gegevens of voorspelling:" + } + }, + { + "id": "pollingActive", + "type": "checkbox", + "value": true, + "label": { + "en": "Polling active", + "de": "Abfrage aktiv", + "nl": "Polling actief" + } + }, + { + "id": "pollingInterval", + "type": "number", + "value": 5, + "label": { + "en": "Polling interval:", + "de": "Abfrageintervall:", + "nl": "Polling interval:" + }, + "hint": { + "en": "Set a polling interval. The default is 5 minutes. 1000 queries per day are allowed per API key.", + "de": "Setze ein Abfrageintervall. Der Standardwert sind 5 Minuten. Je API-Key sind 1000 Abfragen je Tag erlaubt.", + "nl": "Stel een polling-interval in. De standaardwaarde is 5 minuten. Per API-sleutel zijn 1000 queries per dag toegestaan." + }, + "units": { + "en": "minutes", + "de": "Minuten", + "nl": "Minuten" + } + }, + { + "id": "windspeed_ms", + "type": "checkbox", + "value": false, + "label": { + "en": "Wind speed in m/s", + "de": "Windgeschwindigkeit in m/s", + "nl": "Windsnelheid in m/s" + } + } + ] + }, + { + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] + } + ] + }, { "id": "owmOnecallHourly", "name": { diff --git a/drivers/owmAirPollutionCurrent/device.js b/drivers/owmAirPollutionCurrent/device.js index d06eb25..9e3ebb2 100644 --- a/drivers/owmAirPollutionCurrent/device.js +++ b/drivers/owmAirPollutionCurrent/device.js @@ -177,7 +177,7 @@ class owmAirPollutionCurrent extends Homey.Device { month: "2-digit", year: "numeric" }); - lastUpdate = 'Last update: ' + now.replace(',', ''); + lastUpdate = now.replace(',', ''); } else{ let now = new Date(data.list[0].dt*1000).toLocaleString('de-DE', @@ -208,7 +208,7 @@ class owmAirPollutionCurrent extends Homey.Device { date = now.split(", ")[0]; date = date.split("/")[2] + "-" + date.split("/")[0] + "-" + date.split("/")[1]; time = now.split(", ")[1]; - lastUpdate = 'Last update: ' + date + " " + time; + lastUpdate = date + " " + time; } this.setSettings({ diff --git a/drivers/owmAirPollutionCurrent/driver.compose.json b/drivers/owmAirPollutionCurrent/driver.compose.json index 8f6e137..87cc049 100644 --- a/drivers/owmAirPollutionCurrent/driver.compose.json +++ b/drivers/owmAirPollutionCurrent/driver.compose.json @@ -1,9 +1,9 @@ { "id": "owmAirPollutionCurrent", "name": { - "en": "5. Air quality current (location)", - "de": "5. Luftqualität aktuell (Standort)", - "nl": "5. luchtkwaliteit actueel (locatie)" + "en": "6. Air quality current (location)", + "de": "6. Luftqualität aktuell (Standort)", + "nl": "6. luchtkwaliteit actueel (locatie)" }, "images": { "large": "/drivers/owmAirPollutionCurrent/assets/images/large.png", @@ -29,11 +29,18 @@ "measure_ap_aqi_nr" ], - "pair": [{ - "id": "city_geocode", - "navigation": { - "next": "list_my_devices" - } + "pair": [ + { + "id": "city_geocode", + "navigation": { + "next": "list_my_devices" + } + }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } }, { "id": "apikey_error", diff --git a/drivers/owmAirPollutionCurrent/driver.settings.compose.json b/drivers/owmAirPollutionCurrent/driver.settings.compose.json index faffc5f..03e3217 100644 --- a/drivers/owmAirPollutionCurrent/driver.settings.compose.json +++ b/drivers/owmAirPollutionCurrent/driver.settings.compose.json @@ -64,5 +64,24 @@ } } ] +}, +{ + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] } ] \ No newline at end of file diff --git a/drivers/owmAirPollutionCurrent/pair/city_geocode.html b/drivers/owmAirPollutionCurrent/pair/city_geocode.html index bbdf954..e3c92d9 100644 --- a/drivers/owmAirPollutionCurrent/pair/city_geocode.html +++ b/drivers/owmAirPollutionCurrent/pair/city_geocode.html @@ -22,6 +22,10 @@ //document.getElementById('found_nr').value = result; }); } + + function onClickInstructions(){ + Homey.showView("instructions"); + }
@@ -29,6 +33,11 @@ +
+
diff --git a/drivers/owmAirPollutionCurrent/pair/instructions.html b/drivers/owmAirPollutionCurrent/pair/instructions.html new file mode 100644 index 0000000..a516a7f --- /dev/null +++ b/drivers/owmAirPollutionCurrent/pair/instructions.html @@ -0,0 +1,17 @@ + + +
+
+ +
+
+

+
+
\ No newline at end of file diff --git a/drivers/owmAirPollutionHourly/driver.compose.json b/drivers/owmAirPollutionHourly/driver.compose.json index 372f0d1..a744120 100644 --- a/drivers/owmAirPollutionHourly/driver.compose.json +++ b/drivers/owmAirPollutionHourly/driver.compose.json @@ -1,9 +1,9 @@ { "id": "owmAirPollutionHourly", "name": { - "en": "6. Air quality, hourly forecast", - "de": "6. Luftqualität, stündliche Vorhersage", - "nl": "6. luchtkwaliteit, uurlijkse voorspeling" + "en": "7. Air quality, hourly forecast", + "de": "7. Luftqualität, stündliche Vorhersage", + "nl": "7. luchtkwaliteit, uurlijkse voorspeling" }, "images": { "large": "/drivers/owmAirPollutionHourly/assets/images/large.png", diff --git a/drivers/owmCurrentWeather/device.js b/drivers/owmCurrentWeather/device.js index ee67ef4..c5d1047 100644 --- a/drivers/owmCurrentWeather/device.js +++ b/drivers/owmCurrentWeather/device.js @@ -172,7 +172,7 @@ class owmCurrenWeather extends Homey.Device { month: "2-digit", year: "numeric" }); - lastUpdate = 'Last update: ' + now.replace(',', ''); + lastUpdate = now.replace(',', ''); } else{ let now = new Date(data.dt*1000).toLocaleString('en-US', @@ -203,7 +203,7 @@ class owmCurrenWeather extends Homey.Device { date = now.split(", ")[0]; date = date.split("/")[2] + "-" + date.split("/")[0] + "-" + date.split("/")[1]; time = now.split(", ")[1]; - lastUpdate = 'Last update: ' + date + " " + time; + lastUpdate = date + " " + time; } this.setSettings({ @@ -401,8 +401,8 @@ class owmCurrenWeather extends Homey.Device { } this.log(this.getName() + " Trigger flow: " + item.trigger); item['trigger_start'] = false; - await item.trigger_instance.trigger(this, token, state); - // .catch(error => this.log(error.message)); + await item.trigger_instance.trigger(this, token, state) + .catch(error => this.log(error.message)); } } } diff --git a/drivers/owmCurrentWeather/driver.compose.json b/drivers/owmCurrentWeather/driver.compose.json index 73fccec..8e55503 100644 --- a/drivers/owmCurrentWeather/driver.compose.json +++ b/drivers/owmCurrentWeather/driver.compose.json @@ -1,9 +1,9 @@ { "id": "owmCurrentWeather", "name": { - "en": "7. Weather, current (free Current Weather API)", - "de": "7. Wetter, aktuell (freie Current Weather API)", - "nl": "7. Weerbericht, actueel (vrij Current Weather API)" + "en": "8. Weather, current (free Current Weather API)", + "de": "8. Wetter, aktuell (freie Current Weather API)", + "nl": "8. Weerbericht, actueel (vrij Current Weather API)" }, "images": { "large": "/drivers/owmCurrentWeather/assets/images/large.png", @@ -45,11 +45,18 @@ "conditioncode_text" ], - "pair": [{ - "id": "city_geocode", - "navigation": { - "next": "list_my_devices" - } + "pair": [ + { + "id": "city_geocode", + "navigation": { + "next": "list_my_devices" + } + }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } }, { "id": "apikey_error", diff --git a/drivers/owmCurrentWeather/driver.settings.compose.json b/drivers/owmCurrentWeather/driver.settings.compose.json index cb5d771..01436ad 100644 --- a/drivers/owmCurrentWeather/driver.settings.compose.json +++ b/drivers/owmCurrentWeather/driver.settings.compose.json @@ -75,5 +75,24 @@ } } ] +}, +{ + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] } ] \ No newline at end of file diff --git a/drivers/owmCurrentWeather/pair/city_geocode.html b/drivers/owmCurrentWeather/pair/city_geocode.html index bbdf954..e3c92d9 100644 --- a/drivers/owmCurrentWeather/pair/city_geocode.html +++ b/drivers/owmCurrentWeather/pair/city_geocode.html @@ -22,6 +22,10 @@ //document.getElementById('found_nr').value = result; }); } + + function onClickInstructions(){ + Homey.showView("instructions"); + }
@@ -29,6 +33,11 @@ +
+
diff --git a/drivers/owmCurrentWeather/pair/instructions.html b/drivers/owmCurrentWeather/pair/instructions.html new file mode 100644 index 0000000..a516a7f --- /dev/null +++ b/drivers/owmCurrentWeather/pair/instructions.html @@ -0,0 +1,17 @@ + + +
+
+ +
+
+

+
+
\ No newline at end of file diff --git a/drivers/owmOnecallCurrent/device.js b/drivers/owmOnecallCurrent/device.js index a4d94e7..6a9e8e8 100644 --- a/drivers/owmOnecallCurrent/device.js +++ b/drivers/owmOnecallCurrent/device.js @@ -210,7 +210,7 @@ class owmOnecallCurrent extends Homey.Device { month: "2-digit", year: "numeric" }); - lastUpdate = 'Last update: ' + now.replace(',', ''); + lastUpdate = now.replace(',', ''); } else{ let now = new Date(data.current.dt*1000).toLocaleString('en-US', @@ -241,7 +241,7 @@ class owmOnecallCurrent extends Homey.Device { date = now.split(", ")[0]; date = date.split("/")[2] + "-" + date.split("/")[0] + "-" + date.split("/")[1]; time = now.split(", ")[1]; - lastUpdate = 'Last update: ' + date + " " + time; + lastUpdate = date + " " + time; } this.setSettings({ @@ -474,8 +474,8 @@ class owmOnecallCurrent extends Homey.Device { } this.log(this.getName() + " Trigger flow: " + item.trigger); item['trigger_start'] = false; - await item.trigger_instance.trigger(this, token, state); - // .catch(error => this.log(error.message)); + await item.trigger_instance.trigger(this, token, state) + .catch(error => this.log(error.message)); } } diff --git a/drivers/owmOnecallCurrent/driver.compose.json b/drivers/owmOnecallCurrent/driver.compose.json index a42fe11..244b0c9 100644 --- a/drivers/owmOnecallCurrent/driver.compose.json +++ b/drivers/owmOnecallCurrent/driver.compose.json @@ -46,11 +46,18 @@ "measure_windstrength_beaufort", "conditioncode_text" ], - "pair": [{ - "id": "city_geocode", - "navigation": { - "next": "list_my_devices" - } + "pair": [ + { + "id": "city_geocode", + "navigation": { + "next": "list_my_devices" + } + }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } }, { "id": "apikey_error", diff --git a/drivers/owmOnecallCurrent/driver.settings.compose.json b/drivers/owmOnecallCurrent/driver.settings.compose.json index 15bb086..d50758e 100644 --- a/drivers/owmOnecallCurrent/driver.settings.compose.json +++ b/drivers/owmOnecallCurrent/driver.settings.compose.json @@ -100,5 +100,24 @@ } } ] +}, +{ + "type": "group", + "label": { + "en": "Device Information", + "de": "Geräte-Information", + "nl": "Apparaat informatie" + }, + "children": [ + { + "id": "APIState", + "type": "label", + "label": { + "en": "Last update", + "de": "Letzte Aktualisierung", + "nl": "laatste update" + } + } + ] } ] \ No newline at end of file diff --git a/drivers/owmOnecallCurrent/pair/city_geocode.html b/drivers/owmOnecallCurrent/pair/city_geocode.html index c3f70d3..9df486f 100644 --- a/drivers/owmOnecallCurrent/pair/city_geocode.html +++ b/drivers/owmOnecallCurrent/pair/city_geocode.html @@ -24,6 +24,10 @@ //document.getElementById('found_nr').value = result; }); } + + function onClickInstructions(){ + Homey.showView("instructions"); + } @@ -32,6 +36,11 @@ +
+
diff --git a/drivers/owmOnecallCurrent/pair/instructions.html b/drivers/owmOnecallCurrent/pair/instructions.html new file mode 100644 index 0000000..0520587 --- /dev/null +++ b/drivers/owmOnecallCurrent/pair/instructions.html @@ -0,0 +1,19 @@ + + +
+
+ +
+
+

+
+

+
+
\ No newline at end of file diff --git a/drivers/owmOnecallDaily/device.js b/drivers/owmOnecallDaily/device.js index 27ef39f..d5d9f34 100644 --- a/drivers/owmOnecallDaily/device.js +++ b/drivers/owmOnecallDaily/device.js @@ -454,8 +454,8 @@ class owmOnecallDaily extends Homey.Device { } this.log(this.getName() + " Trigger flow: " + item.trigger); item['trigger_start'] = false; - await item.trigger_instance.trigger(this, token, state); - // .catch(error => this.log(error.message)); + await item.trigger_instance.trigger(this, token, state) + .catch(error => this.log(error.message)); } } } diff --git a/drivers/owmOnecallDailySummary/assets/icon.svg b/drivers/owmOnecallDailySummary/assets/icon.svg new file mode 100644 index 0000000..2dc4a37 --- /dev/null +++ b/drivers/owmOnecallDailySummary/assets/icon.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/drivers/owmOnecallDailySummary/data.js b/drivers/owmOnecallDailySummary/data.js new file mode 100644 index 0000000..6f5fce5 --- /dev/null +++ b/drivers/owmOnecallDailySummary/data.js @@ -0,0 +1,55 @@ +const DATA_DEF = { + "forecast_time":{ + }, + + "measure_temperature_min":{ + "trigger": "TemperatureMinChanged" + }, + "measure_temperature_max":{ + "trigger": "TemperatureMaxChanged" + }, + "measure_temperature_morning":{ + "trigger": "TemperatureMorningChanged" + }, + "measure_temperature_day":{ + "trigger": "TemperatureDayChanged" + }, + "measure_temperature_evening":{ + "trigger": "TemperatureEveningChanged" + }, + "measure_temperature_night":{ + "trigger": "TemperatureNightChanged" + }, + + "measure_humidity":{ + "trigger": "HumidityChanged" + }, + "measure_cloudiness":{ + "trigger": "CloudinessChanged" + }, + "measure_pressure":{ + "trigger": "PressureChanged" + }, + "measure_rain":{ + "trigger": "RainChanged" + }, + + + "measure_wind_combined":{ + "trigger": "WindCombinedChanged" + }, + "measure_wind_strength":{ + "trigger": "WindStrengthChanged" + }, + "measure_wind_angle":{ + "trigger": "WindAngleChanged" + }, + "measure_wind_direction_string":{ + "trigger": "WindDirectionCompassChanged" + }, + "measure_windstrength_beaufort":{ + "trigger": "WindBeaufortChanged" + } +} + +module.exports = { DATA_DEF } \ No newline at end of file diff --git a/drivers/owmOnecallDailySummary/device.js b/drivers/owmOnecallDailySummary/device.js new file mode 100644 index 0000000..4d2b008 --- /dev/null +++ b/drivers/owmOnecallDailySummary/device.js @@ -0,0 +1,445 @@ +'use strict'; + +const { throws } = require('assert'); +const Homey = require('homey'); +const owm = require('../../lib/owm_api.js'); +const intervalCurrent = 5; + +class owmOnecallDailySummary extends Homey.Device { + + async onInit() { + this.log('OnecallDailySummary init: ', this.getName(), this.getData().id); + + await this.updateCapabilities(); + + this.data = require('./data.js').DATA_DEF; + + let settings = await this.getSettings(); + if (!settings.pollingInterval || settings.pollingInterval == 0){ + settings.pollingInterval = intervalCurrent; + this.setSettings(settings); + } + + settings["units"] = this.homey.i18n.getUnits(); + settings["language"] = this.homey.i18n.getLanguage(); + + // Flows + this.registerFlowTrigger(); + + //run once to get the first data + if (settings.pollingActive == true){ + this.setPollInterval(settings); + } + } // end onInit + + async updateCapabilities(){ + // add missing capabilities + let capabilities = []; + try{ + capabilities = this.homey.app.manifest.drivers.filter((e) => {return (e.id == this.driver.id);})[0].capabilities; + } + catch (error){} + for (let i=0; i this.pollWeatherData(settings).catch(error => console.log(error)), + ( 60 * 1000 * settings.pollingInterval) ); + } + + async pollWeatherData(settings) { + if (this.data == undefined){ + this.log("No data definition found."); + this.setDeviceUnavailable(this.homey.__("device_unavailable_reason.no_definition")); + return; + } + let dataKeys = Object.keys(this.data); + let data; + try{ + let tz = this.homey.clock.getTimezone(); + let url = owm.getOnecallDailySummaryURL(settings, tz); + data = await owm.getWeatherData(url); + } + catch(error){ + this.log("Error reading OWM data:", error.message); + } + if (!data || !data.date){ + if (data && data.message && data.cod>200){ + this.log("API error message!"); + this.log(data); + this.setDeviceUnavailable(data.message); + return; + } + else{ + this.log("No wether data found!"); + this.setDeviceUnavailable(this.homey.__("device_unavailable_reason.no_api_result")); + return; + } + } + else{ + this.setDeviceAvailable(); + } + + this.log(this.getName(), this.getData().id, " Received OWM data"); + + //var GEOlocation = "Lat:" + data.lat + " Lon:" +data.lon; + var GEOlocation = this.getName(); + let tz = this.homey.clock.getTimezone(); + + // let forecast_time; + let lastUpdate; + let hasDateLocalization = this.homey.app.hasDateLocalization(); + if (hasDateLocalization){ + // let now = new Date(data.current.dt*1000).toLocaleString(this.homey.i18n.getLanguage(), + // { + // hour12: false, + // timeZone: tz, + // hour: "2-digit", + // minute: "2-digit", + // day: "2-digit", + // month: "2-digit", + // year: "numeric" + // }); + // forecast_time = now.replace(',', ''); + + let now = new Date().toLocaleString(this.homey.i18n.getLanguage(), + { + hour12: false, + timeZone: tz, + hour: "2-digit", + minute: "2-digit", + day: "2-digit", + month: "2-digit", + year: "numeric" + }); + lastUpdate = now.replace(',', ''); + } + else{ + // let now = new Date(data.current.dt*1000).toLocaleString('en-US', + // { + // hour12: false, + // timeZone: tz, + // hour: "2-digit", + // minute: "2-digit", + // day: "2-digit", + // month: "2-digit", + // year: "numeric" + // }); + // let date = now.split(", ")[0]; + // date = date.split("/")[2] + "-" + date.split("/")[0] + "-" + date.split("/")[1]; + // let time = now.split(", ")[1]; + // forecast_time = date + " " + time; + + let now = new Date().toLocaleString('en-US', + { + hour12: false, + timeZone: tz, + hour: "2-digit", + minute: "2-digit", + day: "2-digit", + month: "2-digit", + year: "numeric" + }); + date = now.split(", ")[0]; + date = date.split("/")[2] + "-" + date.split("/")[0] + "-" + date.split("/")[1]; + time = now.split(", ")[1]; + lastUpdate = date + " " + time; + } + + this.setSettings({ + "APIState": lastUpdate + }) + .catch(this.error); + + let date = new Date(data.date).toLocaleString('en-US', + { + hour12: false, + timeZone: tz, + day: "2-digit", + month: "2-digit", + year: "numeric" + }); + this.getDataCapability('forecast_time')['value'] = date; + + this.getDataCapability('measure_temperature_min')['value'] = Math.round(data.temperature.min * 10) / 10; + this.getDataCapability('measure_temperature_max')['value'] = Math.round(data.temperature.max * 10) / 10; + this.getDataCapability('measure_temperature_morning')['value'] = Math.round(data.temperature.morning * 10) / 10; + this.getDataCapability('measure_temperature_day')['value'] = Math.round(data.temperature.afternoon * 10) / 10; + this.getDataCapability('measure_temperature_evening')['value'] = Math.round(data.temperature.evening * 10) / 10; + this.getDataCapability('measure_temperature_night')['value'] = Math.round(data.temperature.night * 10) / 10; + + + this.getDataCapability('measure_humidity')['value'] = data.humidity.afternoon; + this.getDataCapability('measure_pressure')['value'] = data.pressure.afternoon; + this.getDataCapability('measure_rain')['value'] = data.precipitation.total; + this.getDataCapability('measure_cloudiness')['value'] = data.cloud_cover.afternoon; + + // // return the rain in mm if present, or precipitation + // let rain = 0; + // if (data.current.precipitation) { + // rain = data.current.precipitation.value; + // } + // if (data.current.rain != undefined) { + // if (typeof (data.current.rain) === "number") { + // rain = data.current.rain + // } else if (typeof (data.current.rain) === "object") { + // if (data.current.rain['3h'] != undefined) { + // rain = data.current.rain['3h'] / 3; + // } + // if (data.current.rain['1h'] != undefined) { + // rain = data.current.rain['1h']; + // } + // // Sometimes OWM returns an empty rain object + // if (Object.keys(data.current.rain).length == 0) { + // rain = 0; + // } + // } + // } else { + // rain = 0; + // } + // this.getDataCapability('measure_rain')['value'] = rain; + + let windstrength = 0; + if (data.wind.max.speed) { + if ( this.getSetting('windspeed_ms') == true){ + if (settings["units"] == "metric") { + windstrength = data.wind.max.speed; + } else { + // mph to m/s + windstrength = Math.round(data.wind.max.speed / 2.237); + } + } + else{ + if (settings["units"] == "metric") { + // convert from m/s to km/h + windstrength = Math.round(3.6 * data.wind.max.speed); + } else { + // windspeed in mph + windstrength = data.wind.max.speed; + } + } + } else { + windstrength = 0; + } + this.getDataCapability('measure_wind_strength')['value'] = windstrength; + + let windspeedbeaufort = 0; + if (settings["units"] == "metric") { + // convert to beaufort and concatenate in a string with wind direction + windspeedbeaufort = owm.beaufortFromKmh(windstrength); + } else { + windspeedbeaufort = owm.beaufortFromMph(windstrength); + } + this.getDataCapability('measure_windstrength_beaufort')['value'] = windspeedbeaufort; + + let windangle = 0; + let winddegcompass = ""; + if (data.wind.max.direction) { + windangle = data.wind.max.direction; + winddegcompass = owm.degToCompass(windangle); + if (winddegcompass == undefined){ + this.log("Could not get wind compass text for windangle: "+windangle); + winddegcompass = ""; + } + } else { + windangle = 0; + winddegcompass = ""; + } + this.getDataCapability('measure_wind_angle')['value'] = windangle; + this.getDataCapability('measure_wind_direction_string')['value'] = winddegcompass; + + let windcombined = windspeedbeaufort.toString(); + if (winddegcompass != ""){ + windcombined = this.homey.__("windDirectionIcon."+winddegcompass) + + " " + + this.homey.__("windDirectionShort."+winddegcompass) + + " " + + windspeedbeaufort.toString(); + } + this.getDataCapability('measure_wind_combined')['value'] = windcombined; + + // CAPABILITIES: Compare values and update changed capabilities. + // TRIGGER: Compare values to start trigger after capability update. + for (let i=0; i " + item.value); + if (item.value == undefined){ + item.value = null; + } + await this.setCapabilityValue(capability, item.value); + // .catch(error => this.log(error.message)); + // Store temporary value to trigger flows for changed capabilities + if (item.trigger != undefined){ + item['trigger_start'] = true; + } + } + } + } + + // TRIGGER: Trigger flows for changed capabilities + for (let i=0; i this.log(error.message)); + } + } + } + + // parameters: {settings, newSettingsObj, changedKeysArr} + onSettings(settings) { + try { + this.log("Settings changed"); + let newSettings = settings.oldSettings; + for (let i = 0; i < settings.changedKeys.length; i++) { + switch (settings.changedKeys[i]) { + case 'APIKey': + this.log('APIKey changed to ' + settings.newSettings.APIKey); + newSettings.APIKey = settings.newSettings.APIKey; + break; + case 'pollingActive': + this.log('pollingActive changed to ' + settings.newSettings.pollingActive); + newSettings.pollingActive = settings.newSettings.pollingActive; + break; + case 'pollingInterval': + this.log('pollingInterval changed to ' + settings.newSettings.pollingInterval); + newSettings.pollingInterval = settings.newSettings.pollingInterval; + if (!newSettings.pollingInterval || newSettings.pollingInterval == 0){ + newSettings.pollingInterval = intervalCurrent; + } + break; + case "windspeed_ms": + this.log('windspeed_ms changed to '+settings.newSettings.windspeed_ms); + if ( settings.newSettings.windspeed_ms == true){ + this.setCapabilityOptions( "measure_wind_strength", {"units": "m/s" } ); + } + else{ + if ( this.homey.i18n.getUnits() == 'metric'){ + this.setCapabilityOptions( "measure_wind_strength", {"units": "km/h" } ); + } + else{ + this.setCapabilityOptions( "measure_wind_strength", {"units": "mph" } ); + } + } + break; + default: + this.log("Ignore settings key: " + i + " " + settings.changedKeys[i]); + break; + } + } + newSettings["units"] = this.homey.i18n.getUnits(); + newSettings["language"] = this.homey.i18n.getLanguage(); + newSettings['lat'] = settings.newSettings['lat']; + newSettings['lon'] = settings.newSettings['lon']; + newSettings["APIKey"] = settings.newSettings["APIKey"]; + newSettings["days"] = settings.newSettings["days"]; + this.homey.clearInterval(this.pollinginterval); + if (newSettings.pollingActive == true){ + this.setPollInterval(newSettings); + } + } catch (error) { + throw error; + } + } + + // Flow action + async updateDevice(){ + // Flow action for single update + let settings = await this.getSettings(); + let newsettings = {}; + newsettings['lat'] = settings['lat']; + newsettings['lon'] = settings['lon']; + newsettings["APIKey"] = settings["APIKey"]; + newsettings["days"] = settings["days"]; + newsettings["units"] = this.homey.i18n.getUnits(); + newsettings["language"] = this.homey.i18n.getLanguage(); + this.pollWeatherData(newsettings); + } +} +module.exports = owmOnecallDailySummary; \ No newline at end of file diff --git a/drivers/owmOnecallDailySummary/driver.compose.json b/drivers/owmOnecallDailySummary/driver.compose.json new file mode 100644 index 0000000..c898e78 --- /dev/null +++ b/drivers/owmOnecallDailySummary/driver.compose.json @@ -0,0 +1,78 @@ +{ + "id": "owmOnecallDailySummary", + "name": { + "en": "5. Weather, daily summary", + "de": "5. Wetter, tägliche Zusammenfassung", + "nl": "5. Weerbericht, dagelijkse samenvatting" + }, + "images": { + "large": "/drivers/owmOnecallDailySummary/assets/images/large.png", + "small": "/drivers/owmOnecallDailySummary/assets/images/small.png" + }, + "class": "other", + "connectivity": [ "cloud" ], + "capabilities": [ + "forecast_time", + "measure_cloudiness", + + "measure_rain", + "measure_humidity", + + "measure_temperature_min", + "measure_temperature_max", + + "measure_temperature_morning", + "measure_temperature_day", + + "measure_temperature_evening", + "measure_temperature_night", + + "measure_wind_combined", + "measure_wind_strength", + + "measure_pressure", + + "measure_wind_angle", + "measure_wind_direction_string", + "measure_windstrength_beaufort" + ], + "pair": [ + { + "id": "city_geocode", + "navigation": { + "next": "list_my_devices" + } + }, + { + "id": "instructions", + "navigation": { + "prev": "city_geocode" + } + }, + { + "id": "apikey_error", + "navigation": { + "prev": "city_geocode" + } + }, + { + "id": "geolocation_error", + "navigation": { + "prev": "city_geocode" + } + }, + { + "id": "list_my_devices", + "template": "list_devices", + "navigation": { + "next": "add_my_devices", + "prev": "city_geocode" + }, + "options": { "singular": true } + }, + { + "id": "add_my_devices", + "template": "add_devices" + } + ] +} \ No newline at end of file diff --git a/drivers/owmOnecallDailySummary/driver.js b/drivers/owmOnecallDailySummary/driver.js new file mode 100644 index 0000000..4c307ac --- /dev/null +++ b/drivers/owmOnecallDailySummary/driver.js @@ -0,0 +1,211 @@ +"use strict"; +// need Homey module, see SDK Guidelines +const Homey = require('homey'); +const owm = require('../../lib/owm_api.js'); +// const crypto = require('crypto'); + +class owmOnecallDailySummaryDriver extends Homey.Driver { + + getExistingAPIKey(){ + let devices = this.homey.drivers.getDriver('owmOnecallDailySummary').getDevices(); + for (let i=0; i { + return await this.onPairListDevices(session); + }); + + session.setHandler("settingsChanged", async (data) => { + return await this.onSettingsChanged(data); + }); + + session.setHandler("getCityList", async (query) => { + return await this.onGetCityList(query); + }); + + session.setHandler("getSettings", async () => { + this.log("getSettings: "); + this.log(this.settingsData); + return this.settingsData; + }); + + } // end onPair + + /** + * Selects the number of entires fitting the name set in the pair dialog + * @param {*} name Name (part) of city/district + * @returns Number of found entries + */ + async onSettingsChanged(data){ + this.log("Event settingsChanged: "); + this.log(data); + this.settingsData = data; + return true; + } + + async onGetCityList(query){ + // Check APIKey with a call without city + let cities = []; + let url = owm.getGeocodeURL(this.settingsData); + try{ + let geoData = await owm.getWeatherData(url); + if (!geoData || geoData.cod == 401){ + return []; + } + for (let i=0; i +

+
+ + diff --git a/drivers/owmOnecallDailySummary/pair/city_geocode.html b/drivers/owmOnecallDailySummary/pair/city_geocode.html new file mode 100644 index 0000000..5454a09 --- /dev/null +++ b/drivers/owmOnecallDailySummary/pair/city_geocode.html @@ -0,0 +1,101 @@ + + + + + +
+
+ + + +
+ +
+
+ + + +
+
+ +
+ +
+ +
+
+ + +
+
+ + + + \ No newline at end of file diff --git a/drivers/owmOnecallDailySummary/pair/geolocation_error.html b/drivers/owmOnecallDailySummary/pair/geolocation_error.html new file mode 100644 index 0000000..533ea34 --- /dev/null +++ b/drivers/owmOnecallDailySummary/pair/geolocation_error.html @@ -0,0 +1,11 @@ + +
+

+

+
+ + diff --git a/drivers/owmOnecallDailySummary/pair/instructions.html b/drivers/owmOnecallDailySummary/pair/instructions.html new file mode 100644 index 0000000..0520587 --- /dev/null +++ b/drivers/owmOnecallDailySummary/pair/instructions.html @@ -0,0 +1,19 @@ + + +
+
+ +
+
+

+
+

+
+
\ No newline at end of file diff --git a/drivers/owmOnecallHourly/device.js b/drivers/owmOnecallHourly/device.js index 7ead474..4fb71d5 100644 --- a/drivers/owmOnecallHourly/device.js +++ b/drivers/owmOnecallHourly/device.js @@ -366,8 +366,8 @@ class owmOnecallHourly extends Homey.Device { } this.log(this.getName() + " Trigger flow: " + item.trigger); item['trigger_start'] = false; - await item.trigger_instance.trigger(this, token, state); - // .catch(error => this.log(error.message)); + await item.trigger_instance.trigger(this, token, state) + .catch(error => this.log(error.message)); } } } diff --git a/lib/owm_api.js b/lib/owm_api.js index a20deb7..4d6523c 100644 --- a/lib/owm_api.js +++ b/lib/owm_api.js @@ -77,6 +77,37 @@ function getOnecallURL(settings) { return url; }; +function getOnecallDailySummaryURL(settings,tz) { + // OncallAPI only supports lan/lot, no city geocoding + let currentDate = new Date().toLocaleString('en-US', + { + hour12: false, + timeZone: tz, + day: "2-digit", + month: "2-digit", + year: "numeric" + }); + targetDate = new Date(currentDate); + targetDate.setDate(targetDate.getDate() + settings.days); + + date = targetDate.toLocaleString('en-US', + { + hour12: false, + // timeZone: tz, + day: "2-digit", + month: "2-digit", + year: "numeric" + }); + date = date.split('/')[2]+'-'+date.split('/')[0]+'-'+date.split('/')[1]; + + // compute date based on offset + let coordinateQuery = 'lat=' + settings['lat'] + '&lon=' + settings['lon']; + let url = '/data/3.0/onecall/day_summary?'; + url = url + coordinateQuery + '&units=' + settings['units'] + '&lang=' + settings['language'] + '&mode=json&APPID=' + settings["APIKey"]; + url = url + '&date=' + date; + return url; +}; + function getAirPollutionURL(settings) { // AirPollutionAPI only supports lan/lot, no city geocoding let coordinateQuery = 'lat=' + settings['lat'] + '&lon=' + settings['lon']; @@ -98,6 +129,7 @@ module.exports = { getGeocodeURL, getCurrentWeatherURL, getOnecallURL, + getOnecallDailySummaryURL, getAirPollutionURL, degToCompass, beaufortFromMph, diff --git a/locales/de.json b/locales/de.json index 92e5e5b..d70abdc 100644 --- a/locales/de.json +++ b/locales/de.json @@ -22,6 +22,7 @@ "title": "OpenWeather - füge einen Standort hinzu...", "titleHourly": "OpenWeather - füge eine stündliche Vorhersage hinzu...", "titleDaily": "OpenWeather - füge eine tägliche Vorhersage hinzu...", + "titleDailySummary": "OpenWeather - füge eine tägliche Zusammenfassung hinzu (historische Daten und 4-Tages-Vorhersage)...", "apiKey": "Gib den OpenWeatherMap API-Key an.", "apiKey2": "Ein API-Key ist erhältlich unter http://openweathermap.org.", "apiVersion": "Gibt die zu verwendende OneCall API-Version an.", @@ -32,13 +33,22 @@ "hours2": "Beispiele: '0' für eine aktuelle Vorhersage. '5' für eine Vorhersage in 5 Stunden.", "days": "Gib die Tages-Differenz für die Vorhersage an.", "days2": "Beispiele: '0' für eine aktuelle Vorhersage. '5' für eine Vorhersage in 5 Tagen.", + "daysSummary": "Gib die Tages-Differenz für die historischen Daten oder Vorhersage an.", + "daysSummary2": "Beispiele: '0' den aktuellen Tag. '-1' für gestern. '4' für eine Vorhersage in 4 Tagen.", "pairError": "Fehler beim Einrichten des Gerätes.", "apiKeyError": "Bitte gib einen gültigen API-Key an.", "geolocationError1": "Es wurde kein Standort gefunden.", "geolocationError2": "Bitte prüfe den eingegebenen Name der Stadt.", "locationError1": "Es ist kein Wetter-Standort vorhanden.", "locationError2": "Bitte füge zuerst ein Gerät für 'Aktuelles Wetter' ein.", - "alert": "Warnungen" + "alert": "Warnungen", + "instructions": "Anleitung", + "instructions01": "Um dieses Gerät nutzen zu können, wird ein OneCall API 3.0-Schlüssel benötigt.
Der Schlüssel erfordert ein Abonnement, beinhaltet aber täglich 1000 kostenlose API-Aufrufe.
Besuche die OWM-Preisliste für Details, erstelle ein Konto und abonniere einen OneCall 3.0 API-Schlüssel.", + "instructions02": "Wenn mit der OneCall API 2.5 bereits ein alter API-Schlüssel (ohne Abonnement) verwendet wurde, so kann dieser Schlüssel ebenfalls verwendet werden. Wähle dazu „API-Version 2.5“ beim Hinzufügen des Gerätes oder in den Geräteeinstellungen." + }, + "freeAPI":{ + "instructions": "Anleitung", + "instructions01": "Um dieses Gerät nutzen zu können, wird ein Free-API-Schlüssel benötigt.
Der Schlüssel beinhaltet täglich 1000 kostenlose API-Aufrufe.
Besuche die OWM-Preisliste für Details, erstelle ein Konto und erhalte einen Free-API-Schlüssel." } }, "device_unavailable_reason":{ diff --git a/locales/en.json b/locales/en.json index 9a60e1a..977fd46 100644 --- a/locales/en.json +++ b/locales/en.json @@ -22,6 +22,7 @@ "title": "OpenWeather - add a location...", "titleHourly": "OpenWeather - add an hourly forecast...", "titleDaily": "OpenWeather - add a daily forecast...", + "titleDailySummary": "OpenWeather - add a daily summary (historical data and 4 day forecast)...", "apiKey": "Enter the OpenWeatherMap API key.", "apiKey2": "An API key can be obtained at http://openweathermap.org.", "apiVersion": "Specifies the OneCall API version to use.", @@ -32,13 +33,22 @@ "hours2": "Examples: '0' for a current prediction. '5' for a forecast in 5 hours.", "days": "Enter the day difference for the forecast.", "days2": "Examples: '0' for a current prediction. '5' for a forecast in 5 days.", + "daysSummary": "Enter the day difference for the historical data or forecast.", + "daysSummary2": "Examples: '0' for a current day. '-1' for summary of yesterday. '4' for a forecast in 4 days.", "pairError": "Device setup error.", "apiKeyError": "Please enter a valid API key.", "geolocationError1": "No location found.", "geolocationError2": "Please check the city name you entered.", "locationError1": "There is no weather location available.", "locationError2": "Please add a device for 'Current Weather' first.", - "alert": "alerts" + "alert": "alerts", + "instructions": "Instructions", + "instructions01": "To use this device, you need an OneCall API 3.0 key.
The key needs a subscription, but includes 1000 free API calls daily.
Please check OWM price list for details, create an account and subscribe your OneCall 3.0 API key.", + "instructions02": "If you already used an old API key (without subscription) with the OneCall API 2.5, you can also use this key. Select 'API version 2.5' in pair view or device settings." + }, + "freeAPI":{ + "instructions": "Instructions", + "instructions01": "To use this device, you need an Free API key.
The key includes 1000 free API calls daily.
Please check OWM price list for details, create an account and get your FreeAPI key." } }, "device_unavailable_reason":{ diff --git a/locales/nl.json b/locales/nl.json index fd36a71..5ea8505 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -22,6 +22,7 @@ "title": "OpenWeather - Voeg een locatie toe ...", "titleHourly": "OpenWeather - een voorspelling per uur toevoegen...", "titleDaily": "OpenWeather - een dagelijkse voorspelling toevoegen...", + "titleDailySummary": "OpenWeather - voeg een dagelijkse samenvatting toe (historische gegevens en 4-daagse voorspelling)...", "apiKey": "Voer de OpenWeatherMap API key in.", "apiKey2": "Een API-sleutel kan worden verkregen op http://openweathermap.org.", "apiVersion": "Specificeert de OneCall API-versie die moet worden gebruikt.", @@ -32,13 +33,22 @@ "hours2": "Voorbeelden: '0' voor een actuele prognose. '5' voor een voorspelling voor 5 uur.", "days": "Voer het dagverschil in voor de voorspelling.", "days2": "Voorbeelden: '0' voor een huidige voorspelling. '5' voor een voorspelling in 5 dagen.", + "daysSummary": "Voer het dagelijkse verschil in voor de historische gegevens of prognose.", + "daysSummary2": "Voorbeelden: '0' de huidige dag. '-1' voor gisteren. '4' voor een voorspelling over 4 dagen.", "pairError": "Device setup error", "apiKeyError": "Voer een geldige API-sleutel in.", "geolocationError1": "Geen locatie gevonden.", "geolocationError2": "Controleer de plaatsnaam die je hebt ingevoerd.", "locationError1": "Er is geen weerlocatie beschikbaar.", "locationError2": "Voeg eerst een apparaat toe voor 'Huidig ​​weer'.", - "alert": "waarschuwingen" + "alert": "waarschuwingen", + "instructions": "Instructies", + "instructions01": "Om dit apparaat te gebruiken is een OneCall API 3.0-sleutel vereist.
Voor de sleutel is een abonnement vereist, maar deze bevat dagelijks 1000 gratis API-aanroepen.
Bezoek de OWM-prijslijst voor details, maak een account aan en abonneer u op een OneCall 3.0 API-sleutel.", + "instructions02": "Indien er al een oude API-sleutel (zonder abonnement) werd gebruikt met OneCall API 2.5, kan deze sleutel ook worden gebruikt. Om dit te doen, selecteert u “API versie 2.5” bij het toevoegen van het apparaat of in de apparaatinstellingen." + }, + "freeAPI":{ + "instructions": "Instructies", + "instructions01": "Om dit apparaat te gebruiken is een Free-API-sleutel vereist.
De sleutel bevat dagelijks 1000 gratis API-aanroepen.
Bezoek de OWM-prijslijst voor meer informatie, maak een account aan en ontvang een Free-API-sleutel." } }, "device_unavailable_reason":{