From ef1340a4c22043f4a443f6d641566abee4c9f37d Mon Sep 17 00:00:00 2001 From: mgehre <> Date: Thu, 21 Mar 2013 15:12:52 +0000 Subject: [PATCH] MAX: fix pairing bug git-svn-id: https://svn.fhem.de/fhem/trunk@2959 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/14_CUL_MAX.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/14_CUL_MAX.pm b/fhem/FHEM/14_CUL_MAX.pm index c2754fd3a..1f8ffaee6 100644 --- a/fhem/FHEM/14_CUL_MAX.pm +++ b/fhem/FHEM/14_CUL_MAX.pm @@ -297,8 +297,9 @@ CUL_MAX_Parse($$) if($shash->{pairmode}) { Log 3, "CUL_MAX_Parse: Pairing device $src of type $device_types{$type} with serial $serial"; - CUL_MAX_Send($shash, "PairPong", $src, "00"); Dispatch($shash, "MAX,$isToMe,define,$src,$device_types{$type},$serial,0,0", {RAWMSG => $rmsg}); + #Send after dispatch the define, otherwise Send will create an invalid device + CUL_MAX_Send($shash, "PairPong", $src, "00"); #This are the default values that a device has after factory reset or pairing if($device_types{$type} =~ /HeatingThermostat.*/) {