2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-09 01:34:19 +00:00

09_CUL_FHTTK.pm:

- fixed compare of previous state and output state of change

git-svn-id: https://svn.fhem.de/fhem/trunk@7294 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
matscher 2014-12-21 18:33:37 +00:00
parent 0cbdc6961e
commit be7954933e

View File

@ -173,7 +173,7 @@ CUL_FHTTK_Set($@)
IOWrite($hash, "", sprintf("T%s01", $hash->{CODE})); # 0x01 - open or 0x81
} elsif ($opt eq "Closed" ) {
Log3 $name, 3, "CUL_FHTTK ($name) changed window state to open.";
Log3 $name, 3, "CUL_FHTTK ($name) changed window state to closed.";
IOWrite($hash, "", sprintf("T%s02", $hash->{CODE})); # 0x02 - closed or 0x82
@ -275,7 +275,7 @@ CUL_FHTTK_Parse($$)
$defs{$name}{READINGS}{"Previous"}{TIME} = "";
}
if (defined($defs{$name}{PREV}{STATE}) && $defs{$name}{PREV}{STATE} != $state) {
if (defined($defs{$name}{PREV}{STATE}) && $defs{$name}{PREV}{STATE} ne $state) {
my $prevState = $defs{$name}{PREV}{STATE};
my ($windowReading,$windowState) = split(/:/, $fhttfk_codes{$prevState});
$defs{$name}{READINGS}{"Previous"}{VAL} = $windowState if defined($windowState) && $windowState ne "";