mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-18 05:56:03 +00:00
MYSENSORS_DEVICE: fix attr setCommands
git-svn-id: https://svn.fhem.de/fhem/trunk@6807 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
227be01e02
commit
9c3e655aee
@ -256,14 +256,17 @@ sub Attr($$$$) {
|
||||
delete $hash->{sets}->{$set};
|
||||
}
|
||||
$hash->{setcommands} = {};
|
||||
if ($command eq "set" and defined $value) {
|
||||
if ($command eq "set" and $value) {
|
||||
foreach my $setCmd (split ("[, \t]+",$value)) {
|
||||
$setCmd =~ /^(.+):(.+_\d+):(.+)$/;
|
||||
$hash->{sets}->{$1}="";
|
||||
$hash->{setcommands}->{$1} = {
|
||||
var => $2,
|
||||
val => $3,
|
||||
};
|
||||
if ($setCmd =~ /^(.+):(.+):(.+)$/) {
|
||||
$hash->{sets}->{$1}="";
|
||||
$hash->{setcommands}->{$1} = {
|
||||
var => $2,
|
||||
val => $3,
|
||||
};
|
||||
} else {
|
||||
return "unparsable value in setCommands for $name: $setCmd";
|
||||
}
|
||||
}
|
||||
}
|
||||
last;
|
||||
|
Loading…
x
Reference in New Issue
Block a user