2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-28 17:12:32 +00:00

PROPLANTA: current weather

git-svn-id: https://svn.fhem.de/fhem/trunk@11169 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
grompo 2016-04-02 08:42:09 +00:00
parent bc31ecd9a8
commit 65b6143eb7

View File

@ -58,9 +58,11 @@ my $curReadingType = 0;
# 8 = MinMaxNummer Col 3 # 8 = MinMaxNummer Col 3
# 9 = Date Col 2-5 / bold # 9 = Date Col 2-5 / bold
# 10 = alternative text of Col 3 (Wind direction) # 10 = alternative text of Col 3 (Wind direction)
# 11 = alternative text of image Col 3 (current weather state)
my @knownNoneIDs = ( ["Temperatur", "temperature", 1] my @knownNoneIDs = ( ["Temperatur", "temperature", 1]
,["relative Feuchte", "humidity", 1] ,["relative Feuchte", "humidity", 1]
,["Sichtweite", "visibility", 1] ,["Sichtweite", "visibility", 1]
,["Wetterzustand", "weather", 11]
,["Windrichtung", "windDir", 10] ,["Windrichtung", "windDir", 10]
,["Windgeschwindigkeit", "wind", 1] ,["Windgeschwindigkeit", "wind", 1]
,["Luftdruck", "pressure", 1] ,["Luftdruck", "pressure", 1]
@ -326,20 +328,21 @@ sub start
$curTextPos = 0; $curTextPos = 0;
} }
#wetterstate and icon - process immediately #wetterstate and icon - process immediately
elsif ($tagname eq "img" && $curReadingType == 7) { elsif ($tagname eq "img"
if ( 2 <= $curCol && $curCol <= 5 ) { && ( $curReadingType == 7 && 2 <= $curCol && $curCol <= 5
# process alternative text || $curReadingType == 11 && $curCol == 3) ) {
$readingName = "fc".($startDay+$curCol-2)."_".$curReadingName; # process alternative text
$text = $attr->{alt}; $readingName = $curReadingName;
$text =~ s/Wetterzustand: //; $readingName = "fc" . ($startDay+$curCol-2) . "_" . $readingName if $curReadingType == 7;
$text =~ s/ö/oe/; $text = $attr->{alt};
$text =~ s/ä/ae/; $text =~ s/Wetterzustand: //;
$text =~ s/ü/ue/; $text =~ s/ö/oe/;
$text =~ s/ß/ss/; $text =~ s/ä/ae/;
push( @texte, $readingName . "|" . $text ); $text =~ s/ü/ue/;
# Image URL $text =~ s/ß/ss/;
push( @texte, $readingName."Icon" . "|" . $attr->{src} ); push( @texte, $readingName . "|" . $text );
} # Image URL
push( @texte, $readingName."Icon" . "|" . $attr->{src} );
} }
#wind direction - process immediately #wind direction - process immediately
elsif ($tagname eq "img" && $curReadingType == 10 && $curCol == 3 ) { elsif ($tagname eq "img" && $curReadingType == 10 && $curCol == 3 ) {