fix write outlet-valve_open code
This commit is contained in:
parent
a8f8a07837
commit
052c39ab88
@ -66,7 +66,7 @@ use warnings;
|
|||||||
use POSIX;
|
use POSIX;
|
||||||
use FHEM::Meta;
|
use FHEM::Meta;
|
||||||
use Time::Local;
|
use Time::Local;
|
||||||
our $VERSION = '1.6.5';
|
our $VERSION = '1.6.6';
|
||||||
|
|
||||||
# try to use JSON::MaybeXS wrapper
|
# try to use JSON::MaybeXS wrapper
|
||||||
# for chance of better performance + open code
|
# for chance of better performance + open code
|
||||||
@ -629,7 +629,7 @@ sub WriteReadings($$) {
|
|||||||
readingsBulkUpdate(
|
readingsBulkUpdate(
|
||||||
$hash, 'state',
|
$hash, 'state',
|
||||||
(
|
(
|
||||||
ReadingsVal( $name, 'outlet-valve_open', 'readingsValError' ) == 1
|
ReadingsVal( $name, 'outlet-valve_open', 0 ) == 1
|
||||||
? RigRadingsValue( $hash, 'open' )
|
? RigRadingsValue( $hash, 'open' )
|
||||||
: RigRadingsValue( $hash, 'closed' )
|
: RigRadingsValue( $hash, 'closed' )
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user