mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 05:16:34 +00:00
Add more domains to sensor group, strip device name from disabled entities (#10490)
This commit is contained in:
parent
5851fe26ff
commit
3cf9b745b5
@ -152,7 +152,14 @@ export class HaDeviceEntitiesCard extends LitElement {
|
|||||||
.path=${domainIcon(computeDomain(entry.entity_id))}
|
.path=${domainIcon(computeDomain(entry.entity_id))}
|
||||||
></ha-svg-icon>
|
></ha-svg-icon>
|
||||||
<paper-item-body>
|
<paper-item-body>
|
||||||
<div class="name">${entry.stateName || entry.entity_id}</div>
|
<div class="name">
|
||||||
|
${entry.stateName
|
||||||
|
? stripPrefixFromEntityName(
|
||||||
|
entry.stateName,
|
||||||
|
`${this.deviceName} `.toLowerCase()
|
||||||
|
)
|
||||||
|
: entry.entity_id}
|
||||||
|
</div>
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
`;
|
`;
|
||||||
|
@ -121,7 +121,13 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
const result = groupBy(entities, (entry) =>
|
const result = groupBy(entities, (entry) =>
|
||||||
entry.entity_category
|
entry.entity_category
|
||||||
? entry.entity_category
|
? entry.entity_category
|
||||||
: ["sensor", "binary_sensor"].includes(computeDomain(entry.entity_id))
|
: [
|
||||||
|
"sensor",
|
||||||
|
"binary_sensor",
|
||||||
|
"camera",
|
||||||
|
"device_tracker",
|
||||||
|
"weather",
|
||||||
|
].includes(computeDomain(entry.entity_id))
|
||||||
? "sensor"
|
? "sensor"
|
||||||
: "control"
|
: "control"
|
||||||
) as Record<
|
) as Record<
|
||||||
|
Loading…
x
Reference in New Issue
Block a user