mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
76_SolarForecast: contrib 1.1.0
git-svn-id: https://svn.fhem.de/fhem/trunk@28169 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dc0c52b3f8
commit
819be389f0
@ -10042,8 +10042,9 @@ sub __weatherOnBeam {
|
|||||||
last if (!exists ($hfcg->{$i}{weather}));
|
last if (!exists ($hfcg->{$i}{weather}));
|
||||||
|
|
||||||
$hfcg->{$i}{weather} = 999 if(!defined $hfcg->{$i}{weather});
|
$hfcg->{$i}{weather} = 999 if(!defined $hfcg->{$i}{weather});
|
||||||
|
my $wcc = $hfcg->{$i}{wcc} // "-"; # Bewölkungsgrad ergänzen
|
||||||
|
|
||||||
debugLog ($paref, 'graphic', "weather id beam number >$i< (start hour $hfcg->{$i}{time_str}): $hfcg->{$i}{weather}") if($ii < $maxhours);
|
debugLog ($paref, 'graphic', "weather id beam number >$i< (start hour $hfcg->{$i}{time_str}): wid $hfcg->{$i}{weather} / wcc $wcc") if($ii < $maxhours);
|
||||||
|
|
||||||
if (!$show_night && $hfcg->{$i}{weather} > 99
|
if (!$show_night && $hfcg->{$i}{weather} > 99
|
||||||
&& !$hfcg->{$i}{beam1}
|
&& !$hfcg->{$i}{beam1}
|
||||||
@ -10057,32 +10058,30 @@ sub __weatherOnBeam {
|
|||||||
last if($ii > $maxhours);
|
last if($ii > $maxhours);
|
||||||
# ToDo : weather_icon sollte im Fehlerfall Title mit der ID besetzen um in FHEMWEB sofort die ID sehen zu können
|
# ToDo : weather_icon sollte im Fehlerfall Title mit der ID besetzen um in FHEMWEB sofort die ID sehen zu können
|
||||||
#if (defined $hfcg->{$i}{weather}) {
|
#if (defined $hfcg->{$i}{weather}) {
|
||||||
my ($icon_name, $title) = $hfcg->{$i}{weather} > 100 ?
|
my ($icon_name, $title) = $hfcg->{$i}{weather} > 100 ?
|
||||||
weather_icon ($name, $lang, $hfcg->{$i}{weather}-100) :
|
weather_icon ($name, $lang, $hfcg->{$i}{weather}-100) :
|
||||||
weather_icon ($name, $lang, $hfcg->{$i}{weather});
|
weather_icon ($name, $lang, $hfcg->{$i}{weather});
|
||||||
|
|
||||||
my $wcc = $hfcg->{$i}{wcc} // "-"; # Bewölkungsgrad ergänzen
|
if (isNumeric ($wcc)) { # Javascript Fehler vermeiden: https://forum.fhem.de/index.php/topic,117864.msg1233661.html#msg1233661
|
||||||
|
$wcc += 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (isNumeric ($wcc)) { # Javascript Fehler vermeiden: https://forum.fhem.de/index.php/topic,117864.msg1233661.html#msg1233661
|
$title .= ': '.$wcc;
|
||||||
$wcc += 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$title .= ': '.$wcc;
|
if ($icon_name eq 'unknown') {
|
||||||
|
debugLog ($paref, "graphic", "unknown weather id: ".$hfcg->{$i}{weather}.", please inform the maintainer");
|
||||||
|
}
|
||||||
|
|
||||||
if ($icon_name eq 'unknown') {
|
$icon_name .= $hfcg->{$i}{weather} < 100 ? '@'.$colorw : '@'.$colorwn;
|
||||||
debugLog ($paref, "graphic", "unknown weather id: ".$hfcg->{$i}{weather}.", please inform the maintainer");
|
my $val = FW_makeImage ($icon_name) // q{};
|
||||||
}
|
|
||||||
|
|
||||||
$icon_name .= $hfcg->{$i}{weather} < 100 ? '@'.$colorw : '@'.$colorwn;
|
if ($val eq $icon_name) { # passendes Icon beim User nicht vorhanden ! ( attr web iconPath falsch/prüfen/update ? )
|
||||||
my $val = FW_makeImage ($icon_name) // q{};
|
$val = '<b>???<b/>';
|
||||||
|
|
||||||
if ($val eq $icon_name) { # passendes Icon beim User nicht vorhanden ! ( attr web iconPath falsch/prüfen/update ? )
|
debugLog ($paref, "graphic", qq{the icon "$weather_ids{$hfcg->{$i}{weather}}{icon}" not found. Please check attribute "iconPath" of your FHEMWEB instance and/or update your FHEM software});
|
||||||
$val = '<b>???<b/>';
|
}
|
||||||
|
|
||||||
debugLog ($paref, "graphic", qq{the icon "$weather_ids{$hfcg->{$i}{weather}}{icon}" not found. Please check attribute "iconPath" of your FHEMWEB instance and/or update your FHEM software});
|
$ret .= "<td title='$title' class='solarfc' width='$width' style='margin:1px; vertical-align:middle align:center; padding-bottom:1px;'>$val</td>";
|
||||||
}
|
|
||||||
|
|
||||||
$ret .= "<td title='$title' class='solarfc' width='$width' style='margin:1px; vertical-align:middle align:center; padding-bottom:1px;'>$val</td>";
|
|
||||||
#}
|
#}
|
||||||
#else { # mit $hfcg->{$i}{weather} = undef kann man unten leicht feststellen ob für diese Spalte bereits ein Icon ausgegeben wurde oder nicht
|
#else { # mit $hfcg->{$i}{weather} = undef kann man unten leicht feststellen ob für diese Spalte bereits ein Icon ausgegeben wurde oder nicht
|
||||||
# $ret .= "<td></td>";
|
# $ret .= "<td></td>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user