From edb6f45fec536f61739f1d8c31f012b76fa28a50 Mon Sep 17 00:00:00 2001 From: mgehre <> Date: Sat, 4 Jan 2014 10:09:24 +0000 Subject: [PATCH] MAX: allow pairing of WallThermostat and ShutterContact by Gui git-svn-id: https://svn.fhem.de/fhem/trunk@4553 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_MAX.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/10_MAX.pm b/fhem/FHEM/10_MAX.pm index b62255c04..9beeef02e 100755 --- a/fhem/FHEM/10_MAX.pm +++ b/fhem/FHEM/10_MAX.pm @@ -525,8 +525,20 @@ MAX_Set($@) $assoclist .= "," if(length($assoclist)); $assoclist .= "fakeWallThermostat,fakeShutterContact"; } - } elsif($hash->{type} eq "ShutterContact" || $hash->{type} eq "WallMountedThermostat") { - $assoclist = join(",", map { defined($_->{type}) && $_->{type} =~ /HeatingThermostat.*/ ? $_->{NAME} : () } values %{$modules{MAX}{defptr}}); + + } elsif($hash->{type} =~ /WallMountedThermostat/) { + $assoclist = join(",", map { defined($_->{type}) && + ($_->{type} eq "HeatingThermostat" + || $_->{type} eq "HeatingThermostatPlus" + || $_->{type} eq "ShutterContact") + && $_ != $hash ? $_->{NAME} : () } values %{$modules{MAX}{defptr}}); + if($hash->{IODev}->{TYPE} eq "CUL_MAX") { + $assoclist .= "," if(length($assoclist)); + $assoclist .= "fakeShutterContact"; + } + + } elsif($hash->{type} eq "ShutterContact") { + $assoclist = join(",", map { defined($_->{type}) && $_->{type} =~ /.*Thermostat.*/ ? $_->{NAME} : () } values %{$modules{MAX}{defptr}}); } my $templistOffset = join(",",map { MAX_SerializeTemperature(($_-7)/2) } (0..14));