mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
76_SMAPortal: contrib 3.7.0
git-svn-id: https://svn.fhem.de/fhem/trunk@23190 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
be3c4c575e
commit
78c1e4fadd
@ -3308,8 +3308,11 @@ sub extractConsumerEnergySetting {
|
|||||||
my $d = $addon;
|
my $d = $addon;
|
||||||
my $cclv = $stpl{consumerCurrentdata}{level};
|
my $cclv = $stpl{consumerCurrentdata}{level};
|
||||||
|
|
||||||
my ($gcval) = $data_cont =~ /var\sgridConsumptionValue\s=\s0\.(\d{2});/x // "undefined";
|
my ($gcval) = $data_cont =~ /var\sgridConsumptionValue\s=\s(.*?);/x // "undefined";
|
||||||
my ($pvval) = $data_cont =~ /var\spvValue\s=\s0\.(\d{2});/x // "undefined";
|
my ($pvval) = $data_cont =~ /var\spvValue\s=\s(.*?);/x // "undefined";
|
||||||
|
|
||||||
|
$gcval = sprintf("%.2f",$gcval) * 100;
|
||||||
|
$pvval = sprintf("%.2f",$pvval) * 100;
|
||||||
|
|
||||||
push @$daref, "${cclv}_${d}_SwitchCondition:GridConsumption=$gcval% PV=$pvval%";
|
push @$daref, "${cclv}_${d}_SwitchCondition:GridConsumption=$gcval% PV=$pvval%";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user