From a9343b445bfbc13e6fe745a9036fb34b2f99728a Mon Sep 17 00:00:00 2001 From: CoolTux Date: Sun, 13 Jan 2019 20:18:04 +0000 Subject: [PATCH] 59_Weather: and DarkSkyAPI and OpenWeatherAPI change formated output, add hourly support for DarkSky - thanks to Lippie, multiple factor to wind speed and many bugfix git-svn-id: https://svn.fhem.de/fhem/trunk@18241 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 3 ++ fhem/FHEM/59_Weather.pm | 12 +++--- fhem/FHEM/DarkSkyAPI.pm | 74 ++++++++++++++++++++++++++++++++-- fhem/FHEM/OpenWeatherMapAPI.pm | 8 ++-- 4 files changed, 83 insertions(+), 14 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 52b7fc55e..74358e0cc 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,8 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 59_Weather: DarkSky and OpenWeatherMapAPI change formated output, + add hourly support for DarkSky - thanks to Lippie, + multiple factor to wind speed and many bugfix - bugfix: 73_AutoShuttersControl: Fix shutters drive then window open and shutter in brightness rage. - feature: 82_LGTV_WebOS: Support for SkyOnline App diff --git a/fhem/FHEM/59_Weather.pm b/fhem/FHEM/59_Weather.pm index 6d2085c44..95260768f 100755 --- a/fhem/FHEM/59_Weather.pm +++ b/fhem/FHEM/59_Weather.pm @@ -286,10 +286,10 @@ sub Weather_WriteReadings($$) { } } - my $val= 'T:' . $dataRef->{current}->{temperature} . '°C' - .' ' . substr($status_items_txt_i18n{1}, 0, 1) . ':' . $dataRef->{current}->{humidity} . '%' - .' ' . substr($status_items_txt_i18n{0}, 0, 1) . ':' . $dataRef->{current}->{wind} . 'km/h' - .' P:' . $dataRef->{current}->{pressure} . 'mbar'; + my $val= 'T: ' . $dataRef->{current}->{temperature} . '°C' + .' ' . substr($status_items_txt_i18n{1}, 0, 1) . ': ' . $dataRef->{current}->{humidity} . '%' + .' ' . substr($status_items_txt_i18n{0}, 0, 1) . ': ' . $dataRef->{current}->{wind} . 'km/h' + .' P: ' . $dataRef->{current}->{pressure} . 'hPa'; Log3 $hash, 4, "$name: $val"; readingsBulkUpdate($hash, 'state', $val); @@ -620,7 +620,7 @@ sub WeatherAsHtmlD($;$) Define