2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-21 14:04:15 +00:00

98_powerMap: use cmp instead of <=>

git-svn-id: https://svn.fhem.de/fhem/trunk@13338 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-02-05 15:31:14 +00:00
parent 13bc9be219
commit 24722c3d0c

View File

@ -1398,7 +1398,7 @@ sub powerMap_power($$$;$) {
elsif ( looks_like_number($num) ) {
my ( $val1, $val2 );
foreach ( sort { $a <=> $b } keys( %{ $powerMap->{$reading} } ) ) {
foreach ( sort { $a cmp $b } keys( %{ $powerMap->{$reading} } ) ) {
next unless ( looks_like_number($_) );
$val1 = $_ if ( $_ < $num );
$val2 = $_ if ( $_ > $num );