mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
76_SMAPortal: contrib 2.3.6
git-svn-id: https://svn.fhem.de/fhem/trunk@19671 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
564eb716a3
commit
ac8d7a18cf
@ -1551,11 +1551,11 @@ sub extractConsumerHistData($$$) {
|
||||
|
||||
my ($bdcd,$bcd) = (0,0);
|
||||
foreach my $di (@{$chdata->{'BatteryDischarging'}}) {
|
||||
$bdcd += $di->{'Measurement'}; # aufsummierte Batterieentladung pro Zeiteinheit (day) in Wh
|
||||
$bdcd += $di->{'Measurement'}/4; # aufsummierte Batterieentladung pro Zeiteinheit (day) in Wh
|
||||
}
|
||||
|
||||
foreach my $ch (@{$chdata->{'BatteryCharging'}}) {
|
||||
$bcd += $ch->{'Measurement'}; # aufsummierte Batterieladung pro Zeiteinheit (day) in Wh
|
||||
$bcd += $ch->{'Measurement'}/4; # aufsummierte Batterieladung pro Zeiteinheit (day) in Wh
|
||||
}
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
@ -1583,8 +1583,6 @@ sub extractConsumerHistData($$$) {
|
||||
readingsBulkUpdate($hash, "L3_${cn}_EnergyTotalDay", sprintf("%.0f", $cpower)." Wh") if(defined($cpower) && $tf eq "day");
|
||||
readingsBulkUpdate($hash, "L3_${cn}_EnergyTotalMonth", sprintf("%.0f", $cpower)." Wh") if(defined($cpower) && $tf eq "month");
|
||||
readingsBulkUpdate($hash, "L3_${cn}_EnergyTotalYear", sprintf("%.0f", $cpower)." Wh") if(defined($cpower) && $tf eq "year");
|
||||
readingsBulkUpdate($hash, "L3_BatteryDischargingDay", sprintf("%.0f", $bdcd) ." Wh") if(defined($bdcd) && $bataval && $tf eq "day");
|
||||
readingsBulkUpdate($hash, "L3_BatteryChargingDay", sprintf("%.0f", $bcd) ." Wh") if(defined($bcd) && $bataval && $tf eq "day");
|
||||
|
||||
readingsBulkUpdate($hash, "L3_${cn}_EnergyRelativeMonthGrid", sprintf("%.0f", $gcr)." %") if(defined($gcr) && $tf eq "month");
|
||||
readingsBulkUpdate($hash, "L3_${cn}_EnergyTotalMonthGrid", sprintf("%.0f", $gct)." Wh") if(defined($gct) && $tf eq "month");
|
||||
@ -1603,6 +1601,9 @@ sub extractConsumerHistData($$$) {
|
||||
$i++;
|
||||
}
|
||||
|
||||
readingsBulkUpdate($hash, "L3_BatteryDischargingDay", sprintf("%.0f", $bdcd) ." Wh") if(defined($bdcd) && $bataval && $tf eq "day");
|
||||
readingsBulkUpdate($hash, "L3_BatteryChargingDay", sprintf("%.0f", $bcd) ." Wh") if(defined($bcd) && $bataval && $tf eq "day");
|
||||
|
||||
readingsEndUpdate($hash, 1);
|
||||
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user