fix write outlet-valve_open code

This commit is contained in:
Marko Oldenburg 2020-02-27 12:30:07 +01:00
parent a8f8a07837
commit 052c39ab88

View File

@ -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' )
)