mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-12 20:06:33 +00:00
ZWaveJS: abort S2 bootstrapping when inclusion is canceled (#23106)
This commit is contained in:
parent
19f54b6ba2
commit
7c486ec969
@ -962,3 +962,12 @@ export const fetchZwaveIntegrationSettings = (
|
||||
hass.callWS({
|
||||
type: "zwave_js/get_integration_settings",
|
||||
});
|
||||
|
||||
export const cancelSecureBootstrapS2 = (
|
||||
hass: HomeAssistant,
|
||||
entry_id: string
|
||||
): Promise<void> =>
|
||||
hass.callWS({
|
||||
type: "zwave_js/cancel_secure_bootstrap_s2",
|
||||
entry_id,
|
||||
});
|
||||
|
@ -22,6 +22,7 @@ import type {
|
||||
RequestedGrant,
|
||||
} from "../../../../../data/zwave_js";
|
||||
import {
|
||||
cancelSecureBootstrapS2,
|
||||
InclusionStrategy,
|
||||
MINIMUM_QR_STRING_LENGTH,
|
||||
provisionZwaveSmartStartNode,
|
||||
@ -868,6 +869,16 @@ class DialogZWaveJSAddNode extends LitElement {
|
||||
}
|
||||
if (this._entryId) {
|
||||
stopZwaveInclusion(this.hass, this._entryId);
|
||||
if (
|
||||
this._status &&
|
||||
[
|
||||
"waiting_for_device",
|
||||
"validate_dsk_enter_pin",
|
||||
"grant_security_classes",
|
||||
].includes(this._status)
|
||||
) {
|
||||
cancelSecureBootstrapS2(this.hass, this._entryId);
|
||||
}
|
||||
if (this._params?.onStop) {
|
||||
this._params.onStop();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user