mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Ensure device info categories notify, event and assist always show (#21994)
Currently we have the entity category always win. However, we have some functional categories on a device, notify, event, assist. It would be good to always show these togehter.
This commit is contained in:
parent
717443e2d6
commit
2b33c70e04
@ -189,20 +189,20 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
const result = groupBy(entities, (entry) => {
|
const result = groupBy(entities, (entry) => {
|
||||||
const domain = computeDomain(entry.entity_id);
|
const domain = computeDomain(entry.entity_id);
|
||||||
|
|
||||||
if (entry.entity_category) {
|
if (ASSIST_ENTITIES.includes(domain)) {
|
||||||
return entry.entity_category;
|
return "assist";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domain === "event" || domain === "notify") {
|
if (domain === "event" || domain === "notify") {
|
||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SENSOR_ENTITIES.includes(domain)) {
|
if (entry.entity_category) {
|
||||||
return "sensor";
|
return entry.entity_category;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ASSIST_ENTITIES.includes(domain)) {
|
if (SENSOR_ENTITIES.includes(domain)) {
|
||||||
return "assist";
|
return "sensor";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "control";
|
return "control";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user