mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
fhem.pl: attribute value is mandatory, will not efault to 1 (Forum #112067)
git-svn-id: https://svn.fhem.de/fhem/trunk@22172 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
52873388d1
commit
c8a984b8b5
@ -2895,13 +2895,14 @@ CommandAttr($$)
|
||||
my $a1 = $a[1];
|
||||
return "$a[0]: bad attribute name '$a1' (allowed chars: A-Za-z/\\d_\\.-)"
|
||||
if($featurelevel > 5.9 && !goodReadingName($a1) && $a1 ne "?");
|
||||
return "attr $param: attribute value is missing" if($#a < 2);
|
||||
|
||||
my @rets;
|
||||
foreach my $sdev (devspec2array($a[0], $a1 && $a1 eq "?" ? undef : $cl)) {
|
||||
|
||||
my $hash = $defs{$sdev};
|
||||
my $attrName = $a1;
|
||||
my $attrVal = (defined($a[2]) ? $a[2] : 1);
|
||||
my $attrVal = $a[2];
|
||||
if(!defined($hash)) {
|
||||
push @rets, "Please define $sdev first" if($init_done);#define -ignoreErr
|
||||
next;
|
||||
|
Loading…
x
Reference in New Issue
Block a user