2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

fhem.pl: accept attr without specifier for delFromDevAttrList (Forum #101717)

git-svn-id: https://svn.fhem.de/fhem/trunk@19704 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-06-24 19:01:42 +00:00
parent eb80b18e7b
commit 8754bc7e93

View File

@ -4144,8 +4144,8 @@ delFromDevAttrList($$)
my $ua = $attr{$dev}{userattr};
$ua = "" if(!$ua);
my %hash = map { ($_ => 1) }
grep { " $arg " !~ m/ $_ / }
split(" ", "$ua $arg");
grep { $_ !~ m/^$arg(:.+)?$/ }
split(" ", $ua);
$attr{$dev}{userattr} = join(" ", sort keys %hash);
delete $attr{$dev}{userattr}
if(!keys %hash && defined($attr{$dev}{userattr}));