MAX: add deprecation warning to fake

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2735 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2013-02-15 03:21:05 +00:00
parent 97e31220cc
commit 38614ab850

View File

@ -346,13 +346,14 @@ MAX_Set($@)
if($hash->{type} eq "ShutterContact") { if($hash->{type} eq "ShutterContact") {
return "Invalid number of arguments" if(@args != 2); return "Invalid number of arguments" if(@args != 2);
Log 2, "fake is deprectaed and will be removed. Please use CUL_MAX's fakeSC";
my $state = $args[1] ? "12" : "10"; my $state = $args[1] ? "12" : "10";
return ($hash->{IODev}{Send})->($hash->{IODev},"ShutterContactState",$dest,$state, flags => "06", src => $hash->{addr}); return ($hash->{IODev}{Send})->($hash->{IODev},"ShutterContactState",$dest,$state, flags => "06", src => $hash->{addr});
} elsif($hash->{type} eq "WallMountedThermostat") { } elsif($hash->{type} eq "WallMountedThermostat") {
return "Invalid number of arguments" if(@args != 3); return "Invalid number of arguments" if(@args != 3);
return "desiredTemperature is invalid" if($args[1] < 4.5 || $args[2] > 30.5); return "desiredTemperature is invalid" if($args[1] < 4.5 || $args[2] > 30.5);
Log 2, "fake is deprectaed and will be removed. Please use CUL_MAX's fakeWT";
$args[2] = 0 if($args[2] < 0); #Clamp temperature to minimum of 0 degree $args[2] = 0 if($args[2] < 0); #Clamp temperature to minimum of 0 degree
#Encode into binary form #Encode into binary form