mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fix command selection for OTBRs without dataset (#22318)
Typically, the Home Assistant OTBR integration makes sure that we either setup or read the current dataset. However, in some cases, e.g. when reinstalling the add-on, deleting the dataset, and starting the add-on while keeping the OTBR config entry, the dataset is not available and a new one is not being created (since the config entry is not recreated). Just support this particular case as well. Fixes: #22306
This commit is contained in:
parent
a8bbd8ab90
commit
92165d776a
@ -482,7 +482,9 @@ export class ThreadConfigPanel extends SubscribeMixin(LitElement) {
|
||||
const network = (ev.currentTarget as any).network as ThreadNetwork;
|
||||
const router = (ev.currentTarget as any).router as ThreadRouter;
|
||||
const otbr = (ev.currentTarget as any).otbr as OTBRInfo;
|
||||
const index = Number(ev.detail.index);
|
||||
const index = network.dataset
|
||||
? Number(ev.detail.index)
|
||||
: Number(ev.detail.index) + 1;
|
||||
switch (index) {
|
||||
case 0:
|
||||
this._setPreferredBorderAgent(network.dataset!, router);
|
||||
|
Loading…
x
Reference in New Issue
Block a user