mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 07:19:24 +00:00
CUL_HM: introduce tempTmplSet command to apply temeratur list easily
git-svn-id: https://svn.fhem.de/fhem/trunk@10945 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
df854ba0db
commit
ea647e92cb
@ -590,6 +590,7 @@ sub CUL_HM_Attr(@) {#################################
|
||||
return $chk if ($chk);
|
||||
|
||||
my $updtReq = 0;
|
||||
|
||||
if ($attrName eq "expert"){#[0,1,2]
|
||||
$attr{$name}{$attrName} = $attrVal;
|
||||
CUL_HM_chgExpLvl($_) foreach ((map{CUL_HM_id2Hash($_)} CUL_HM_getAssChnIds($name)),$defs{$name});
|
||||
@ -3647,7 +3648,12 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
my $usg = "Unknown argument $cmd, choose one of ".join(" ",sort @arr1);
|
||||
$usg =~ s/ pct/ pct:slider,0,1,100/;
|
||||
$usg =~ s/ virtual/ virtual:slider,1,1,50/;
|
||||
|
||||
if ($usg =~ m/ tempTmplSet/){
|
||||
my $tl = $modules{CUL_HM}{AttrList};;
|
||||
my $ok = ($tl =~ s/.* (tempListTmpl)(\:.*? ).*/$2/);
|
||||
$tl = $ok?$tl:"";
|
||||
$usg =~ s/ tempTmplSet/ tempTmplSet$tl/;
|
||||
}
|
||||
return $usg;
|
||||
}
|
||||
elsif($h eq "" && @a != 2) {
|
||||
@ -4756,6 +4762,22 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
$ret = "verifed with no faults" if (!$ret && $action eq "verify");
|
||||
return $ret;
|
||||
}
|
||||
elsif($cmd eq "tempTmplSet") { #############################################
|
||||
$state= "";
|
||||
return "tempate missing" if (!defined $a[2]);
|
||||
CommandAttr(undef, "$name tempListTmpl $a[2]");
|
||||
|
||||
my ($fn,$template) = split(":",AttrVal($name,"tempListTmpl",$name));
|
||||
if ($modules{HMinfo}){
|
||||
if (!$template){ $template = HMinfo_tempListDefFn() .":$fn" ;}
|
||||
else{ $template = HMinfo_tempListDefFn($fn).":$template";}
|
||||
}
|
||||
else{
|
||||
if (!$template){ $template = "./tempList.cfg:$fn";}
|
||||
else{ $template = "$fn:$template" ;}
|
||||
}
|
||||
CUL_HM_tempListTmpl($name,"restore",$template);
|
||||
}
|
||||
elsif($cmd eq "sysTime") { ##################################################
|
||||
$state = "";
|
||||
my $s2000 = sprintf("%02X", CUL_HM_secSince2000());
|
||||
@ -9055,6 +9077,9 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
|
||||
tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
|
||||
</code>
|
||||
</li>
|
||||
<li><B>tempTmplSet =>"[[ <file> :]templateName]</B><br>
|
||||
Set the attribut and apply the change to the device
|
||||
</li>
|
||||
<li><B>partyMode <HH:MM><durationDays></B><br>
|
||||
set control mode to party and device ending time. Add the time it ends
|
||||
and the <b>number of days</b> it shall last. If it shall end next day '1'
|
||||
@ -10410,6 +10435,9 @@ sub CUL_HM_tempListTmpl(@) { ##################################################
|
||||
tempListFri>07:00 14.0 13:00 16.0 16:00 18.0 21:00 19.0 24:00 14.0
|
||||
</code>
|
||||
</li>
|
||||
<li><B>tempTmplSet =>"[[ <file> :]templateName]</B><br>
|
||||
Setzt das Attribut und sendet die Änderungen an das Device.
|
||||
</li>
|
||||
</ul><br>
|
||||
</li>
|
||||
<li>OutputUnit (HM-OU-LED16)
|
||||
|
@ -884,7 +884,7 @@ sub HMinfo_listOfTempTemplates() { ###########################################
|
||||
my $at=$modules{CUL_HM};
|
||||
if ($modules{CUL_HM}{AttrList}){
|
||||
my $l = "none,".join(",",@tmpl);
|
||||
$modules{CUL_HM}{AttrList} =~ s/ tempListTmpl(.* )*?/ tempListTmpl:$l/;
|
||||
$modules{CUL_HM}{AttrList} =~ s/ tempListTmpl(.*? )/ tempListTmpl:$l /;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
@ -1574,6 +1574,7 @@ $culHmModelSets{"HM-OU-CM-PCB"} = $culHmModelSets{"HM-SEC-SD"};
|
||||
,tempListWed =>"[prep|exec] HH:MM temp ..."
|
||||
,tempListFri =>"[prep|exec] HH:MM temp ..."
|
||||
,tempListTmpl =>"[verify|restore] [[-file-:]templateName] ..."
|
||||
,tempTmplSet =>"[[-file-:]templateName] ..."
|
||||
,partyMode =>"[prep|exec] HH:MM durationDays ..."
|
||||
,displayMode =>"[temp-only|temp-hum]"
|
||||
,displayTemp =>"[actual|setpoint]"
|
||||
@ -1615,6 +1616,7 @@ $culHmModelSets{"HM-OU-CM-PCB"} = $culHmModelSets{"HM-SEC-SD"};
|
||||
,tempListWed =>"[prep|exec] HH:MM temp ..."
|
||||
,tempListFri =>"[prep|exec] HH:MM temp ..."
|
||||
,tempListTmpl =>"[verify|restore] [[-file-:]templateName] ..."
|
||||
,tempTmplSet =>"[[-file-:]templateName] ..."
|
||||
,"desired-temp" =>"[on|off|5.0..30.0]"
|
||||
,sysTime =>""
|
||||
}
|
||||
@ -1635,6 +1637,7 @@ $culHmModelSets{"HM-OU-CM-PCB"} = $culHmModelSets{"HM-SEC-SD"};
|
||||
,tempListFri =>"[prep|exec] [p1|p2|p3] HH:MM temp ..."
|
||||
,"desired-temp" =>"[on|off|5.0..30.0]"
|
||||
,tempListTmpl =>"[verify|restore] [[-file-:]templateName] ..."
|
||||
,tempTmplSet =>"[[-file-:]templateName] ..."
|
||||
,peerChan =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"
|
||||
}
|
||||
,"HM-TC-IT-WM-W-EU07"=>{ peerChan =>"-btnNumber- -actChn- ... single [set|unset] [actor|remote|both]"}
|
||||
|
Loading…
Reference in New Issue
Block a user