mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
bugfix for saving the previous state of CUL_FHTTK devices
git-svn-id: https://svn.fhem.de/fhem/trunk@1224 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
88b19d1490
commit
991919942f
@ -194,10 +194,15 @@ CUL_FHTTK_Parse($$)
|
||||
}
|
||||
}
|
||||
|
||||
if (! defined($defs{$self}{READINGS}{"Previous"})) {
|
||||
$defs{$self}{READINGS}{"Previous"}{VAL} = "";
|
||||
$defs{$self}{READINGS}{"Previous"}{TIME} = "";
|
||||
}
|
||||
|
||||
my $prevState = $defs{$self}{PREV}{STATE};
|
||||
if ($prevState != $state) {
|
||||
my ($windowReading,$windowState) = split(/:/, $fhttfk_codes{$prevState});
|
||||
$defs{$self}{READINGS}{"Previous"}{VAL} = $windowState;
|
||||
$defs{$self}{READINGS}{"Previous"}{VAL} = $windowState if $windowState ne "";
|
||||
$defs{$self}{READINGS}{"Previous"}{TIME} = TimeNow();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user