From c2d8a6ffc573bc5b21c349fe30ab1a81a60f5dbd Mon Sep 17 00:00:00 2001 From: risiko79 <> Date: Sat, 30 May 2015 17:23:36 +0000 Subject: [PATCH] 30_pilight_switch: fix noArg for on and off git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8664 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_pilight_ctrl.pm | 2 +- FHEM/30_pilight_switch.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/10_pilight_ctrl.pm b/FHEM/10_pilight_ctrl.pm index 4ada45bfc..fd8557da5 100644 --- a/FHEM/10_pilight_ctrl.pm +++ b/FHEM/10_pilight_ctrl.pm @@ -99,7 +99,7 @@ sub pilight_ctrl_Define($$) $hash->{DeviceName} = $dev; $hash->{STATE} = "defined"; $hash->{API} = "6.0"; - $hash->{API} = "5.0" if (defined($a[3])); + $hash->{API} = "5.0" if (defined($a[3]) && $a[3] =~/5/); $hash->{RETRY_INTERVAL} = 60; $hash->{helper}{CON} = "define"; diff --git a/FHEM/30_pilight_switch.pm b/FHEM/30_pilight_switch.pm index 0ce8d890f..aa75ed219 100644 --- a/FHEM/30_pilight_switch.pm +++ b/FHEM/30_pilight_switch.pm @@ -10,7 +10,7 @@ # V 0.10 2015-02-22 - initial beta version # V 0.11 2015-03-29 - FIX: $readingFnAttributes # V 0.12 2015-05-18 - FIX: add version information -# V 0.13 2015-05-30 - FIX: StateFn +# V 0.13 2015-05-30 - FIX: StateFn, noArg ############################################## package main; @@ -115,7 +115,7 @@ sub pilight_switch_Set($$) my $me = shift @a; return "no set value specified" if(int(@a) < 1); - return "Unknown argument ?, choose one of on off" if($a[0] eq "?"); + return "Unknown argument ?, choose one of on:noArg off:noArg" if($a[0] eq "?"); my $v = join(" ", @a); Log3 $me, 4, "$me(Set): $v";