This is really cool, I actually used state-switch in the past, but I can’t remember it being able to do all this (transition, based on screensize etc).
Besides the indentation being off (which, admittedly, it is in the readme too), you should be aware that there is generally one way in which things can work, but infinite ways in which it can not work.
I can not guess which one you are experiencing with no information at all about your problem.
The “switch” in the name comes from the (structured) switch statement in programming, which lets you take one of several paths depending on the state of a variable.
It works with the state of any entity, just like the conditional card, but with more options.
I had one page with 5 thermostat cards. Now i show only one thermostat and use an input select to switch between the thermostat cards. Looks pretty nice.
I see in your example buttons named 1, 2 and 3. Are this custom buttons? Can you also create this buttons with the names of my thermostat? It looks better then a drop down input select.
@thomasloven are there some limitation with transition in safari and iOS app?
They are working nicely with chrome but in safari cards just change without the transition and sometimes they don’t even appear.
I’ve searched this post and the readme on GitHub but I’ve not found indication of this issue.
I have some problems with the card. When i chose something from the input_select the new card is not loaded correctly. I have to renew the page (press f5) to get it working again. I’m using the latest firefox browser
Hi can we use !include.yaml with the state switch card? If I wanted to create a multi remote so if I pressed the TV button the TV remote would display. I want to split up my .yaml so the buttons for the TV remote would be called from a separate TV.yaml file instead of being all in the one yaml