fix sensor read without firmware reading
This commit is contained in:
parent
fda06bb425
commit
2cc1cef656
@ -47,7 +47,7 @@ use JSON;
|
|||||||
use Blocking;
|
use Blocking;
|
||||||
|
|
||||||
|
|
||||||
my $version = "1.99.16";
|
my $version = "1.99.21";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ sub XiaomiBTLESens_stateRequest($) {
|
|||||||
readingsSingleUpdate($hash,"state","set attribute model first",1);
|
readingsSingleUpdate($hash,"state","set attribute model first",1);
|
||||||
|
|
||||||
} elsif( !IsDisabled($name) ) {
|
} elsif( !IsDisabled($name) ) {
|
||||||
if( ReadingsVal($name,'firmware','none') ne 'none') {
|
if( ReadingsVal($name,'firmware','none') ne 'none' or AttrVal($name,'model','none') eq 'thermoHygroSens') {
|
||||||
|
|
||||||
return XiaomiBTLESens_CallBatteryFirmware($hash)
|
return XiaomiBTLESens_CallBatteryFirmware($hash)
|
||||||
if( XiaomiBTLESens_CallBatteryFirmware_IsUpdateTimeAgeToOld($hash,$CallBatteryFirmwareAge{AttrVal($name,'BatteryFirmwareAge','24h')}) );
|
if( XiaomiBTLESens_CallBatteryFirmware_IsUpdateTimeAgeToOld($hash,$CallBatteryFirmwareAge{AttrVal($name,'BatteryFirmwareAge','24h')}) );
|
||||||
|
Loading…
Reference in New Issue
Block a user