From e62cd39b0d551366adc633dd0f93b664abf2e89a Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Thu, 22 Aug 2019 14:08:43 +0000 Subject: [PATCH] 76_SMAPortal: contrib 2.4.5 git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20044 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/DS_Starter/76_SMAPortal.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/DS_Starter/76_SMAPortal.pm b/contrib/DS_Starter/76_SMAPortal.pm index f827ec242..db2162adb 100644 --- a/contrib/DS_Starter/76_SMAPortal.pm +++ b/contrib/DS_Starter/76_SMAPortal.pm @@ -442,9 +442,11 @@ sub DbLog_split($$) { } if($event =~ m/Power|PV|FeedIn|SelfSupply|Temperature|Total|Energy|Hour:|Hour(\d\d):/) { $event =~ /^L(.*):\s(.*)\s(.*)/; - $reading = "L".$1; - $value = $2; - $unit = $3; + if($1) { + $reading = "L".$1; + $value = $2; + $unit = $3; + } } if($event =~ m/Next04Hours-IsConsumption|RestOfDay-IsConsumption|Tomorrow-IsConsumption|Battery/) { $event =~ /^L(.*):\s(.*)\s(.*)/;