diff --git a/.devcontainer/ui-lovelace.yaml b/.devcontainer/ui-lovelace.yaml index 39ec64a..40c61d5 100644 --- a/.devcontainer/ui-lovelace.yaml +++ b/.devcontainer/ui-lovelace.yaml @@ -5,13 +5,13 @@ resources: type: module decluttering_templates: - my_first_template: # This is the name of a template + my_first_template: # This is the name of a template default: - icon: fire card: - type: custom:button-card - name: '[[name]]' - icon: 'mdi:[[icon]]' + type: button + name: "[[name]]" + icon: "mdi:[[icon]]" large_divider: default: - opacity: 0.25 @@ -21,12 +21,14 @@ decluttering_templates: background-color: var(--secondary-text-color) height: 1px margin: 15px auto - opacity: '[[opacity]]' + opacity: "[[opacity]]" views: - cards: - type: custom:decluttering-card template: my_first_template + variables: + - name: This is a test - type: entities entities: - sun.sun diff --git a/src/decluttering-card.ts b/src/decluttering-card.ts index b9f893a..67c143d 100644 --- a/src/decluttering-card.ts +++ b/src/decluttering-card.ts @@ -60,7 +60,8 @@ class DeclutteringCard extends LitElement { private async _createCard(config: LovelaceCardConfig): Promise { let element: LovelaceCard; if (HELPERS) { - element = (await HELPERS).createCardElement(config); + if (config.type === 'divider') element = (await HELPERS).createRowElement(config); + else element = (await HELPERS).createCardElement(config); // fireEvent(element, 'll-rebuild'); } else { element = createThing(config);