From 052c39ab88f3c0bee399d0c315ddf3a73fbcb43a Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Thu, 27 Feb 2020 12:30:07 +0100 Subject: [PATCH] fix write outlet-valve_open code --- 74_GardenaSmartDevice.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/74_GardenaSmartDevice.pm b/74_GardenaSmartDevice.pm index 146f656..e234b3d 100644 --- a/74_GardenaSmartDevice.pm +++ b/74_GardenaSmartDevice.pm @@ -66,7 +66,7 @@ use warnings; use POSIX; use FHEM::Meta; use Time::Local; -our $VERSION = '1.6.5'; +our $VERSION = '1.6.6'; # try to use JSON::MaybeXS wrapper # for chance of better performance + open code @@ -629,7 +629,7 @@ sub WriteReadings($$) { readingsBulkUpdate( $hash, 'state', ( - ReadingsVal( $name, 'outlet-valve_open', 'readingsValError' ) == 1 + ReadingsVal( $name, 'outlet-valve_open', 0 ) == 1 ? RigRadingsValue( $hash, 'open' ) : RigRadingsValue( $hash, 'closed' ) )