2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 19:32:42 +00:00

74_XiaomiBTLESens: fix Illegal hexadecimal digit ' ' ignored

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

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");