2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 23:06:05 +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:
nasseeder1 2020-11-20 20:01:00 +00:00
parent be3c4c575e
commit 78c1e4fadd

View File

@ -3308,8 +3308,11 @@ sub extractConsumerEnergySetting {
my $d = $addon;
my $cclv = $stpl{consumerCurrentdata}{level};
my ($gcval) = $data_cont =~ /var\sgridConsumptionValue\s=\s0\.(\d{2});/x // "undefined";
my ($pvval) = $data_cont =~ /var\spvValue\s=\s0\.(\d{2});/x // "undefined";
my ($gcval) = $data_cont =~ /var\sgridConsumptionValue\s=\s(.*?);/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%";