mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-07 22:29:19 +00:00
76_SMAPortal: contrib 2.4.2
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19763 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3424a6e30e
commit
fe828c6fc4
@ -162,6 +162,7 @@ use vars qw($FW_ME); # webname (default is fh
|
||||
|
||||
# Versions History intern
|
||||
our %vNotesIntern = (
|
||||
"2.4.2" => "02.07.2019 change header design of portal graphics ",
|
||||
"2.4.1" => "01.07.2019 replace space in consumer name by a valid sign for reading creation ",
|
||||
"2.4.0" => "26.06.2019 support for FTUI-Widget ",
|
||||
"2.3.7" => "24.06.2019 replace suggestIcon by consumerAdviceIcon ",
|
||||
@ -1937,7 +1938,7 @@ sub PortalAsHtml ($$;$) {
|
||||
$colorw = AttrVal($wlname, 'weatherColor', undef);
|
||||
|
||||
$wlalias = AttrVal($wlname, 'alias', $wlname);
|
||||
$header = (AttrNum($wlname, 'showHeader', 1)) ? 1 : undef;
|
||||
$header = AttrNum($wlname, 'showHeader', 1);
|
||||
|
||||
# Icon Erstellung, mit @<Farbe> ergänzen falls einfärben
|
||||
# Beispiel mit Farbe: $icon = FW_makeImage('light_light_dim_100.svg@green');
|
||||
@ -1978,26 +1979,22 @@ sub PortalAsHtml ($$;$) {
|
||||
# Sonst sind schmale Ausgaben nicht von den Balken bzw. deren Anzahl abhängig, sondern allein durch die Breite des Headers bestimmt
|
||||
|
||||
if ($header) {
|
||||
my ($h1,$h2);
|
||||
if(AttrVal("global","language","EN") eq "DE") {
|
||||
$h1 = "Prognose [pv] - nächste 4 Stunden: $pv4h / Rest des Tages: $pvRe / Morgen: $pvTo";
|
||||
$h2 = "Prognose [co] - nächste 4 Stunden: $co4h / Rest des Tages: $coRe / Morgen: $coTo";
|
||||
my ($year, $month, $day, $hour, $min, $sec) = $lup =~ /(\d+)-(\d\d)-(\d\d)\s+(.*)/;
|
||||
$lup = "$3.$2.$1 $4";
|
||||
$lupt = "letzte Aktualisierung:";
|
||||
} else {
|
||||
$h1 = "forecast data [pv] - next 4 hours: $pv4h / rest of day: $pvRe / tomorrow: $pvTo";
|
||||
$h2 = "forecast data [co] - next 4 hours: $co4h / rest of day: $coRe / tomorrow: $coTo";
|
||||
}
|
||||
|
||||
$lup = " ($lupt $lup)";
|
||||
if ($type eq 'pv') {
|
||||
$header = $dlink.' '.$lup.' <br/>'.$h1;
|
||||
} elsif ($type eq 'co') {
|
||||
$header = $dlink.' '.$lup.' <br/>'.$h2;
|
||||
} else {
|
||||
$header = $dlink.' '.$lup.' <br/>'.$h1.'<br/>'.$h2;
|
||||
}
|
||||
$header = "<table align=\"center\">";
|
||||
$header .= "<tr><td colspan=\"2\" align=\"left\"><b>".$dlink."</b></td><td colspan=\"4\" align=\"right\">(".$lupt." ".$lup.")</td></tr>";
|
||||
if(AttrVal("global","language","EN") eq "DE") {
|
||||
$header .= "<tr> <td><b>PV > nächste 4h:</b></td> <td align=right>$pv4h</td> <td><b>Rest Heute:</b></td> <td align=right>$pvRe</td> <td><b>Morgen:</b></td> <td align=right>$pvTo</td> </tr>";
|
||||
$header .= "<tr> <td><b>CO > nächste 4h:</b></td> <td align=right>$co4h</td> <td><b>Rest Heute:</b></td> <td align=right>$coRe</td> <td><b>Morgen:</b></td> <td align=right>$coTo</td> </tr>";
|
||||
} else {
|
||||
$header .= "<tr> <td><b>PV > next 4h:</b></td> <td align=right>$pv4h</td> <td><b>rest today:</b></td> <td align=right>$pvRe</td> <td><b>tomorrow:</b></td> <td align=right>$pvTo</td> </tr>";
|
||||
$header .= "<tr> <td><b>CO > next 4h:</b></td> <td align=right>$co4h</td> <td><b>rest today:</b></td> <td align=right>$coRe</td> <td><b>tomorrow:</b></td> <td align=right>$coTo</td> </tr>";
|
||||
}
|
||||
$header .= "</table>";
|
||||
}
|
||||
|
||||
# Werte aktuelle Stunde
|
||||
|
Loading…
x
Reference in New Issue
Block a user