Quick question: I have two state cards on my view that are active. When I change one of the cards (hash and navigate) and then change the other, the first one reverts to the default state. Is there a way around this? I tried by disabling default (I use hash), but then nothing shows at all.
hash
is whateverâs after ?
in the URL in your browsers navigation bar. Anything that changes that will change which card is displayed.
I see, that makes total sense. Thanks for clarifying! I donât suppose there is a way to achieve what I want for only the device that is currently viewing it. I tried different ways (like input select) but those change the view for all devices.
Iâm getting a âCustom element doesnât exist: state-switchâ error on Google cast. Any chance this has something to do with it?
i have an input select that changes the ecobee hold mode on my install, and if the hold mode is set to hold hours it also shows an input number slider to set the number of hours. if the mode is anything else, it hides the number slider.
this card is doing pretty much exactly what i want in regards to what i described above, but thereâs one small glitchâŠthe input select list when expanded is ducking behind the cards below it (screenshot attached). is there a way to bring that to front?
You should start by making sure this does not happen if you are not using state-switch.
Hey @thomasloven
I was wondering, is it possible to have a ânotâ function somehow?
What I am trying to do is to hide a card completely if the state of the entity is âunavailableâ but to show exactly the same cards if the state is either âonâ or âoffâ, but I would like to prevent writing the same card(s) twice.
Thanks
Interesting, so I would create those q_cards (as I do for the decluttering one) and load for each state (on and off) that q-card, is this correct?
Also, would you consider this to be integrated into HACS?
Thanks
Correct.
Itâs still under evaluation. Iâm not sure what kind of performance impact it might have yet.
It works perfectly
Now with the mix of: decluttering-card, state-card and q-card I have a template that shows me the available lights in the house (hiding the unavailable ones) and I can control them all from one place:
Once expanded it looks like this:
There is only 1 thing I would like to make better, which is the spacing when you expand the groupâŠ
If someone have an idea please let me know⊠Maybe with card-mod but I donât know how to do that
If anyone need the code to re-create this itâs on my github repo:
Thanks!
it does not.
Thanks. Iâll see what I can do.
one other quick question: on that same card, thereâs a bit of a delay when the page first loads before the card comes up. this doesnât seem to happen with the other state-switch cards iâve usedâŠis this just due to it using an input_select as the controlling entity? if so, is there a way to fix that so that the card is up and on the screen when the rest of the page comes up?
Here is an annoying thing that happens occasionally on refreshing the frontend or switching between tabs. Another refresh will always fix it tho. It just started happening after I updated to v110.
I get it on one other card (card-templater) with a very similar error and a refresh clears that one up too.
I know that card-templater isnât one of yours and Iâve posted this to that thread too but I thought it might give you more insight as to what could be causing it.
I am aware of the problem and working on a fix.
Should be fixed now, actuallyâŠ
Hey Thomas,
would you be willing to add the version info to the console log, so we can easily check in inspector it is loaded correctly?
thanks for considering!
Yeah, it looks like itâs working now. Thanks!
How can I show second card to display in the case entity
parameter is set to deviceID
.
I was testing following snippet, second card âLaptop2â shown instead of showing both.
- type: custom:state-switch
entity: deviceID
states:
'c5cfe6f8-e92c2008':
type: markdown
content: >
Laptop
type: markdown
content: >
Laptop2
'c202a709-0baf8d92':
type: markdown
content: >
Mobile
If I add the cards as a list then I get âNo card type configured.â error message.
'c5cfe6f8-e92c2008':
- type: markdown
content: >
Laptop
- type: markdown
content: >
Laptop2