mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 22:07:20 +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))}
|
||||
></ha-svg-icon>
|
||||
<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-icon-item>
|
||||
`;
|
||||
|
@ -121,7 +121,13 @@ export class HaConfigDevicePage extends LitElement {
|
||||
const result = groupBy(entities, (entry) =>
|
||||
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"
|
||||
: "control"
|
||||
) as Record<
|
||||
|
Loading…
x
Reference in New Issue
Block a user