File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 5555 }
5656 },
5757 "short_name" : " Zigbee" ,
58- "version" : " 0.15.0 "
58+ "version" : " 0.15.1 "
5959}
Original file line number Diff line number Diff line change 11{
22 "name" : " zigbee-adapter" ,
3- "version" : " 0.15.0 " ,
3+ "version" : " 0.15.1 " ,
44 "description" : " Zigbee adapter plugin for WebThings Gateway" ,
55 "author" : " WebThingsIO" ,
66 "main" : " index.js" ,
Original file line number Diff line number Diff line change @@ -200,31 +200,44 @@ class ZigbeeNode extends Device {
200200 dict . activeEndpoints = cloneDeep ( this . activeEndpoints ) ;
201201 dict . isCoordinator = this . isCoordinator ;
202202 dict . rebindRequired = this . rebindRequired ;
203+
203204 for ( const field of DEVICE_INFO_FIELDS ) {
204205 if ( this . hasOwnProperty ( field ) ) {
205206 dict [ field ] = this [ field ] ;
206207 }
207208 }
209+
208210 for ( const endpointNum in dict . activeEndpoints ) {
209211 const endpoint = dict . activeEndpoints [ endpointNum ] ;
210212 let clusterId ;
211213 let idx ;
212214 let zclCluster ;
215+
213216 for ( idx in endpoint . inputClusters ) {
214217 clusterId = parseInt ( endpoint . inputClusters [ idx ] , 16 ) ;
215218 zclCluster = zclId . clusterId . get ( clusterId ) ;
219+
216220 if ( zclCluster ) {
217221 endpoint . inputClusters [ idx ] += ` - ${ zclCluster . key } ` ;
218222 }
219223 }
224+
220225 for ( idx in endpoint . outputClusters ) {
221226 clusterId = parseInt ( endpoint . outputClusters [ idx ] , 16 ) ;
222227 zclCluster = zclId . clusterId . get ( clusterId ) ;
228+
223229 if ( zclCluster ) {
224230 endpoint . outputClusters [ idx ] += ` - ${ zclCluster . key } ` ;
225231 }
226232 }
227233 }
234+
235+ for ( const prop of Object . values ( dict . properties ) ) {
236+ if ( ! prop . visible ) {
237+ delete dict . properties [ prop . name ] ;
238+ }
239+ }
240+
228241 return dict ;
229242 }
230243
You can’t perform that action at this time.
0 commit comments