Add icon option to common controls section strategy (#27180)
parent
52ccb03de5
commit
fbf7ebdfe4
|
@ -4,13 +4,14 @@ import { isComponentLoaded } from "../../../../common/config/is_component_loaded
|
|||
import type { LovelaceSectionConfig } from "../../../../data/lovelace/config/section";
|
||||
import { getCommonControlUsagePrediction } from "../../../../data/usage_prediction";
|
||||
import type { HomeAssistant } from "../../../../types";
|
||||
import type { TileCardConfig } from "../../cards/types";
|
||||
import type { HeadingCardConfig, TileCardConfig } from "../../cards/types";
|
||||
|
||||
const DEFAULT_LIMIT = 8;
|
||||
|
||||
export interface CommonControlSectionStrategyConfig {
|
||||
type: "common-controls";
|
||||
title?: string;
|
||||
icon?: string;
|
||||
limit?: number;
|
||||
exclude_entities?: string[];
|
||||
hide_empty?: boolean;
|
||||
|
@ -31,7 +32,8 @@ export class CommonControlsSectionStrategy extends ReactiveElement {
|
|||
section.cards?.push({
|
||||
type: "heading",
|
||||
heading: config.title,
|
||||
});
|
||||
icon: config.icon,
|
||||
} satisfies HeadingCardConfig);
|
||||
}
|
||||
|
||||
if (!isComponentLoaded(hass, "usage_prediction")) {
|
||||
|
|
Loading…
Reference in New Issue