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:
Paulus Schoutsen 2024-09-17 03:37:45 -04:00 committed by GitHub
parent 717443e2d6
commit 2b33c70e04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,20 +189,20 @@ export class HaConfigDevicePage extends LitElement {
const result = groupBy(entities, (entry) => {
const domain = computeDomain(entry.entity_id);
if (entry.entity_category) {
return entry.entity_category;
if (ASSIST_ENTITIES.includes(domain)) {
return "assist";
}
if (domain === "event" || domain === "notify") {
return domain;
}
if (SENSOR_ENTITIES.includes(domain)) {
return "sensor";
if (entry.entity_category) {
return entry.entity_category;
}
if (ASSIST_ENTITIES.includes(domain)) {
return "assist";
if (SENSOR_ENTITIES.includes(domain)) {
return "sensor";
}
return "control";