mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-18 05:56:03 +00:00
74_NUKIDevice: Fix Problem with battery Reading
git-svn-id: https://svn.fhem.de/fhem/trunk@12856 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e064c4064e
commit
c1a30645c1
@ -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_NUKIDevice: Fix Problem with battery Reading
|
||||
- update: 97_TrashCal.pm: fetches shared dates at an public webpage
|
||||
of waste disposal
|
||||
- bugfix: 73_GasCalculator: Corrected month of annual reading
|
||||
|
@ -33,7 +33,7 @@ use warnings;
|
||||
use JSON;
|
||||
#use Time::HiRes qw(gettimeofday);
|
||||
|
||||
my $version = "0.4.0";
|
||||
my $version = "0.4.1";
|
||||
|
||||
|
||||
|
||||
@ -402,9 +402,9 @@ sub NUKIDevice_WriteReadings($$) {
|
||||
|
||||
my $battery;
|
||||
if( defined($decode_json->{batteryCritical}) ) {
|
||||
if( $decode_json->{batteryCritical} eq "false" ) {
|
||||
if( $decode_json->{batteryCritical} eq "false" or $decode_json->{batteryCritical} == 0 ) {
|
||||
$battery = "ok";
|
||||
} elsif ( $decode_json->{batteryCritical} eq "true" ) {
|
||||
} elsif ( $decode_json->{batteryCritical} eq "true" or $decode_json->{batteryCritical} == 1 ) {
|
||||
$battery = "low";
|
||||
} else {
|
||||
$battery = "parseError";
|
||||
|
Loading…
x
Reference in New Issue
Block a user