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
This commit is contained in:
risiko79 2015-05-30 17:23:36 +00:00
parent 6159520374
commit c2d8a6ffc5
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ sub pilight_ctrl_Define($$)
$hash->{DeviceName} = $dev; $hash->{DeviceName} = $dev;
$hash->{STATE} = "defined"; $hash->{STATE} = "defined";
$hash->{API} = "6.0"; $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->{RETRY_INTERVAL} = 60;
$hash->{helper}{CON} = "define"; $hash->{helper}{CON} = "define";

View File

@ -10,7 +10,7 @@
# V 0.10 2015-02-22 - initial beta version # V 0.10 2015-02-22 - initial beta version
# V 0.11 2015-03-29 - FIX: $readingFnAttributes # V 0.11 2015-03-29 - FIX: $readingFnAttributes
# V 0.12 2015-05-18 - FIX: add version information # 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; package main;
@ -115,7 +115,7 @@ sub pilight_switch_Set($$)
my $me = shift @a; my $me = shift @a;
return "no set value specified" if(int(@a) < 1); 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); my $v = join(" ", @a);
Log3 $me, 4, "$me(Set): $v"; Log3 $me, 4, "$me(Set): $v";