Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hue Scenes in the Lights Section not showing #22

Open
MarineroCro opened this issue Sep 29, 2023 · 2 comments
Open

Hue Scenes in the Lights Section not showing #22

MarineroCro opened this issue Sep 29, 2023 · 2 comments

Comments

@MarineroCro
Copy link

Hi Madelena,

First of all just want to praise your unbelivably great work! I'm also kind of perfectionist and no dashboard could scratch the itch until I saw yours and decided I absolutly have to have it, thank you for all your efforts and sharing!

Quite new with the Home Assistant and YAML but learning fast. Managed to adjust all other things in the lights section but I am having a problem with the Hue Scenes not showing when clicking on the Scenes button...

image

This is how my scenes.yaml looks like...

- type: custom:popup-card
  entity: popup.living_room_scenes
  title: Living Room Scenes
  card:
    type: "custom:auto-entities"
    filter:
      template: |
        {% for state in states.scene -%}
          {%- if state.entity_id | regex_match('scene.living_room_',ignorecase=False) -%}
            {%- set NAME = state_attr(state.entity_id,"friendly_name") | regex_replace(find='Living Room ', replace='') -%}
            {{
              { 'entity': state.entity_id,
                'type': 'custom:button-card',
                'template': 'hue_scene_card',
                'variables': {
                  'name': NAME
                },
              }
            }},
          {%- endif -%} 
        {%- endfor %}
    sort:
      method: friendly_name
    card:
      type: "custom:layout-card"
      layout_type: "custom:grid-layout"
      layout_options: !include ../views/snippets/layout-live-tile.yaml
    view_layout:
      grid-column: 1/-1

And this is how my lights.yaml looks like...

      # [Column] Living Room

      - type: "custom:layout-card"
        layout_type: "custom:grid-layout"
        layout:
          margin: -1
        cards:
          - type: "custom:button-card"
            template: header_card
            variables:
              name: LIVING ROOM / DINNING
              label: Scenes
              action: more-info
              link: popup.living_room_scenes

          - type: "custom:layout-card"
            layout_type: "custom:grid-layout"
            layout: !include snippets/layout-live-tile.yaml
            cards: !include columns/lights-living-room.yaml

And this are my scenes (made in Hue App) which are automaticaly imported in HA.

image

Two days already I am strugling to make it work but I dont have any idea what is wrong. Do I have to maybe create popup.living_room_scenes entity with helper or is it specified in the configuration.yaml or is something completly different? I was trying to find answers online but no luck...

Thank you for your precious time any help is much appreciated :)

@fx-zone
Copy link

fx-zone commented Feb 16, 2024

I have the same problem and have been struggling for days. Is there a solution here now?
My scenes were also imported via Hue.

@MarineroCro
Copy link
Author

Hi,

I still was not able to find the proper solution to do it in the way Madelena did it.

I did however find a usable work around...

Screenshot_20240221_095355_Home Assistant

Basicaly I created a group of scenes for each room and then when I click on the scenes button it gives me a list from where I can activate.

I'm posting from my phone. Let me know if you need more info and I can give you more info even I am home...

PS. Small offtopic, did you find a way to make this template work properly with never version of button card? For me it breaks everything if I update after version 3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants