@@ -2215,6 +2215,81 @@ export const lumiModernExtend = {
2215
2215
2216
2216
return { exposes, fromZigbee, isModernExtend : true } ;
2217
2217
} ,
2218
+ fp1ePresence : ( ) => {
2219
+ const attribute = { ID : 0x0142 , type : 0x20 } ;
2220
+ return modernExtend . binary ( {
2221
+ name : 'presence' ,
2222
+ valueOn : [ true , 1 ] ,
2223
+ valueOff : [ false , 0 ] ,
2224
+ access : 'STATE_GET' ,
2225
+ cluster : 'manuSpecificLumi' ,
2226
+ attribute : attribute ,
2227
+ description : 'Indicates whether the device detected presence' ,
2228
+ } ) ;
2229
+ } ,
2230
+ fp1eMovement : ( ) =>
2231
+ modernExtend . enumLookup ( {
2232
+ name : 'movement' ,
2233
+ lookup : { unknown_0 : 0 , unknown_1 : 1 , no_presence : 2 , movement : 3 , no_movement : 4 } ,
2234
+ cluster : 'manuSpecificLumi' ,
2235
+ attribute : { ID : 0x0160 , type : 0x20 } ,
2236
+ zigbeeCommandOptions : { disableDefaultResponse : true } ,
2237
+ description : 'Is movement detected?' ,
2238
+ access : 'STATE_GET' ,
2239
+ } ) ,
2240
+ fp1eTargetDistance : ( ) =>
2241
+ modernExtend . numeric ( {
2242
+ name : 'target_distance' ,
2243
+ cluster : 'manuSpecificLumi' ,
2244
+ attribute : { ID : 0x015f , type : 0x23 } ,
2245
+ access : 'STATE_GET' ,
2246
+ description : 'Distance to the detected target' ,
2247
+ scale : 100 ,
2248
+ precision : 2 ,
2249
+ unit : 'm' ,
2250
+ } ) ,
2251
+ fp1eDetectionRange : ( ) =>
2252
+ modernExtend . numeric ( {
2253
+ name : 'detection_range' ,
2254
+ cluster : 'manuSpecificLumi' ,
2255
+ attribute : { ID : 0x015b , type : 0x23 } ,
2256
+ access : 'ALL' ,
2257
+ description : 'The device will monitor presence within the detection range' ,
2258
+ scale : 100 ,
2259
+ precision : 2 ,
2260
+ unit : 'm' ,
2261
+ valueMin : 0 ,
2262
+ valueMax : 6.0 ,
2263
+ valueStep : 0.3 ,
2264
+ } ) ,
2265
+ fp1eSpatialLearning : ( ) => {
2266
+ return {
2267
+ isModernExtend : true ,
2268
+ exposes : [ e . enum ( 'spatial_learning' , ea . SET , [ 'Start Learning' ] ) . withDescription ( 'Initiate AI Spatial Learning.' ) ] ,
2269
+ toZigbee : [
2270
+ {
2271
+ key : [ 'spatial_learning' ] ,
2272
+ convertSet : async ( entity , key , value , meta ) => {
2273
+ await entity . write ( 'manuSpecificLumi' , { 0x0157 : { value : 1 , type : 0x20 } } , manufacturerOptions . lumi ) ;
2274
+ } ,
2275
+ } ,
2276
+ ] ,
2277
+ } satisfies ModernExtend ;
2278
+ } ,
2279
+ fp1eRestartDevice : ( ) => {
2280
+ return {
2281
+ isModernExtend : true ,
2282
+ exposes : [ e . enum ( 'restart_device' , ea . SET , [ 'Restart Device' ] ) . withDescription ( 'Restarts the device.' ) ] ,
2283
+ toZigbee : [
2284
+ {
2285
+ key : [ 'restart_device' ] ,
2286
+ convertSet : async ( entity , key , value , meta ) => {
2287
+ await entity . write ( 'manuSpecificLumi' , { 0x00e8 : { value : 0x00 , type : 0x10 } } , manufacturerOptions . lumi ) ;
2288
+ } ,
2289
+ } ,
2290
+ ] ,
2291
+ } satisfies ModernExtend ;
2292
+ } ,
2218
2293
} ;
2219
2294
2220
2295
export { lumiModernExtend as modernExtend } ;
0 commit comments