From 015936c5398cc3bc9a090d705cf2f0adba3172d1 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Wed, 23 Apr 2014 10:13:24 +0000 Subject: [PATCH] cmd line parsing fix git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5605 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/33_readingsProxy.pm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/FHEM/33_readingsProxy.pm b/FHEM/33_readingsProxy.pm index 38052b569..cd215df79 100644 --- a/FHEM/33_readingsProxy.pm +++ b/FHEM/33_readingsProxy.pm @@ -48,18 +48,14 @@ readingsProxy_updateDevices($) my %list; + delete $hash->{DEVICE}; + delete $hash->{READING}; + my @params = split(" ", $hash->{DEF}); - while (@params) { - my $param = shift(@params); - - my @device = split(":", $param); - - if( defined($defs{$device[0]}) - && defined($defs{$device[0]}) ) { - $list{$device[0]} = 1; - $hash->{DEVICE} = $device[0]; - $hash->{READING} = $device[1]; - } + if( defined($defs{$params[0]}) ) { + $list{$params[0]} = 1; + $hash->{DEVICE} = $params[0]; + $hash->{READING} = $params[1]; } $hash->{CONTENT} = \%list;