2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

98_weekprofile: allow only MAX thermostats

git-svn-id: https://svn.fhem.de/fhem/trunk@10425 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
risiko79 2016-01-09 10:53:11 +00:00
parent 9d92406597
commit fadfbe1f88

View File

@ -77,7 +77,8 @@ sub weekprofile_getDeviceType($;$)
if ($devHash->{TYPE} =~ /CUL_HM/){
$type = AttrVal($device,"model","");
}
elsif ($devHash->{TYPE} =~ /MAX/){
#avoid max shutter contact
elsif ( ($devHash->{TYPE} =~ /MAX/) && ($devHash->{type} =~ /.*Thermostat.*/) ){
$type = "MAX";
}
elsif ($devHash->{TYPE} =~ /dummy/){
@ -252,7 +253,7 @@ sub weekprofile_sendDevProfile(@)
$k++;
}
}
$cmd =~ s/^\s+|\s+$//g;
$cmd =~ s/^\s+|\s+$//g if ($cmd);
Log3 $me, 4, "$me(sendDevProfile): $cmd";
fhem($cmd);
return undef;
@ -391,7 +392,7 @@ sub weekprofile_Define($$)
my $devName = undef;
if (@a > 1) {
$devName = $a[2];
$devName =~ s/(^\s+|\s+$)//g;
$devName =~ s/(^\s+|\s+$)//g if ($devName);
}
$hash->{MASTERDEV}->{NAME} = $devName if (defined($devName));