2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

10_ZWave.pm: show numeric values for config text (Forum #45899)

git-svn-id: https://svn.fhem.de/fhem/trunk@10221 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-12-21 13:33:33 +00:00
parent 68fc2cd687
commit 0bdb591435

View File

@ -1524,7 +1524,7 @@ ZWave_configParseModel($;$)
my ($cmd,$shortened) = ZWave_cleanString($h{label}, $h{index});
$cmdName = "config$cmd";
$h{Help} = "";
$h{Help} .= "Full text for $cmdName is $h{label}<br>" if($shortened);
$h{Help} .= "Full text for $cmdName is: $h{label}<br>" if($shortened);
$hash{$cmdName} = \%h;
}
@ -3046,7 +3046,14 @@ ZWave_helpFn($$)
return "" if(!$mc);
my $h = $mc->{config}{$cmd};
return "" if(!$h || !$h->{Help});
return "Help for $cmd:<br>".$h->{Help};
$cmd .= " (numeric code $h->{index})" if(defined($h->{index}));
my $ret = "Help for $cmd:<br>".$h->{Help};
my $hi = $h->{Item};
$ret .= "Possible values: ".
join(", ", map {"$_ ($hi->{$_})"} sort keys %{$hi})."<br>"
if($hi);
return $ret;
}
sub