mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
76_SolarForecast: contrib 1.0.8
git-svn-id: https://svn.fhem.de/fhem/trunk@28099 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3d55290f3c
commit
d404e40245
@ -9103,13 +9103,26 @@ sub __createOwnSpec {
|
||||
|
||||
if ($uatr eq 'kWh') {
|
||||
for (my $r = 0 ; $r < $vinr; $r++) {
|
||||
if ($u->{$r} && $u->{$r} =~ /Wh/xs) {
|
||||
next if(!$u->{$r});
|
||||
|
||||
if ($u->{$r} =~ /^Wh/xs) {
|
||||
$v->{$r} = sprintf "%.1f",($v->{$r} / 1000);
|
||||
$u->{$r} = 'kWh';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($uatr eq 'Wh') {
|
||||
for (my $r = 0 ; $r < $vinr; $r++) {
|
||||
next if(!$u->{$r});
|
||||
|
||||
if ($u->{$r} =~ /^kWh/xs) {
|
||||
$v->{$r} = sprintf "%.0f",($v->{$r} * 1000);
|
||||
$u->{$r} = 'Wh';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ownv .= "<tr>";
|
||||
$ownv .= "<td $dstyle>".($cats[$i-1] ? '<b>'.$cats[$i-1].'</b>' : '')."</td>";
|
||||
$ownv .= "<td $dstyle><b>".$h->{0}{label}.":</b></td> <td align=right $dstyle>".$v->{0}." ".$u->{0}."</td>" if($h->{0}{label});
|
||||
|
Loading…
Reference in New Issue
Block a user