diff --git a/fhem/FHEM/59_Twilight.pm b/fhem/FHEM/59_Twilight.pm index 6570973e3..87a5f704b 100644 --- a/fhem/FHEM/59_Twilight.pm +++ b/fhem/FHEM/59_Twilight.pm @@ -263,68 +263,18 @@ sub twilight_calc { } sub Twilight_getWeatherHorizon{ + my @a_current = (25,25,25,25,20,10,10,10,10,10,10,7,7,7,5,10,10,6,6,6,10,6,6,6,6,6,6,5,5,3,3,0,0,0,0,7,0,15,15,15,9,15,8,5,12,6,8,8); + #condition codes are described in FHEM wiki and in the documentation of the yahoo weather API my $location=shift; - #my $xml = GetHttpFile("www.google.com:80", "/ig/api?weather=" . $location . "&hl=en"); - #$xml =~/\(.*)\<\/current_conditions\>/; - #my $current=$1; - #$current=~/\=0) && ($current <=47)) { + return $a_current[$current]; + } else { + return 1; + } } - 1;