From 957adf845420069ce196ef30b38b80d30d89ca42 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Sun, 13 Jan 2019 21:13:54 +0100 Subject: [PATCH] change formated output, add hourly support for DarkSky - thanks to Lippie, multiple factor to wind speed and many bugfix --- 59_Weather.pm | 12 +++---- DarkSkyAPI.pm | 74 +++++++++++++++++++++++++++++++++++++++++--- OpenWeatherMapAPI.pm | 8 ++--- 3 files changed, 80 insertions(+), 14 deletions(-) diff --git a/59_Weather.pm b/59_Weather.pm index 6b121dc..d635b3a 100755 --- a/59_Weather.pm +++ b/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