14_CUL_MAX.pm: Accept pair request immediately if device was already paired before

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12440 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2016-10-26 20:24:45 +00:00
parent 90dbeaa549
commit 404fadd5d3

View File

@ -351,7 +351,8 @@ CUL_MAX_Parse($$)
}
#If $isToMe is true, this device is already paired and just wants to be reacknowledged
if($shash->{pairmode} || $isToMe) {
#If we already have the device created but it was reseted (batteries changed?), we directly re-pair (without pairmode)
if($shash->{pairmode} || $isToMe || exists($modules{MAX}{defptr}{$src})) {
Log3 $hash, 3, "CUL_MAX_Parse: " . ($isToMe ? "Re-Pairing" : "Pairing") . " device $src of type $device_types{$type} with serial $serial";
Dispatch($shash, "MAX,$isToMe,define,$src,$device_types{$type},$serial,0", {});