From 13c1f54836c139059dd25af9e3bd9cbe35050020 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Mon, 15 May 2017 12:20:23 +0000 Subject: [PATCH] 74_NUKIDevice: fix success Reading num git-svn-id: https://svn.fhem.de/fhem/trunk@14292 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/74_NUKIDevice.pm | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index cde0ea1fa..d3a4a3cd1 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -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 success Reading num - bugfix: 42_SYSMON: wlan speed, memory usage detection - update: 57_Calender: optimization for speed - bugfix: 36_Vallox: Changed way multireadings are updated. diff --git a/fhem/FHEM/74_NUKIDevice.pm b/fhem/FHEM/74_NUKIDevice.pm index 419f2b46a..6f6cb3f3d 100644 --- a/fhem/FHEM/74_NUKIDevice.pm +++ b/fhem/FHEM/74_NUKIDevice.pm @@ -33,7 +33,7 @@ use warnings; use JSON; -my $version = "0.6.0"; +my $version = "0.6.1"; @@ -456,13 +456,13 @@ sub NUKIDevice_WriteReadings($$) { my ($state,$lockState); - if( defined($decode_json->{success}) and $decode_json->{success} eq "true" ) { + if( defined($decode_json->{success}) and ($decode_json->{success} eq "true" or $decode_json->{success} eq "1") ) { $state = $hash->{helper}{lockAction}; $lockState = $hash->{helper}{lockAction}; NUKIDevice_ReadFromNUKIBridge($hash, "lockState", undef, $hash->{NUKIID} ) if( ReadingsVal($hash->{IODev}->{NAME},'bridgeType','Software') eq 'Software' ); - } elsif ( defined($decode_json->{success}) and $decode_json->{success} eq "false" ) { + } elsif ( defined($decode_json->{success}) and ($decode_json->{success} eq "false" or $decode_json->{success} eq "0") ) { $state = "error"; NUKIDevice_ReadFromNUKIBridge($hash, "lockState", undef, $hash->{NUKIID} );