mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-27 20:34:52 +00:00
CUL_HM: aviod error if HMinfo is not defined
git-svn-id: https://svn.fhem.de/fhem/trunk@25287 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6a6139be91
commit
da7dc81546
@ -5478,7 +5478,9 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
elsif($cmd eq "tplDel") { ###################################################
|
||||
return "template missing" if (!defined $a[2]);
|
||||
my ($p,$t) = split(">",$a[2]);
|
||||
HMinfo_templateDel($name,$t,$p) if (eval "defined(&HMinfo_templateDel)");
|
||||
if (defined &HMinfo_templateDel){
|
||||
HMinfo_templateDel($name,$t,$p) if (eval "defined(&HMinfo_templateDel)");
|
||||
}
|
||||
return;
|
||||
}
|
||||
elsif($cmd eq "virtual") { ##################################################
|
||||
@ -7519,7 +7521,10 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
return "no HMinfo defined" if (!defined $defs{$hm});
|
||||
|
||||
my @par = map{$params{$_}} sort keys%params;
|
||||
my $ret = HMinfo_SetFn($defs{$hm},$hm,"templateSet",$name,$tpl,"$tPeer$tTyp",@par);
|
||||
my $ret = "not supported w/o HMinfo";
|
||||
if (defined &HMinfo_SetFn){
|
||||
$ret = HMinfo_SetFn($defs{$hm},$hm,"templateSet",$name,$tpl,"$tPeer$tTyp",@par);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
elsif($cmd =~ m/tplPara(..)(.)_.*/) { #######################################
|
||||
@ -7538,7 +7543,10 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
||||
$pv[$pNo] = $a[2];
|
||||
}
|
||||
|
||||
my $ret = HMinfo_SetFn($defs{hm},$hm,"templateSet",$name,$tn,$p,@pv);
|
||||
my $ret = "not supported w/o HMinfo";
|
||||
if (defined &HMinfo_SetFn){
|
||||
$ret = HMinfo_SetFn($defs{hm},$hm,"templateSet",$name,$tn,$p,@pv);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user