From b8368fb9739f9400310ffeb7abc0ec3fa6bf1e64 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Wed, 9 Jan 2019 13:42:27 +0100 Subject: [PATCH] add yahoo icon mapping --- OpenWeatherMapAPI.pm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/OpenWeatherMapAPI.pm b/OpenWeatherMapAPI.pm index bd0c543..f69fd65 100644 --- a/OpenWeatherMapAPI.pm +++ b/OpenWeatherMapAPI.pm @@ -87,11 +87,26 @@ my %codes = ( 602 => 13, 611 => 46, 612 => 46, - 615 => 35, - 616 => 35, - 620 => 35, - 621 => 35, - 622 => 35, + 615 => 5, + 616 => 5, + 620 => 14, + 621 => 46, + 622 => 42, + 701 => 19, + 711 => 22, + 721 => 19, + 731 => 23, + 741 => 20, + 751 => 23, + 761 => 19, + 762 => 3200, + 771 => 1, + 781 => 0, + 800 => 32, + 801 => 30, + 802 => 26, + 803 => 26, + 804 => 28, ); sub new { @@ -268,7 +283,7 @@ sub _ProcessingRetrieveData($$) { 'cloudCover' => $data->{clouds}->{all}, 'visibility' => $data->{visibility}, -# 'code' => $codes{ $data->{weather}[0]{icon} }, + 'code' => $codes{ $data->{weather}[0]{id} }, 'iconAPI' => $data->{weather}[0]{icon}, 'sunsetTime' => strftime( "%a,%e %b %Y %H:%M %p",