repair text command for device

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4227 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876
2013-11-15 15:51:54 +00:00
parent b4d7ae224c
commit 1c9654bc4f
2 changed files with 7 additions and 6 deletions

View File

@@ -2223,12 +2223,13 @@ sub CUL_HM_Set($@) {
}
elsif($cmd eq "text") { ################################################# reg
my ($bn,$l1, $l2) = ($chn,$a[2],$a[3]); # Create CONFIG_WRITE_INDEX string
if (!$roleC){# if used on device.
if ($roleD){# if used on device.
return "$a[2] is not a button number" if($a[2] !~ m/^\d*$/ || $a[2] < 1);
return "$a[3] is not on or off" if($a[3] !~ m/^(on|off)$/);
$bn = $a[2]*2-($a[3] eq "on" ? 0 : 1);
($l1, $l2) = ($a[4],$a[5]);
}
$chn = sprintf("%02X",$bn)
}
else{
return "to many parameter. Try set $a[0] text $a[2] $a[3]" if($a[4]);
}

View File

@@ -92,8 +92,8 @@ my %culHmModel=(
"002C" => {name=>"KS550TECH" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w' ,lst=>'p,1' ,chn=>"",},
"002D" => {name=>"HM-LC-SW4-PCB" ,st=>'switch' ,cyc=>'' ,rxt=>'b' ,lst=>'3' ,chn=>"Sw:1:4",},
"002E" => {name=>"HM-LC-DIM2L-SM" ,st=>'dimmer' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"Sw:1:2",},
"002F" => {name=>"HM-SEC-SC" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",},
"0030" => {name=>"HM-SEC-RHS" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c:w' ,lst=>'1,4' ,chn=>"",},
"002F" => {name=>"HM-SEC-SC" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c' ,lst=>'1,4' ,chn=>"",},# remove wakeup - need retest
"0030" => {name=>"HM-SEC-RHS" ,st=>'threeStateSensor' ,cyc=>'28:00' ,rxt=>'c' ,lst=>'1,4' ,chn=>"",},# remove wakeup - need retest
"0031" => {name=>"HM-WS550LCB" ,st=>'THSensor' ,cyc=>'' ,rxt=>'' ,lst=>'p' ,chn=>"",},
"0032" => {name=>"HM-WS550LCW" ,st=>'THSensor' ,cyc=>'' ,rxt=>'' ,lst=>'p' ,chn=>"",},
"0033" => {name=>"KS550LC" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w' ,lst=>'p,1' ,chn=>"",},
@@ -201,8 +201,8 @@ my %culHmModel=(
"00A2" => {name=>"ROTO_ZEL-STG-RM-FZS-2" ,st=>'switch' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",}, #radio-controlled socket adapter switch actuator 1-channel
"00A3" => {name=>"HM-LC-Dim1L-Pl-2" ,st=>'dimmer' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",},
"00A4" => {name=>"HM-LC-Dim1T-Pl-2" ,st=>'dimmer' ,cyc=>'' ,rxt=>'' ,lst=>'1,3' ,chn=>"",},
"00A5" => {name=>"HM-RC-Sec4-2" ,st=>'remote' ,cyc=>'' ,rxt=>'c:l' ,lst=>'1,4' ,chn=>"Btn:1:2,BTN_T:3:1,BTN_A:4:1",},#only 1 and 2 canbe peered???
"00A6" => {name=>"HM-RC-Key4-2" ,st=>'remote' ,cyc=>'' ,rxt=>'c:l' ,lst=>'1,4' ,chn=>"Btn:1:2,BTN_T:3:1,BTN_A:4:1",},#only 1 and 2 canbe peered???
"00A5" => {name=>"HM-RC-Sec4-2" ,st=>'remote' ,cyc=>'' ,rxt=>'c:l' ,lst=>'1,4' ,chn=>"Btn:1:2,BTN_T:3:1,BTN_A:4:1",},#only 1 and 2 can be peered???
"00A6" => {name=>"HM-RC-Key4-2" ,st=>'remote' ,cyc=>'' ,rxt=>'c:l' ,lst=>'1,4' ,chn=>"Btn:1:2,BTN_T:3:1,BTN_A:4:1",},#only 1 and 2 can be peered???
"00A7" => {name=>"HM-Sen-RD-O" ,st=>'sensRain' ,cyc=>'' ,rxt=>'' ,lst=>'1:1,4:1p' ,chn=>"Rain:1:1,Heating:2:2",},#stc:70 THSensor
"00A8" => {name=>"HM-WDS30-OT2-SM" ,st=>'THSensor' ,cyc=>'00:10' ,rxt=>'c:w:f' ,lst=>'p' ,chn=>"T1:1:1,T2:2:2,T1_T2:3:3,T2_T1:4:4,Event:5:5",},
"00A9" => {name=>"HM-PB-6-WM55" ,st=>'remote' ,cyc=>'' ,rxt=>'c' ,lst=>'1,4' ,chn=>"Btn:1:6",},