Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid removing zwave_js devices for non-ready nodes (#59964)
* Only replace a node if the mfgr id / prod id / prod type differ * Prefer original device name for unready node * move register_node_in_dev_reg into async_setup_entry * simplify get_device_id_ext * Don't need hex ids * Revert "move register_node_in_dev_reg into async_setup_entry" This reverts commit f900e5f. * Revert Callable change * Revert device backup name * Add test fixtures * Update existing not ready test with new fixture data * Check device properties after node added event * Add entity check * Check for extended device id * better device info checks * Use receive_event to properly setup components * Cleanup tests * improve test_replace_different_node * improve test_replace_same_node * add test test_node_model_change * Clean up long comments and strings * Format * Reload integration to detect node device config changes * update assertions * Disable entities on "value removed" event * Disable node status sensor on node replacement * Add test for disabling entities on remove value event * Add test for disabling node status sensor on node replacement * disable entity -> remove entity Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
- Loading branch information
1 parent
38723b2
commit 22e4757
Showing
8 changed files
with
1,472 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
tests/components/zwave_js/fixtures/zp3111-5_not_ready_state.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"nodeId": 22, | ||
"index": 0, | ||
"status": 1, | ||
"ready": false, | ||
"isListening": false, | ||
"isRouting": true, | ||
"isSecure": "unknown", | ||
"interviewAttempts": 1, | ||
"endpoints": [ | ||
{ | ||
"nodeId": 22, | ||
"index": 0, | ||
"deviceClass": { | ||
"basic": { | ||
"key": 4, | ||
"label": "Routing Slave" | ||
}, | ||
"generic": { | ||
"key": 7, | ||
"label": "Notification Sensor" | ||
}, | ||
"specific": { | ||
"key": 1, | ||
"label": "Notification Sensor" | ||
}, | ||
"mandatorySupportedCCs": [], | ||
"mandatoryControlledCCs": [] | ||
} | ||
} | ||
], | ||
"values": [], | ||
"isFrequentListening": false, | ||
"maxDataRate": 100000, | ||
"supportedDataRates": [ | ||
40000, | ||
100000 | ||
], | ||
"protocolVersion": 3, | ||
"supportsBeaming": true, | ||
"supportsSecurity": false, | ||
"nodeType": 1, | ||
"deviceClass": { | ||
"basic": { | ||
"key": 4, | ||
"label": "Routing Slave" | ||
}, | ||
"generic": { | ||
"key": 7, | ||
"label": "Notification Sensor" | ||
}, | ||
"specific": { | ||
"key": 1, | ||
"label": "Notification Sensor" | ||
}, | ||
"mandatorySupportedCCs": [], | ||
"mandatoryControlledCCs": [] | ||
}, | ||
"commandClasses": [], | ||
"interviewStage": "ProtocolInfo", | ||
"statistics": { | ||
"commandsTX": 0, | ||
"commandsRX": 0, | ||
"commandsDroppedRX": 0, | ||
"commandsDroppedTX": 0, | ||
"timeoutResponse": 0 | ||
} | ||
} |
Oops, something went wrong.