diff --git a/button_card_templates/media.yaml b/button_card_templates/media.yaml index 179e2e22..95050fb2 100644 --- a/button_card_templates/media.yaml +++ b/button_card_templates/media.yaml @@ -116,6 +116,19 @@ conditional_media: ]]] state_display: > [[[ + let horizontalStack = this.getRootNode().host, + swipeCard = horizontalStack.getRootNode().host, + gridTitle = swipeCard.getRootNode().querySelector("h1"); + + swipeCard.swiper.on("slideChange", () => { + if (swipeCard.swiper.realIndex === 0) { + gridTitle.textContent = "Media"; + } + else if (swipeCard.swiper.realIndex === 1) { + gridTitle.textContent = "Spelare"; + } + }); + if (entity) { let elt = this.shadowRoot, await = setTimeout(marquee, 100),