Select/activate Hue scenes in new v2 Api setup

Indeed, thanks to @Mariusthvdb for all his efforts in putting this code together.

Building on his work, I mashed up a scene selector suited for the T6E android panels that I use around the house:

Screencast from 2023-09-17 15-05-30

It’s pretty ugly, don’t copy/paste this, use it as a basis to make your own.
Here’s the gist of it:

type: custom:swipe-card
parameters:
  shortSwipes: false
  pagination:
    el: .swiper-scrollbar
  spaceBetween: 10
  effect: coverflow
  coverflowEffect:
    rotate: 30
    slideShadows: false
cards:
  - type: custom:auto-entities
    card:
      type: grid
      columns: 4
    card_param: cards
    filter:
      template: |-
        {% set hue_group = 'guestbed1' %}
        {% for s in states.scene
            if hue_group == s.attributes.group_name and
              s.attributes.is_dynamic == true -%}
          {% if loop.index0 >= 0 and loop.index0 < 12 -%} 
          {{
            {
              'type': 'custom:button-card',
              'entity': s.entity_id,
              'aspect_ratio': 1/1,
              'show_state': false,
              'show_entity_picture': true,
              'name': s.object_id.split(hue_group|slugify +'_')[1]|capitalize|replace('_',' '),
            }
          }},
          {%- endif %}
        {%- endfor %}

Then you’d repeat the auto-entities section, adjusting as necessary for your setup. Would probably be better suited to a macro.

I tried to do this with just the swiper card and one auto-entities template, but swiper card doesn’t seem to handle the grid capabilities of swiper.js.