@@ -1036,7 +1036,7 @@ class ZigbeeClassifier {
10361036 'occupied' , // name
10371037 {
10381038 // property description
1039- '@type' : 'BooleanProperty ' ,
1039+ '@type' : 'OccupiedProperty ' ,
10401040 type : 'boolean' ,
10411041 label : 'Occupied' ,
10421042 description : 'Occupancy Sensor' ,
@@ -1066,6 +1066,9 @@ class ZigbeeClassifier {
10661066 '' , // setAttrFromValue
10671067 'parseOccupancySensorTypeAttr' // parseValueFromAttr
10681068 ) ;
1069+ if ( ! node [ '@type' ] . includes ( 'OccupancySensor' ) ) {
1070+ node [ '@type' ] . push ( 'OccupancySensor' ) ;
1071+ }
10691072 }
10701073
10711074 addIlluminanceMeasurementProperty ( node , msMeasurementEndpoint ) {
@@ -2120,6 +2123,9 @@ ${(`0${d.getHours()}`).slice(-2)}:${(`0${d.getMinutes()}`).slice(-2)}:${(`0${d.g
21202123 if ( genPowerCfgEndpoint ) {
21212124 this . addPowerCfgVoltageProperty ( node , genPowerCfgEndpoint ) ;
21222125 }
2126+ if ( msOccupancySensingEndpoint ) {
2127+ this . addOccupancySensorProperty ( node , msOccupancySensingEndpoint ) ;
2128+ }
21232129
21242130 this . addLastSeenProperty ( node ) ;
21252131 }
@@ -2215,7 +2221,7 @@ ${(`0${d.getHours()}`).slice(-2)}:${(`0${d.getMinutes()}`).slice(-2)}:${(`0${d.g
22152221 }
22162222
22172223 initOccupancySensor ( node , msOccupancySensingEndpoint ) {
2218- node [ '@type' ] = [ 'BinarySensor ' ] ;
2224+ node [ '@type' ] = [ 'OccupancySensor ' ] ;
22192225 node . type = 'sensor' ;
22202226 node . name = `${ node . id } -occupancy` ;
22212227
0 commit comments