I want to use the swiper card as a menu for the top of my page, so select different views. Iām missing a couple of elements to make this work as I would wish, and I wonder if you have any pointers?
Iām using coverflow, but Iād like to be able to select a button regardless of whether that button is centred on the screen and jump to that page
because each view is its own URL, each view has its own instance of the swiper card, which means every time i switch to the view, the swiper card resets to button 1 rather than indicating the current page. Is it possible to somehow pass the view in as a parameter? (In image, the batteries page is selected, but it still shows as āHomeā
Iām using a single include file for the menu)
( for my wall tablets Iām removing the title and side bars)
Iāve tried various parameters without success, but is it possible to make the menu properly rotate? ie, so that there is no absolute left or right of the list
Hi there. Am attempting to place an atomic-calendar-revive card inside a swiper-card but am struggling a little.
What Iām trying to do is lock the calendar cardās height so that it doesnāt take up too much space on my dashboard, and then I can scroll within the card to see all the events within a limited space. This works well using the cardās own cardHeight functionality.
However, once I place the calendar card inside a swipe card, it borks the formatting and ends up looking like the attached image. Anyone have any idea what I might be doing wrong?
They work, all cards work inside swiper-card. I have nearly all cards you can think off, even nested cards within nested cards and conditional cards. Post your code so others can help you.
Iāve read through almost all of this thread, but I couldnāt find the answer.
Can you set this card to auto-click the card in the middle? For instance, I have various ācontrol typesā per room, I can swipe through, but would rather trigger the conditional cards for that room+control type without a click on the centred card when I stop swiping.
If you havenāt found the answer here, you should check out the API this card uses (Swiper API). Itās mentioned in the first post: http://idangero.us/swiper/api/
Unless someone already uses it like this, I donāt think youāll find the answer in this thread. So in this case, you need to read the Swiper API docs and experiment with it.
Thanks, I have been through the API page but couldnāt find a mention of this type of option. Iāll go back through it and check I didnāt miss anything as it seems an obvious one to have.
Perhaps you can create it with a workaround. I see in the API it supports hash options. Maybe you can tie a slide to a hash both ways. Using the hash opens the slide, but maybe you can also set it so opening the slide, it mentions the hash in the url.
Then you can create an automation with browser_mod. When the url (with hash) is open on that device, fire a call service (of the button in that slide). Itāll take a lot of work if it works though setting this up per slide/hash.
You can put your swipe cards in conditional cards or use the state switch. The state switch is much more flexible if your conditions are complex.
Hereās a working example from my config. One hint, order the cards backwards and set your start card to the last card. It jumps to the last card when the state switches.
Swipe in custom:state-switch example
- type: custom:state-switch
entity: template
template: >
{% if is_state('binary_sensor.notification_active','on') %} notify
{% elif is_state('binary_sensor.commute_active','on') %} commute
{% else %} default
{% endif %}
default: default
states:
default:
type: custom:swipe-card
card_width: '98%'
start_card: 2 # start with last cards so correct card displays when switching states
reset_after: 120
parameters: !include /config/lovelace/lovelace_swipe_parameters.yaml
cards:
- !include /config/lovelace/include/card/schedule/traffic_card.yaml
- type: vertical-stack
cards:
- !include /config/lovelace/include/card/weather/weather_card.yaml
- !include /config/lovelace/include/card/general/home_feed_card.yaml
commute:
type: custom:swipe-card
card_width: '98%'
start_card: 3 # start with last cards so correct card displays when switching states
reset_after: 120
parameters: !include /config/lovelace/lovelace_swipe_parameters.yaml
cards:
- !include /config/lovelace/include/card/general/home_feed_card.yaml
- !include /config/lovelace/include/card/weather/weather_card.yaml
- !include /config/lovelace/include/card/schedule/traffic_card.yaml
notify:
type: vertical-stack
cards:
- type: custom:swipe-card
card_width: '98%'
start_card: 3 # start with last cards so correct card displays when switching states
reset_after: 120
parameters: !include /config/lovelace/lovelace_swipe_parameters.yaml
cards:
- !include /config/lovelace/include/card/schedule/traffic_card.yaml
- !include /config/lovelace/include/card/weather/weather_card.yaml
- !include /config/lovelace/include/card/general/home_feed_card.yaml
Thanks so much for this card. Itās a really great space saver.
1 question: I have a card that I want to default to the second card in the swipe list of 3 (middle card).
For most devices that I open the lovelace page on it works as expected. But for 1 device (a google nest hub max) it always defaults to the first card on a refresh, no matter what. Any idea why that might be?