10_FBDECT.pm: remove double temperature events (Forum #57644)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12167 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-09-18 12:20:43 +00:00
parent 423a13b2d2
commit aafc9a15e3

View File

@ -221,7 +221,7 @@ my %fbhttp_readings = (
present => '"present:".($val?"yes":"no")', present => '"present:".($val?"yes":"no")',
productname => '"FBTYPE:$val"', productname => '"FBTYPE:$val"',
state => '"state:".($val?"on":"off")', state => '"state:".($val?"on":"off")',
tist => 'sprintf("temperature:%.1f C (measured)", $val/2)', # tist => 'sprintf("temperature:%.1f C (measured)", $val/2)', # Forum #57644
tsoll => 'sprintf("desired-temp:%s", $val)', tsoll => 'sprintf("desired-temp:%s", $val)',
members => '"members:$val"', members => '"members:$val"',
); );
@ -270,9 +270,11 @@ FBDECT_ParseHttp($$$)
if($n eq "tsoll"); if($n eq "tsoll");
$val = $type if($n eq "productname" && $val eq ""); $val = $type if($n eq "productname" && $val eq "");
my ($ptyp,$pyld) = split(":", eval $fbhttp_readings{$n}, 2); my ($ptyp,$pyld) = split(":", eval $fbhttp_readings{$n}, 2);
readingsBulkUpdate($hash, $ptyp, $pyld); if($n eq "tsoll") {
readingsBulkUpdate($hash, "state", "$ptyp: $pyld") readingsBulkUpdate($hash, "state", "$ptyp: $pyld")
if($n eq "tsoll"); # Exception } else {
readingsBulkUpdate($hash, $ptyp, $pyld);
}
} }
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);