fix Illegal hexadecimal digit ' ' ignored
This commit is contained in:
parent
04d0bee2f7
commit
989607fb1a
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user