2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

74_XiaomiBTLESens: fix Illegal hexadecimal digit ' ' ignored

git-svn-id: https://svn.fhem.de/fhem/trunk@15935 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2018-01-20 09:33:25 +00:00
parent 407fc2ff71
commit f8fd9d0e6a
2 changed files with 4 additions and 1 deletions

View File

@ -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: 74_XiaomiBTLESens: fix Illegal hexadecimal digit ' ' ignored
- change: 74_XiaomiBTLESens: better timer logic
- feature: 20_FRM_AD: analog resolution now depending on device capability
- change: 93_DbLog: V3.6.5, avoid shutdown problem if database is too slow,

View File

@ -47,7 +47,7 @@ use JSON;
use Blocking;
my $version = "2.0.4";
my $version = "2.0.5";
@ -676,6 +676,8 @@ sub XiaomiBTLESens_ThermoHygroSensHandle0x18($$) {
Log3 $name, 5, "XiaomiBTLESens ($name) - Thermo/Hygro Sens Handle0x18";
chomp($notification));
$readings{'batteryLevel'} = hex("0x".$notification);
$readings{'battery'} = (hex("0x".$notification) > 20?"ok":"low");