@@ -2948,7 +2948,8 @@ export const fromZigbee = {
2948
2948
2949
2949
let position = precisionRound ( msg . data [ 'presentValue' ] , 2 ) ;
2950
2950
position = options . invert_cover ? 100 - position : position ;
2951
- return { position} ;
2951
+ const closed = options . invert_cover ? position === 100 : position === 0 ;
2952
+ return { position, state : closed ? 'CLOSE' : 'OPEN' } ;
2952
2953
} ,
2953
2954
} satisfies Fz . Converter ,
2954
2955
lumi_curtain_position_tilt : {
@@ -4783,7 +4784,7 @@ export const toZigbee = {
4783
4784
await entity . command ( 'closuresWindowCovering' , 'stop' , { } , getOptions ( meta . mapped , entity ) ) ;
4784
4785
}
4785
4786
4786
- if ( ! [ 'ZNCLDJ11LM' , 'ZNJLBL01LM' , ' ZNCLBL01LM'] . includes ( meta . mapped . model ) ) {
4787
+ if ( ! [ 'ZNCLDJ11LM' , 'ZNCLBL01LM' ] . includes ( meta . mapped . model ) ) {
4787
4788
// The code below is originally added for ZNCLDJ11LM (Koenkk/zigbee2mqtt#4585).
4788
4789
// However, in Koenkk/zigbee-herdsman-converters#4039 it was replaced by reading
4789
4790
// directly from currentPositionLiftPercentage, so that device is excluded.
@@ -4796,8 +4797,6 @@ export const toZigbee = {
4796
4797
// Lumi curtain does not send position update on stop, request this.
4797
4798
await entity . read ( 'genAnalogOutput' , [ 0x0055 ] ) ;
4798
4799
}
4799
-
4800
- return { state : { state : 'STOP' } } ;
4801
4800
} else {
4802
4801
const lookup = { open : 100 , close : 0 , on : 100 , off : 0 } ;
4803
4802
@@ -4819,6 +4818,8 @@ export const toZigbee = {
4819
4818
const payload = { presentValue : value } ;
4820
4819
await entity . write ( 'genAnalogOutput' , payload ) ;
4821
4820
}
4821
+
4822
+ return { state : { position : value } } ;
4822
4823
}
4823
4824
} ,
4824
4825
convertGet : async ( entity , key , meta ) => {
0 commit comments