Lovelace: Swiper card

I have the same.issue

Anyone gotten this to work with the new Apex Chart?

What’s there to not work? I have all kinds of cards inside a swiper card (mini graph, media player, horizontal-stack, weather card, markdown). Unless there is some bug, which you should report, it should work like all other cards.

Dont know what im doing wrong, but when i use custom:mini-graph-card, it works great, but when i try to add the apex card, i just get errors. :confused:

type: 'custom:swipe-card'
parameters:
  spaceBetween: 8
  scrollbar:
    hide: false
    draggable: true
    snapOnRelease: true
cards:
  - type: 'custom:apexcharts-card'
    cards: null
    entities:
      - sensor.multi_stua_temp
      - sensor.multi_stua_fuktighet

image

First try the apexchart-card on it’s own. My first guess is that you have apexchart-card not setup correctly (since I use numerous advanced nested cards inside swiper card withou issues).

Can you verify that the card does work outside of swipe-card? If you still get errors, see here for help -> ApexCharts card - A highly customizable graph card - Share your Projects! / Lovelace & Frontend - Home Assistant Community (home-assistant.io)

Yeah, it does work on it’s own. :slight_smile:

It’s only when i try to add them beneith swipe-card i get errors.

and if you remove cards:null ? I don’t see that variable on apexchart docs anywhere, so that shouldn’t be there anyway.

Btw, you have the card setup different than how the docs tell you to use it. This is the minimal config:

type: custom:apexcharts-card
series:
  - entity: sensor.temperature

I would first try that inside swipe-card and move from there. Change the entity to one of your own sensors.

So:

type: 'custom:swipe-card'
parameters:
  spaceBetween: 8
  scrollbar:
    hide: false
    draggable: true
    snapOnRelease: true
cards:
  - type: 'custom:apexcharts-card'
    series:
      - entity: sensor.multi_stua_fuktighet

If this still doesn’t work, you should create a github ticket. If it does work, then move from there and follow the apexchart-card docs.

Thanks alot, i just learned how to build a a nested card. :smiley: Never really understood it, still learning yaml. But now i understand you have to set it up according to the card config :stuck_out_tongue:

This is my final setup and it’s working. :slight_smile:

type: 'custom:swipe-card'
parameters:
  spaceBetween: 8
  scrollbar:
    hide: false
    draggable: true
    snapOnRelease: true
cards:
 - type: 'custom:apexcharts-card'
   series:
      - entity: sensor.multi_stua_temp
        color: '#e74c3c'
        type: line
        name: Gangen
        group_by:
          func: max
          duration: 30min
        extend_to_end: true
1 Like

Great! Once you get the hang of nested cards and work a lot in YAML, it get’s very easy and you see them as blocks you can just nest and build your UI with :smiley:

Does anyone know how I would remove the background dark parts between the cards?

Here is my code:

          - prefix: Main Bedroom
            <<: *title
            style:
              top: 53%
              left: 25%
              <<: *title-style
          - type: custom:swipe-card
            start_card: 1
            parameters:
              effect: coverflow
              speed: 650
              spaceBetween: 20
              threshold: 7
              coverflowEffect:
                rotate: 80
                depth: 300
            style:
              top: 56.55%
              left: 35.8%
              width: 20.97%
              height: 1px
              color: transparent
              --ha-card-border-radius: .88vw
            cards:            
              - type: picture-elements
                image: /local/Render/transparent.png
                elements:
                  - type: custom:button-card
                    entity:  light.main_bedroom_light_2
                    Name: Light
                    custom_fields:
                      icon_chan: *icon_chan
                    styles: *icon_chan_styles
                    style:
                      top: 23.9%
                      left: 23.8%
                      width: 47.7%
                    template: light

...

I can’t get pictures to work getting t.setConfig error, how did you manage to get images?

Having an issue where the slider for a light in a room is moving with the swipe. So if I start a slider on a light or cover, the card starts swiping with it.

Is there a way to fix it so the slider of the entity moves but the card doesnt swipe unless I swipe on the card itself?

I have this working for two seperate tabs. When i try to use it on a third, i’m met with this t.setConfig is not a function error. It renders on a browser but not my iphone.

Anyone else experience this?

Hello , i am using a swipercard inside a picture element card in panelmode. Inside the swipercard i have one more picture element card. I cant figure out how to set the height of the swipercard. I can set the Width with the style parameter of the picture element card but the height do not change. I have also tried to set height inside the swipercard but nothing works. The swipercard is to long right now so the pagination bullets ends up way to far Down on my Screen. Does anyone know a solution ?

Is it possible to change the card programmatically? i.e. instead of the mouse doing the swipe/drag event, I would like to swipe based on a home assistant event.

Does anybody know how to do that?

Just discovered this card and think it’s great! What a fantastic little space saver for those of us with iPad Mini-sized dashboards.

I managed to get it to auto scroll cards, but was wondering if it’s possible to assign a time (or delay) between translations?

Edit: I figured it out. just add delay: "milliseconds" after autoplay: with the number of milliseconds you need.

Experiencing the same issue with Android aswell. But for the lift of me can’t work out why

Hi Hellis, did you figure this out? i’m also looking for a solution.

1 Like