From 1d2016299c857d56259547317a1261a856e5441d Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Sat, 21 May 2022 12:02:51 +0000 Subject: [PATCH] 10_RHASSPY: fix numeric handling for ZWave type blinds in SetNumeric git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@26075 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/RHASSPY/10_RHASSPY.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/RHASSPY/10_RHASSPY.pm b/contrib/RHASSPY/10_RHASSPY.pm index e32437a41..7918b2c00 100644 --- a/contrib/RHASSPY/10_RHASSPY.pm +++ b/contrib/RHASSPY/10_RHASSPY.pm @@ -4699,7 +4699,7 @@ sub handleIntentSetNumeric { return respond( $hash, $data, getResponse( $hash, 'NoMappingFound' ) ); } } - + # Mapping and device found -> execute command my $cmd = $mapping->{cmd} // return defined $data->{'.inBulk'} ? undef : respond( $hash, $data, getResponse( $hash, 'NoMappingFound' ) ); my $part = $mapping->{part}; @@ -4729,6 +4729,8 @@ sub handleIntentSetNumeric { my @tokens = split m{\s+}x, $oldVal; $oldVal = $tokens[$part] if @tokens >= $part; } + + $oldVal = $oldVal =~ m{(-?\d+(\.\d+)?)}x ? $1 : $oldVal; # Neuen Wert bestimmen my $newVal;