fix for FS20 readings without value, e.g. on, off, dimup
git-svn-id: https://svn.fhem.de/fhem/trunk@156 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -109,18 +109,27 @@ DbLog_ParseEvent($$)
|
|||||||
elsif($type eq "FS20") {
|
elsif($type eq "FS20") {
|
||||||
@parts= split(/ /,$value);
|
@parts= split(/ /,$value);
|
||||||
my $reading= $parts[0]; if(!defined($reading)) { $reading= ""; }
|
my $reading= $parts[0]; if(!defined($reading)) { $reading= ""; }
|
||||||
|
if($#parts>=1) {
|
||||||
$value= join(" ", shift @parts);
|
$value= join(" ", shift @parts);
|
||||||
if($reading =~ m(^dim*%$)) {
|
if($reading =~ m(^dim*%$)) {
|
||||||
$value= substr($reading,3,length($reading)-4);
|
$value= substr($reading,3,length($reading)-4);
|
||||||
$reading= "dim";
|
$reading= "dim";
|
||||||
$unit= "%";
|
$unit= "%";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$value= "";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# FHT
|
# FHT
|
||||||
elsif($type eq "FHT") {
|
elsif($type eq "FHT") {
|
||||||
if($reading =~ m(-temp)) { $value=~ s/ \(Celsius\)//; $unit= "°C"; }
|
if($reading =~ m(-temp)) { $value=~ s/ \(Celsius\)//; $unit= "°C"; }
|
||||||
if($reading =~ m(temp-offset)) { $value=~ s/ \(Celsius\)//; $unit= "°C"; }
|
if($reading =~ m(temp-offset)) { $value=~ s/ \(Celsius\)//; $unit= "°C"; }
|
||||||
if($reading eq "actuator") { $value=~ s/%//; $value= $value*1.; $unit= "%"; }
|
if($reading eq "actuator") {
|
||||||
|
# TODO: 2008-03-24 currently something wrong:
|
||||||
|
# "actuator: lime-protection"
|
||||||
|
$value=~ s/%//; $value= $value*1.; $unit= "%";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# KS300
|
# KS300
|
||||||
elsif($type eq "KS300") {
|
elsif($type eq "KS300") {
|
||||||
|
|||||||
Reference in New Issue
Block a user