mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
76_SMAPortal: contrib 2.3.5
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@19664 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
831ab12d12
commit
4aefdf846d
@ -161,6 +161,7 @@ use vars qw($FW_ME); # webname (default is fh
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %vNotesIntern = (
|
our %vNotesIntern = (
|
||||||
|
"2.3.5" => "20.06.2019 subroutine consinject added to pv, pvco style ",
|
||||||
"2.3.4" => "19.06.2019 change some readingnames, delete L4_plantOid, next04hours_state ",
|
"2.3.4" => "19.06.2019 change some readingnames, delete L4_plantOid, next04hours_state ",
|
||||||
"2.3.3" => "16.06.2019 change verbose 4 output, fix warning if no weather info was got ",
|
"2.3.3" => "16.06.2019 change verbose 4 output, fix warning if no weather info was got ",
|
||||||
"2.3.2" => "14.06.2019 add request string to verbose 5, add battery data to live and historical consumer data ",
|
"2.3.2" => "14.06.2019 add request string to verbose 5, add battery data to live and historical consumer data ",
|
||||||
@ -2257,21 +2258,9 @@ sub PortalAsHtml ($$) {
|
|||||||
|
|
||||||
##################################
|
##################################
|
||||||
# inject the new icon if defined
|
# inject the new icon if defined
|
||||||
my $show = 0; # wurde bereits für diese Stunde ein Geräte Icon ausgegeben ?
|
$ret .= consinject($hash,$i,@pgCDev) if($ret);
|
||||||
foreach (@pgCDev) {
|
|
||||||
if ($_) {
|
|
||||||
my ($cons,$im,$start,$end) = split (':', $_);
|
|
||||||
Log3($name, 4, "$name - Consumer to show -> $cons, relative to current time -> start: $start, end: $end") if($i<1);
|
|
||||||
if ($im && ($i >= $start) && ($i <= $end)) {
|
|
||||||
$ret .= FW_makeImage($im);
|
|
||||||
# $show = 1; # nachher dann kein normales Icon mehr anzeigen, oder doch ?
|
|
||||||
# oder noch ein extra Attr machen zum auswählen ?
|
|
||||||
# eventuell den Block wieder nach unten schieben und den normalen Birnen
|
|
||||||
# Vorrang geben
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
my $show = 0; # wurde bereits für diese Stunde ein Geräte Icon ausgegeben ?
|
||||||
$ret .= $is{$i} if (defined ($is{$i}) && !$show);
|
$ret .= $is{$i} if (defined ($is{$i}) && !$show);
|
||||||
$ret .= "</td></tr>";
|
$ret .= "</td></tr>";
|
||||||
}
|
}
|
||||||
@ -2312,7 +2301,13 @@ sub PortalAsHtml ($$) {
|
|||||||
|
|
||||||
$ret .= "<tr class='odd' style='height:".$z2."px'>";
|
$ret .= "<tr class='odd' style='height:".$z2."px'>";
|
||||||
$ret .= "<td align='center' class='smaportal' ".$style1.">$val";
|
$ret .= "<td align='center' class='smaportal' ".$style1.">$val";
|
||||||
|
|
||||||
$ret .= $is{$i} if (defined $is{$i});
|
$ret .= $is{$i} if (defined $is{$i});
|
||||||
|
|
||||||
|
##################################
|
||||||
|
# inject the new icon if defined
|
||||||
|
$ret .= consinject($hash,$i,@pgCDev) if($ret);
|
||||||
|
|
||||||
$ret .= "</td></tr>";
|
$ret .= "</td></tr>";
|
||||||
|
|
||||||
if ($z3) { # die Zone 3 lassen wir bei zu kleinen Werten auch ganz weg
|
if ($z3) { # die Zone 3 lassen wir bei zu kleinen Werten auch ganz weg
|
||||||
@ -2395,6 +2390,27 @@ sub PortalAsHtml ($$) {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# Inject consumer icon
|
||||||
|
################################################################
|
||||||
|
sub consinject($$@) {
|
||||||
|
my ($hash,$i,@pgCDev) = @_;
|
||||||
|
my $name = $hash->{NAME};
|
||||||
|
my $ret = "";
|
||||||
|
|
||||||
|
foreach (@pgCDev) {
|
||||||
|
if ($_) {
|
||||||
|
my ($cons,$im,$start,$end) = split (':', $_);
|
||||||
|
Log3($name, 4, "$name - Consumer to show -> $cons, relative to current time -> start: $start, end: $end") if($i<1);
|
||||||
|
if ($im && ($i >= $start) && ($i <= $end)) {
|
||||||
|
$ret = FW_makeImage($im);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Balkenbreite normieren
|
# Balkenbreite normieren
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user