Gh61/lovelace-hue-like-light-card

Allow 'entities' list to be used for exclusion

finder39 opened this issue · 2 comments

I like having all my scenes from Hue show up automatically with this card, but since I also use the "Natural light" scene built into hue, I don't want each of the 5 created "scenes" to show up. I think it would be great if there was a property that flipped to allow the entities list to be used for exclusions for auto-entities along with being able to used as a list for which entities to include

Gh61 commented

I see multiple different things in your question, so let's split it a little. Actually, it would help, if you post your current yaml configuration.

  1. you like the automatic load of the scenes, but you want to exclude some scenes
    • Preferred solution for this is to configure the scenes: option manually, as you can also change the color, title or icon of every scene and fine-tune it to your liking
    • I can create some excluding filter for the automatic scenes, but it will only lead to more people trying to create some settings to automatically generate scenes, order differently, set colors, etc. thus creating extensive options only to customize the 'generator' when the best option really is to configure it manually
  2. you are using auto-entities in some way (probably to generate the card from lights in some area?)
    • I think, you can set auto-entities to generate the scenes option for you (when you change card_param) and use their filtering and ordering capabilities to your liking
    • I don't know, if it's possible to use nested auto-entities (one for lights and the inner one for scenes), so maybe you will be left with the choice if you want to set the entities or scenes manually (at least until the #113 isn't released - then you could use the area for lights and auto-entities for scenes)
  1. The reason I don't want to add them manually is I like then when I create a new one in the Hue app it is automatically added in my dashboard without having to go and edit the YAML.
  2. I'm not doing any auto-entities generation as I don't have my lights list produced. I basically manually state which "rooms/zones" I want to show and let the card do the rest of the work.

Here is my current YAML and what it produces:

image
type: custom:tabbed-card
tabs:
  # two tabs here removed for brevity
  - attributes:
      label: "Scenes"
      icon: "hue:bridge-v2"
    card:
      type: vertical-stack
      cards:
        - !include 'lights-scenes.yaml'
        - type: entities
          entities:
          - type: custom:hue-like-light-card
            entity: light.bedroom_and_connected
            offClickAction: hue-screen
          - type: custom:hue-like-light-card
            entity: light.upstairs
            offClickAction: hue-screen
          - type: custom:hue-like-light-card
            entity: light.downstairs
            offClickAction: hue-screen
          - type: custom:hue-like-light-card
            entity: light.outside_front_and_atrium
            offClickAction: hue-screen

And when I tap into one it looks like the following:

image