Skip to content

Commit

Permalink
fix removed devices
Browse files Browse the repository at this point in the history
  • Loading branch information
dvb6666 committed Feb 25, 2024
1 parent 073223e commit 7ceb42c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/HOMEdZigbeeNetworkmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export default {
this.init_failed = true
return
}
this.nodes = this.merge(this.nodes, attr.devices, d => d.id, d => d.networkAddress, d => {
this.nodes = this.merge(this.nodes, attr.devices.filter(e => e.removed !== true), d => d.id, d => d.networkAddress, d => {
return {
id: d.networkAddress,
name: d.logicalType === 0 ? ' ' : d.name,
Expand Down
7 changes: 6 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ customElements.whenDefined('homed-zigbee-networkmap').then(() => {
logicalType: 2,
name: 'Kitchen Smoke Sensor',
networkAddress: 63355
}, {
name: 'Lamp',
networkAddress: 2797,
removed: true
}, {
logicalType: 2,
name: 'Balcony Temperature Sensor',
networkAddress: 30564
networkAddress: 30564,
removed: false
}, {
logicalType: 2,
name: 'Childroom Temperature Sensor',
Expand Down

0 comments on commit 7ceb42c

Please sign in to comment.