mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
cmd line parsing fix
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
462c6f4578
commit
015936c539
@ -48,18 +48,14 @@ readingsProxy_updateDevices($)
|
|||||||
|
|
||||||
my %list;
|
my %list;
|
||||||
|
|
||||||
|
delete $hash->{DEVICE};
|
||||||
|
delete $hash->{READING};
|
||||||
|
|
||||||
my @params = split(" ", $hash->{DEF});
|
my @params = split(" ", $hash->{DEF});
|
||||||
while (@params) {
|
if( defined($defs{$params[0]}) ) {
|
||||||
my $param = shift(@params);
|
$list{$params[0]} = 1;
|
||||||
|
$hash->{DEVICE} = $params[0];
|
||||||
my @device = split(":", $param);
|
$hash->{READING} = $params[1];
|
||||||
|
|
||||||
if( defined($defs{$device[0]})
|
|
||||||
&& defined($defs{$device[0]}) ) {
|
|
||||||
$list{$device[0]} = 1;
|
|
||||||
$hash->{DEVICE} = $device[0];
|
|
||||||
$hash->{READING} = $device[1];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash->{CONTENT} = \%list;
|
$hash->{CONTENT} = \%list;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user