use preferred of dataset if available

This commit is contained in:
Bram Kragten 2024-05-07 15:25:44 +02:00
parent b23dea1b48
commit 9aee3db303
1 changed files with 4 additions and 1 deletions

View File

@ -72,8 +72,11 @@ class DialogThreadDataset extends LitElement implements HassDialog {
type: "thread/store_in_platform_keychain",
payload: {
mac_extended_address:
this._params?.network.dataset?.preferred_extended_address ||
this._params!.network.routers![0]!.extended_address,
border_agent_id: this._params!.network.routers![0]!.border_agent_id,
border_agent_id:
this._params?.network.dataset?.preferred_border_agent_id ||
this._params!.network.routers![0]!.border_agent_id,
active_operational_dataset: this._params!.otbrInfo!.active_dataset_tlvs,
},
});