74_XiaomiBTLESens: fix Illegal hexadecimal digit ' ' ignored

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@15936 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2018-01-20 09:39:18 +00:00
parent eb69f699d5
commit 60561e151e

View File

@ -677,7 +677,7 @@ sub XiaomiBTLESens_ThermoHygroSensHandle0x18($$) {
Log3 $name, 5, "XiaomiBTLESens ($name) - Thermo/Hygro Sens Handle0x18";
chomp($notification));
chomp($notification);
$readings{'batteryLevel'} = hex("0x".$notification);
$readings{'battery'} = (hex("0x".$notification) > 20?"ok":"low");