mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +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">
|
<div class="flex-column">
|
||||||
${this._requestedGrant?.securityClasses
|
${this._requestedGrant?.securityClasses
|
||||||
.sort()
|
.sort((a, b) => {
|
||||||
.reverse()
|
// 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(
|
.map(
|
||||||
(securityClass) =>
|
(securityClass) =>
|
||||||
html`<ha-formfield
|
html`<ha-formfield
|
||||||
|
Loading…
x
Reference in New Issue
Block a user