24_TPLinkHS110: Check for invalid commands

git-svn-id: https://svn.fhem.de/fhem/trunk@13294 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
vk
2017-01-31 13:54:42 +00:00
parent 76fc85141d
commit 7601ffee3b

View File

@@ -195,7 +195,7 @@ sub TPLinkHS110_Set($$)
my ( $hash, @a ) = @_;
my $name= $hash->{NAME};
return "Device disabled in config" if ($attr{$name}{"disable"} eq "1");
return "Unknown argument $a[1], choose one of on off " if($a[1] eq "?");
return "Unknown argument $a[1], choose one of on off " if($a[1] ne "on" || $a[1] ne "off");
Log3 $hash, 3, "TPLinkHS110: $name Set <". $a[1] ."> called";
my $command;