OWTEMP: bugfixing
git-svn-id: https://svn.fhem.de/fhem/trunk@513 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -154,20 +154,23 @@ OWTEMP_GetUpdate($$)
|
|||||||
$warn = "templow";
|
$warn = "templow";
|
||||||
$hash->{ALARM} = "1";
|
$hash->{ALARM} = "1";
|
||||||
$ret = OWTEMP_UpdateReading($hash,"warnings",$now,"",$warn);
|
$ret = OWTEMP_UpdateReading($hash,"warnings",$now,"",$warn);
|
||||||
$alarm = " A: ".$hash->{ALARM};
|
$alarm = "A: ".$hash->{ALARM};
|
||||||
} elsif ($temp >= $hash->{READINGS}{temphigh}{VAL}) {
|
} elsif ($temp >= $hash->{READINGS}{temphigh}{VAL}) {
|
||||||
$warn = "temphigh";
|
$warn = "temphigh";
|
||||||
$hash->{ALARM} = "1";
|
$hash->{ALARM} = "1";
|
||||||
$ret = OWTEMP_UpdateReading($hash,"warnings",$now,"",$warn);
|
$ret = OWTEMP_UpdateReading($hash,"warnings",$now,"",$warn);
|
||||||
$alarm = " A: ".$hash->{ALARM};
|
$alarm = "A: ".$hash->{ALARM};
|
||||||
} else {
|
} else {
|
||||||
$ret = OWTEMP_UpdateReading($hash,"warnings",$now,"",$warn);
|
$ret = OWTEMP_UpdateReading($hash,"warnings",$now,"",$warn);
|
||||||
$alarm = " A: ".$hash->{ALARM};
|
$alarm = "A: ".$hash->{ALARM};
|
||||||
}
|
}
|
||||||
$hash->{CHANGED}[$count] = "warnings: $warn";
|
$hash->{CHANGED}[$count] = "warnings: $warn";
|
||||||
$hash->{CHANGED}[$count+1] = "T: " . $temp . $alarm;
|
$hash->{CHANGED}[$count+1] = "T: " . $temp . $alarm;
|
||||||
|
|
||||||
$hash->{STATE} = "T: " . $hash->{READINGS}{temperature}{VAL} . $alarm;
|
$hash->{STATE} = "T: " . $temp . " " .
|
||||||
|
"L: " . $hash->{READINGS}{templow}{VAL} . " " .
|
||||||
|
"H: " . $hash->{READINGS}{temphigh}{VAL} . " " .
|
||||||
|
$alarm;
|
||||||
} else {
|
} else {
|
||||||
$value = OW::get("/uncached/$path/".$a);
|
$value = OW::get("/uncached/$path/".$a);
|
||||||
foreach my $r (sort keys %gets) {
|
foreach my $r (sort keys %gets) {
|
||||||
|
|||||||
Reference in New Issue
Block a user