I initially tested the swiper card with some random cards and have this as my current permanent set up.
type: custom:swipe-card
parameters:
effect: fade
pagination:
type: bullets
autoplay:
pauseOnMouseEnter: true
disableOnInteraction: false
delay: 5000
speed: 1000
cards:
- type: custom:button-card
entity: sensor.dark_sky_daily_summary
show_state: true
show_name: true
name: Next Few Day's Summary
tap_action:
action: none
styles:
card:
- height: 100px
- width: 500px
grid:
- grid-template-areas: '"i n" "i s"'
- grid-template-columns: 40% min-content
img_cell:
- position: absolute
- left: '-6%'
- top: 0%
- height: 150px
- width: 150px
state:
- position: absolute
- left: 20%
- top: 55%
- align-self: start
- justify-self: start
name:
- position: absolute
- left: 20%
- top: 20%
- font-weight: bold
- align-self: start
- justify-self: start
- type: custom:button-card
entity: sensor.dark_sky_hourly_summary
show_state: true
show_name: true
name: Today's Summary
tap_action:
action: none
styles:
card:
- height: 100px
- width: 500px
grid:
- grid-template-areas: '"i n" "i s"'
- grid-template-columns: 40% min-content
img_cell:
- position: absolute
- left: '-6%'
- top: 0%
- height: 150px
- width: 150px
state:
- position: absolute
- left: 20%
- top: 55%
- align-self: start
- justify-self: start
name:
- position: absolute
- left: 20%
- top: 20%
- font-weight: bold
- align-self: start
- justify-self: start
Which is working flawlessly, until adding (or replacing with) the conditional card. Strangely it did work for a time, then gave the error when I refreshed the page. The conditional card is also working flawlessly by itself.
type: conditional
conditions:
- entity: input_boolean.swiper_message_1
state: 'on'
card:
type: light
entity: light.living_room_lamp
Iâve now copied (and heavily edited) Mariusthbdbâs code. I removed included and the surrounding conditional and changed the conditional entity, but functionally as far as I can tell it should still be effectively the same, and it currently works:
type: custom:swipe-card
parameters:
spaceBetween: 8
grabCursor: true
centeredSlides: false
slidesPerView: 4
pagination:
type: bullets
hideOnClick: true
cards:
- type: conditional
conditions:
- entity: input_boolean.swiper_message_1
state: 'on'
card:
type: entities
entities:
- light.living_room_lamp
However, as soon as I refreshed the page.
t.setConfig is not a function
type: custom:swipe-card
parameters:
spaceBetween: 8
grabCursor: true
centeredSlides: false
slidesPerView: 4
pagination:
type: bullets
hideOnClick: true
cards:
- type: conditional
conditions:
- entity: input_boolean.swiper_message_1
state: 'on'
card:
type: entities
entities:
- light.living_room_lamp
My weather swiper is still working even after a refresh.
EDIT: It seems once another change is made on the page (deleting another card for example) the swiper-conditional works again, but will t.setConfig again on a refresh.
EDIT2: So I wrapped the entire swiper card in a conditional, like the previous posters code. This seems to have resolved the issue and the swiper card has survived multiple refreshes. Interestingly the conditional seems to have no effect and the swiper card is always displayed (perhaps the vertical frame that was also in the code makes a difference there). As it stands, there seems to be a bug in how the conditional and swiper cards interact with each other, but it appears to be solvable with a workaround.