10_MYSENSORS_DEVICE.pm: bugfix, Forum #95626

git-svn-id: https://svn.fhem.de/fhem/trunk@18205 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User
2019-01-10 17:04:28 +00:00
parent fb1a2b7b53
commit 83a2cac3d1

View File

@@ -244,7 +244,7 @@ sub Set($@) {
my ($hash,$name,$command,@values) = @_;
return "Need at least one parameters" unless defined $command;
if(!defined($hash->{sets}->{$command})) {
$hash->{sets}->{fwType} = join(",", getFirmwareTypes($hash->{IODev}));
$hash->{sets}->{fwType} = join(",", MYSENSORS::getFirmwareTypes($hash->{IODev}));
my $list = join(" ", map {$hash->{sets}->{$_} ne "" ? "$_:$hash->{sets}->{$_}" : $_} sort keys %{$hash->{sets}});
$hash->{sets}->{fwType} = "";
return grep (/(^on$)|(^off$)/,keys %{$hash->{sets}}) == 2 ? SetExtensions($hash, $list, $name, $command, @values) : "Unknown argument $command, choose one of $list";