change state code
This commit is contained in:
parent
29ab9a53c7
commit
69d82a997e
@ -635,9 +635,10 @@ sub WriteReadings($$) {
|
|||||||
readingsBulkUpdate(
|
readingsBulkUpdate(
|
||||||
$hash, 'state',
|
$hash, 'state',
|
||||||
(
|
(
|
||||||
ReadingsVal( $name, 'outlet-valve_open', 0 ) == 1
|
ReadingsVal( $name, 'watering-watering_timer_1_state', 0 )
|
||||||
? RigRadingsValue( $hash, 'open' )
|
eq 'idle'
|
||||||
: RigRadingsValue( $hash, 'closed' )
|
? RigRadingsValue( $hash, 'closed' )
|
||||||
|
: RigRadingsValue( $hash, 'open' )
|
||||||
)
|
)
|
||||||
) if ( AttrVal( $name, 'model', 'unknown' ) eq 'watering_computer' );
|
) if ( AttrVal( $name, 'model', 'unknown' ) eq 'watering_computer' );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user