Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion src/panels/lovelace/strategies/home/home-area-view-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,27 @@ export class HomeAreaViewStrategy extends ReactiveElement {

const summaryEntities = Object.values(entitiesBySummary).flat();

// Scenes section
const sceneFilter = generateEntityFilter(hass, {
domain: "scene",
entity_category: "none",
});
const scenes = areaEntities.filter(sceneFilter);

if (scenes.length > 0) {
sections.push({
type: "grid",
cards: [
computeHeadingCard(
hass.localize("ui.panel.lovelace.strategy.home.scenes"),
"mdi:palette",
"/config/scene/dashboard"
),
...scenes.map(computeTileCard),
],
});
}

// Automations section
const automationFilter = generateEntityFilter(hass, {
domain: "automation",
Expand All @@ -178,7 +199,9 @@ export class HomeAreaViewStrategy extends ReactiveElement {
// Rest of entities grouped by device
const otherEntities = areaEntities.filter(
(entityId) =>
!summaryEntities.includes(entityId) && !automations.includes(entityId)
!summaryEntities.includes(entityId) &&
!scenes.includes(entityId) &&
!automations.includes(entityId)
);

const entitiesByDevice: Record<string, string[]> = {};
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6943,6 +6943,7 @@
"other_areas": "Other areas",
"unamed_device": "Unnamed device",
"others": "Others",
"scenes": "Scenes",
"automations": "Automations"
},
"common_controls": {
Expand Down
Loading