Madelena / hass-config-public

My Dashboards for Home Assistant - Advanced data visualizations, responsive design, a neat maximalist Metro Live Tile layout, and an ultraminimal tablet layout!
712 stars 57 forks source link

Hue Scenes in the Lights Section not showing #22

Open MarineroCro opened 1 year ago

MarineroCro commented 1 year ago

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 commented 9 months ago

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 commented 9 months ago

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