Lovelace: Swiper card

only my second try at using a custom card and the gauge-card I tried first was much simpler. I’m getting this error in my logs with the swiper card resource in my lovelace yaml:

018-12-07 14:52:15 ERROR (MainThread) [frontend.js.latest.201811211] https://xxxxxxx.duckdns.org:8123/local/custom-lovelace/swipe-card/js/swiper.min.js?v=1:6:467 Uncaught SyntaxError: Invalid regular expression: missing /
2018-12-07 14:58:19 ERROR (MainThread) [frontend.js.latest.201811211] https://xxxxxxxxx.duckdns.org:8123/local/custom-lovelace/swipe-card/js/swiper.min.js?v=1:6:467 Uncaught SyntaxError: Invalid regular expression: missing /

Am I doing something obviously wrong?

(I should mention that I’m trying this with media-player cards…not sure if that will work)

This custom card is awesome BTW :slight_smile:
I use it a lot but in one of my cards, I’m having issues specifically from iOS…

I setup a swiper card with entiy buttons (controlling scenes).
2018-12-12%2020_33_05-Window
I love this because I can keep all my scenes in one place without taking too much screen.

The problem, only from iOS (maybe other touchscreen interface, don’t know), is that almost every time I swipe the card to get to the next page, it triggers the button my finger was on…
This is not happening to other entity button cards, only with Swiper…

My only work around is to change the trigger for more-info so at least I don’t trigger a scene by accident while navigating but not great (still pops up the more info screen)
I can grab the navigation bar but it’s hard to grab it easily

Any suggestion or comment?

Try setting tap_action action to none and use hold_action to activate maybe?

excellent idea, I’ll give it a try
thanks!

I tried but the hold function doesn’t work on my entity button within the swiper cards (calling service scene.turn_on).
Tried the exact same card outside the Swiper and it works fine so it’s really specific to the swiper card… :frowning:

I think there is an issue with this card and HA 0.84.2, when you add this card into the UI via the browser editor, it breaks the browser editor from being able to view the raw config editor.

I can confirm the same behaviour on 0.84.3.
It breaks the Raw Config Editor

84.6 same behavior with broken editor. Also this is one of the first cards I’ve worked with , and I’m not sure if its 84.x or just the normal behavior, but it does seem to really slow down the lovelace load times

For what it’s worth, I’m using this and Raw Config is working fine. I have noticed that button-card causes Raw Config to be blank. I’ve switched to the native entity-buttons because of this.

Right to left support added inline with added support in HA

Hi @Bram_Kragten.
When I try your examples I have:

https://XXX.XXX.XXX.XXX/local/custom-lovelace/swipe-card/swipe-card.js?v=1.1.0:36:9 TypeError: hass.translationMetadata.translations[hass.selectedLanguage] is undefined

in the log and there is no lines on the cards. Using 0.84.6 HA version.

I get this error when trying to add this to my lovelace config, could anyone give me any pointers?

/local/custom-lovelace/swipe-card/swipe-card.js?v=1.1.0:36:92 Uncaught TypeError: Cannot read property ‘isRTL’ of undefined

Is this to do with Right To Left support thats been added perhaps? @Joseph_Levy

Yes. Are you on latest version of HA? Probably not. Otherwise downgrade swipe-card to an earlier version.

1 Like

Yes I am, I’ll try downgrading swipe-card, thanks for getting back to me.

If you’re on 0.84.6 you should not have any issues. Probably you need to clear your cache and fully restart HA.

Hi, I am new to this community and I have a question. I have downloaded the swiper card and the cards work fine, however, I can’t seem to get the graph line which is shown in the examples at the top of this page. Whatever I do the line won’t appear (I have tried different settings etc etc.) The card is there but the graphs aren’t. So it is usable, however it would be neat to know why the line won’t show up for me. If I put the graph: line parameter in then I do get the line, however they are the same color for each page. Fortunately the card works perfectly well for all other cases.

The configurations were removed for sensor card:

Thnx a lot, it explains a lot. So it is no longer possible to have the lines colored differently for each line?

I have the same issue too. and my hass is 0.84.6
Here is my config

  - url: /local/custom-lovelace/swipe-card/swipe-card.js?v=1.1.0
    type: module
      - type: 'custom:swipe-card'
        cards:
          - line_value_below: '7.83'
            llabels: true
            type: 'custom:mini-graph-card'
            entity: sensor.eur_to_cny
          - llabels: true
            line_value_below: '100'
            type: 'custom:mini-graph-card'
            entity: sensor.aqi
        

I think I know why. Your workaround is to click on the icon with your first name initial in the hass menu and then select a language. Probably now it has some default there. Fix posted in Bram’s repository.