From 966dcd69aa71be2e02d9268b407ca19ea783c1e2 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Tue, 24 May 2016 18:13:52 +0000 Subject: [PATCH] FHEM/10_FBDECT.pm: add on/off for desired-temp (Forum #53748) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@11514 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_FBDECT.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FHEM/10_FBDECT.pm b/FHEM/10_FBDECT.pm index 6b306f346..442693a4c 100644 --- a/FHEM/10_FBDECT.pm +++ b/FHEM/10_FBDECT.pm @@ -216,7 +216,7 @@ my %fbhttp_readings = ( productname => '"FBTYPE:$val"', state => '"state:".($val?"on":"off")', tist => 'sprintf("temperature:%.1f C (measured)", $val/2)', - tsoll => 'sprintf("desired-temp:%.1f C", $val/2)', + tsoll => 'sprintf("desired-temp:%s", $val)', members => '"members:$val"', ); @@ -260,10 +260,12 @@ FBDECT_ParseHttp($$$) Log3 $hash, 5, " $n = $h{$n}"; next if(!$fbhttp_readings{$n}); my $val = $h{$n}; + $val = ($val==254 ? "on": ($val==253 ? "off" : sprintf("%0.1f C",$val/2))) + if($n eq "tsoll"); $val = $type if($n eq "productname" && $val eq ""); my ($ptyp,$pyld) = split(":", eval $fbhttp_readings{$n}, 2); readingsBulkUpdate($hash, $ptyp, $pyld); - readingsBulkUpdate($hash, "state", "desired-temp: ".($val/2)) + readingsBulkUpdate($hash, "state", "$ptyp: $pyld") if($n eq "tsoll"); # Exception } readingsEndUpdate($hash, 1);