2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-08 05:15:10 +00:00

repair RT controlMode settings, remove statusRequest from Thermostat commandlist

git-svn-id: https://svn.fhem.de/fhem/trunk@4016 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2013-10-07 11:40:01 +00:00
parent 439f210717
commit 885d0b2b3c
3 changed files with 10 additions and 7 deletions

View File

@ -2364,7 +2364,7 @@ sub CUL_HM_Set($@) {
return "value:".$data." out of range for Reg \"".$regName."\""
if (!($reg->{c} =~ m/^(lit|hex|min2time)$/)&&
($data < $reg->{min} ||$data > $reg->{max})); # none number
return"invalid value. use:". join(",",keys%{$reg->{lit}})
return"invalid value. use:". join(",",sort keys%{$reg->{lit}})
if ($reg->{c} eq 'lit' && !defined($reg->{lit}{$data}));
$data *= $reg->{f} if($reg->{f});# obey factor befor possible conversion
@ -2461,11 +2461,12 @@ sub CUL_HM_Set($@) {
if ($cmd eq "on-till"){
# to be extended to handle end date as well
my ($eH,$eM,$eSec) = split(':',$duration);
return "please enter time informat hh:mm:ss" if (!$eSec);
$eSec += $eH*3600 + $eM*60;
my @lt = localtime;
my $ltSec = $lt[2]*3600+$lt[1]*60+$lt[0];# actually strip of date
$eSec += 3600*24 if ($ltSec > $eSec); # go for the next day
$duration = $eSec - $ltSec;
$duration = $eSec - $ltSec;
}
return "please enter the duration in seconds"
if (!defined $duration || $duration !~ m/^[+-]?\d+(\.\d+)?$/);
@ -2687,12 +2688,14 @@ sub CUL_HM_Set($@) {
CUL_HM_PushCmdStack($hash,$msg) if ($msg);
}
elsif($cmd =~ m/^(controlMode|controlManu|controlParty)$/) { ################
my $mode = $a[1];
my $mode = $a[2];
if ($cmd ne "controlMode"){
$mode = substr($a[1],7);
$a[2] = ($a[2] eq "off")?4.5:($a[2] eq "on"?30.5:$a[2]);
}
return "select of mode [auto|boost|day|night] or mode-manu, mode-party"
$mode = lc $mode;
return "invalid $mode:select of mode [auto|boost|day|night] or"
." controlManu,controlParty"
if ($mode !~ m/^(auto|manu|party|boost|day|night)$/);
my ($temp,$party);
if ($mode =~ m/^(auto|boost|day|night)$/){

View File

@ -301,6 +301,7 @@ sub HMinfo_SetFn($@) {#########################################################
}
elsif($cmd eq "protoEvents"){##print protocol-events-------------------------
my ($type) = @a;
$type = "long" if(!$type);
my @paramList;
my @IOlist;
foreach my $dName (HMinfo_getEntities($opt."dv",$filter)){

View File

@ -918,7 +918,7 @@ my %culHmSubTypeDevSets = (# device of this subtype
blindActuator =>{ statusRequest =>""},
# remote =>{ },
threeStateSensor =>{ statusRequest =>""},
THSensor =>{ statusRequest =>""},
# THSensor =>{ statusRequest =>""}, at least OT/OT2 do not support this
# virtual =>{ },
smokeDetector =>{ statusRequest =>""},
winMatic =>{ statusRequest =>""},
@ -965,8 +965,7 @@ my %culHmSubTypeSets = (# channels of this subtype
remote =>{ peerChan =>"<btnNumber> <actChn> ... [single|dual] [set|unset] [actor|remote|both]"},
threeStateSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]"
,statusRequest =>""},
THSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]"
,statusRequest =>""},
THSensor =>{ peerChan =>"<btnNumber> <actChn> ... single [set|unset] [actor|remote|both]"},
virtual =>{ peerChan =>"<btnNumber> <actChn> ... [single|dual] [set|unset] [actor|remote|both]"
,press =>"[long|short]..."
,postEvent =>"<condition>"