From fcf67f5b8c230278c18bcfd10ec32c6077e4abe0 Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Fri, 9 Oct 2015 00:42:28 +0000 Subject: [PATCH] =?UTF-8?q?contrib/55=5FGDS.2015:=20updated=20added=20more?= =?UTF-8?q?=20set=20clear=20=E2=80=A6=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.fhem.de/fhem/trunk@9409 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/55_GDS.2015/55_GDS.pm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fhem/contrib/55_GDS.2015/55_GDS.pm b/fhem/contrib/55_GDS.2015/55_GDS.pm index 0e4e064e7..1c90ac422 100644 --- a/fhem/contrib/55_GDS.2015/55_GDS.pm +++ b/fhem/contrib/55_GDS.2015/55_GDS.pm @@ -122,7 +122,7 @@ sub GDS_Shutdown($) { sub GDS_Set($@) { my ($hash, @a) = @_; my $name = $hash->{NAME}; - my $usage = "Unknown argument, choose one of clear:alerts,all help:noArg rereadcfg:noArg update:noArg ". + my $usage = "Unknown argument, choose one of clear:alerts,conditions,forecasts,all help:noArg rereadcfg:noArg update:noArg ". "conditions:".$sList." forecasts:".$fList." "; readingsSingleUpdate($hash, '_tzOffset', _calctz(time,localtime(time))*3600, 0); @@ -145,10 +145,14 @@ sub GDS_Set($@) { given($command) { when("clear"){ - CommandDeleteReading(undef, "$name a_.*"); - CommandDeleteReading(undef, "$name c_.*") if(defined($parameter) && $parameter eq "all"); - CommandDeleteReading(undef, "$name fc.?_.*") if(defined($parameter) && $parameter eq "all"); - CommandDeleteReading(undef, "$name g_.*") if(defined($parameter) && $parameter eq "all"); + CommandDeleteReading(undef, "$name a_.*") + if(defined($parameter) && ($parameter eq "all" || $parameter eq "alerts")); + CommandDeleteReading(undef, "$name c_.*") + if(defined($parameter) && ($parameter eq "all" || $parameter eq "conditions")); + CommandDeleteReading(undef, "$name g_.*") + if(defined($parameter) && ($parameter eq "all" || $parameter eq "conditions")); + CommandDeleteReading(undef, "$name fc.?_.*") + if(defined($parameter) && ($parameter eq "all" || $parameter eq "forecasts")); } when("help"){ @@ -2074,6 +2078,7 @@ sub GDSAsHtmlD($;$) { # 2015-10-09 changed removed createIndexFile(), no longer needed since 2015-01-30 # added forecast retrieval # added weblink generator +# added more "set clear ..." commands # done a lot of code cleanup # ####################################################################################################