Lovelace: Swiper card

What version of home-assistant are you on? The sensor card you are using is only available in beta right now…

Ah damn using version 0.79.2, wasn’t clear in the topic.

The topic is about the slider, you can use it with any card.

You can use Lovelace: mini graph card for now.

1 Like

I’m still getting this error:

.../custom-lovelace/swipe-card/swipe-card.js?v=1.0:81:32 TypeError: element.setConfig is not a function. (In 'element.setConfig(item)', 'element.setConfig' is undefined)

Safari, and HassOS v. 0.79.3

Same here, using iPad app. Love the card though!

What is your config? Are you also using the sensor card? You should swap that below ha version 0.80 for Lovelace: mini graph card if you want to do the same.

Thank you for creating the card.

Is there a way to set a start position for the swiper?
I have 3 cards (mini graph card) in the swiper and would like to have te second card as start position.

I added start_card:

      - type: custom:swipe-card
        start_card: 2
        parameters:
          ...
        cards:
          - ...
1 Like

Thanks!

Works perfect !

Would it be possible to use it in combination with button-card?

I guess, have you tried?

Yes I tries and is not working.

My goal is to have a card with multiple scene to swipe (the scene are light scenes: bright, dimmed, colored and so on).

Now I have a button-card for each scene (for each set of light) , but would save lots of space swiping (one card for each set of light and swiping for changing scene)

Seems to work fine? Or is this not what you mean?

https://github.com/bramkragten/custom-ui/blob/master/swipe-card/preview-button.gif?raw=true

1 Like

Oh now I see my mistake. Would it be possible to swipe each button?

1 button per slide? yeah sure…
https://github.com/bramkragten/custom-ui/blob/master/swipe-card/preview-%20button-single.gif?raw=true

Sorry for not being clear, I mean just each button

I don’t understand?

Sounds like they want a grid like in your first example, but where each square in the grid is individually swipeable, rather than swiping the entire grid at the same time. E.g. swipe “Living” and have it cycle through some things while all the other squares stay the same. Maybe? Just my guess.

2 Likes

Ohwww right… yeah that would also be possible…

https://github.com/bramkragten/custom-ui/blob/master/swipe-card/preview-%20button-2.gif?raw=true

2 Likes

It does seems to not always play nice with the horizontal-stack…
Created PR to fix that… https://github.com/home-assistant/home-assistant-polymer/pull/1761

3 Likes