mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Z-Wave JS: Sort security classes from highest to lowest (#20851)
This commit is contained in:
parent
9fe8f507ec
commit
0b6994d402
@ -237,8 +237,12 @@ class DialogZWaveJSAddNode extends LitElement {
|
||||
: ""}
|
||||
<div class="flex-column">
|
||||
${this._requestedGrant?.securityClasses
|
||||
.sort()
|
||||
.reverse()
|
||||
.sort((a, b) => {
|
||||
// Put highest security classes at the top, S0 at the bottom
|
||||
if (a === SecurityClass.S0_Legacy) return 1;
|
||||
if (b === SecurityClass.S0_Legacy) return -1;
|
||||
return b - a;
|
||||
})
|
||||
.map(
|
||||
(securityClass) =>
|
||||
html`<ha-formfield
|
||||
|
Loading…
x
Reference in New Issue
Block a user