Light Switch in horizontal stack

Hi,

I’m switching from OpenHAB to Home Assistant and I’m still in the learning mode.

I’m using an Axis A9188 relay card and added the Light Switch configuration below.

light:
  - platform: switch
    name: Christmas Tree Lights
    entity_id: switch.a9188_0_relay_1

With this I can add a Light card to Lovelace. But when I try to add a horizontal stack I get an error: Specify an entity from within the light domain.

My horizontal stack configuration looks like:

cards:
  - entity: switch.a9188_0_relay_1
    type: light
  - entity: switch.a9188_0_relay_2
    type: entity-button
  - entity: switch.a9188_0_relay_3
    type: entity-button
title: licht
type: horizontal-stack

Am I doing someting wrong or do I need to create a Template Light?

Sander

Use the entity you created with this configuration:

light:
  - platform: switch
    name: Christmas Tree Lights
    entity_id: switch.a9188_0_relay_1

for the entity in the horizontal stack configuration. It should be light.christmas_tree_lights, etc. The lovelace light card accepts only light.xxx entities.

Like this:

cards:
  - entity: light.christmas_tree_lights
    type: light
  - entity: light.xyz
    type: entity-button
  - entity: light.abc
    type: entity-button
title: licht
type: horizontal-stack
1 Like

Thanks, it works!