mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Properly sort config entities (#353)
This commit is contained in:
parent
6c45c5554a
commit
4c14e51079
@ -8,6 +8,7 @@
|
||||
<link rel='import' href='../../../bower_components/paper-item/paper-item.html'>
|
||||
|
||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||
<link rel="import" href="../../../src/util/hass-util.html">
|
||||
|
||||
<link rel="import" href="../ha-config-section.html">
|
||||
<link rel="import" href="../ha-entity-config.html">
|
||||
@ -71,15 +72,7 @@ Polymer({
|
||||
return (window.hassUtil.computeDomain(entity) === 'group' &&
|
||||
!entity.attributes.auto);
|
||||
})
|
||||
.sort(function (entityA, entityB) {
|
||||
if (entityA.entity_id < entityB.entity_id) {
|
||||
return -1;
|
||||
}
|
||||
if (entityA.entity_id > entityB.entity_id) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
.sort(window.hassUtil.sortByName);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<link rel='import' href='../../../bower_components/paper-item/paper-item.html'>
|
||||
|
||||
<link rel="import" href="../../../src/resources/ha-style.html">
|
||||
<link rel="import" href="../../../src/util/hass-util.html">
|
||||
|
||||
<link rel="import" href="../ha-config-section.html">
|
||||
<link rel="import" href="../ha-entity-config.html">
|
||||
@ -68,15 +69,7 @@ Polymer({
|
||||
return (!ent.attributes.hidden &&
|
||||
'node_id' in ent.attributes);
|
||||
})
|
||||
.sort(function (entityA, entityB) {
|
||||
if (entityA.entity_id < entityB.entity_id) {
|
||||
return -1;
|
||||
}
|
||||
if (entityA.entity_id > entityB.entity_id) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
.sort(window.hassUtil.sortByName);
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user