bramkragten / swipe-card

Card that allows you to swipe throught multiple cards for Home Assistant Lovelace
245 stars 36 forks source link

Templating for card parameter #34

Open maxi1134 opened 3 years ago

maxi1134 commented 3 years ago

Hi there! First of all, thanks for the amazing tool!

I was wondering how hard it would be to enable templating in the parameters? Specifically for the start_card parameter. This would allow having a different starting card depending on the state of an entity per instance!

The code would look akin to this:

image

Some more info here: https://www.home-assistant.io/docs/configuration/templating/

I will be happy to test this out for you extensively!

Thanks for reading!

maxi1134 commented 3 years ago

I should mention, I might be butchering this and it is already possible?

oramirite commented 2 years ago

I have had this technique in mind and I'm glad I'm not the only one. In my setup, I was trying to simply use the value of a Number Helper to set this. Didn't work for me either though :/ I guess this would have to be enabled.

zgadson commented 2 years ago

Can confirm. Y'all aren't crazy. This card truly does not accept templates, but I have so many uses for dynamically setting the start_card parameter that I might have to scrap my design plan entirely if this card can't do what I need it to.

@bramkragten, any plans to update this card (because it's also not working in any Home Assistant version past Core-2021.11.0 which is clearly a bigger issue)?

oramirite commented 2 years ago

It's definitely still working for me. You should start a separate issue about that.

dangizzi commented 2 years ago

Any change someone forked this card and got this working?