From 9a1b52c772155a87d56e8781e0183d527c8dd6c7 Mon Sep 17 00:00:00 2001 From: MarkusF <> Date: Mon, 10 Dec 2018 17:44:26 +0000 Subject: [PATCH] 51_MOBILEALERTS.pm: Offlimit for decodeHumidityDecimal added git-svn-id: https://svn.fhem.de/fhem/trunk@17948 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/51_MOBILEALERTS.pm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index da8cb7782..d90f8ad9b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 51_MOBILEALERTS.pm: Offlimit for decodeHumidityDecimal added - change: 98_MSwitch.pm, update V2.07 - change: 20_FRM_IN: only update on change (Forum #81815) - bugfix: 73_AutoShuttersControl: fix absent Event and ModeDown absent bug diff --git a/fhem/FHEM/51_MOBILEALERTS.pm b/fhem/FHEM/51_MOBILEALERTS.pm index 0140bb7af..9219fb0da 100644 --- a/fhem/FHEM/51_MOBILEALERTS.pm +++ b/fhem/FHEM/51_MOBILEALERTS.pm @@ -1041,7 +1041,9 @@ sub MOBILEALERTS_decodeHumidity($) { sub MOBILEALERTS_decodeHumidityDecimal($) { my ($humidity) = @_; - return ( $humidity & 0x3FF ) * 0.1; + $humidity = $humidity & 0x3FF; + return 9999 if ( $humidity == 1023 ); + return $humidity * 0.1; } sub MOBILEALERTS_humidityToString($) {