From a7eae2a65d9f4a8382d0afe8881f08008c4cf446 Mon Sep 17 00:00:00 2001 From: Wzut Date: Thu, 1 Apr 2021 17:53:28 +0000 Subject: [PATCH] 38_BEOK.pm: remove floor-temp in state if only internal sensor is used git-svn-id: https://svn.fhem.de/fhem/trunk@24122 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/38_BEOK.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/38_BEOK.pm b/fhem/FHEM/38_BEOK.pm index 776fcb052..177239037 100644 --- a/fhem/FHEM/38_BEOK.pm +++ b/fhem/FHEM/38_BEOK.pm @@ -268,10 +268,12 @@ sub Get { my $hash = shift; my $name = shift; my $cmd = shift // return "get $name needs at least one argument !"; - my $gets = 'status:noArg auth:noArg temperature:noArg'; + my $gets = 'status:noArg auth:noArg temperature:noArg'; return "unknown command, choose one of $gets" if ($cmd eq '?'); + Log3($name, 4, "$name, Get $cmd"); + if ($cmd eq 'auth') { return 'device auth key already stored' if ($hash->{isAuth}); @@ -356,8 +358,6 @@ sub Set { return SetExtensions($hash, $cmdList, $name, $cmd, $subcmd); } - ($subcmd) ? Log3($name, 5, "$name, set $cmd $subcmd") : Log3($name, 5, "$name, set $cmd"); - return 'no set commands allowed, auth key and device id are missing ! ( need run get auth first )' if (!$hash->{isAuth}); @@ -1181,7 +1181,10 @@ sub summaryFn { $locked = "$locked" if ($locked); $html .= ''.$relay.''.$locked.''; - $html .= ''.$names[0].ReadingsNum($name,'room-temp',0).' °C
'.$names[1].ReadingsNum($name,'floor-temp',0).' °C'; + $html .= ''.$names[0].ReadingsNum($name,'room-temp',0).' °C'; + my $flt = $names[1].ReadingsNum($name, 'floor-temp', 0); + $html .= '
'.$flt.' °C' if (($flt > 0) || (ReadingsVal($name, 'sensor', '') ne 'internal')); + $html .= ''; $html .= "".$names[2]."