Add a feature on the Dashboard, that when you edit the dashabord each card can ( along with duplicate, remove, etc.) be ‘hidden’. When hidden the card will not show up when the dashboard is not being edited, but will show up when the dashboard is being edited.
I have a dashboard called hidden for that, which only Admin can see.
I then just move cards to that dashboard for storage, so I can return them for seasonally events or if I want to use it for examples and such.
What is the use case for hidden cards except when editing?
A markdown card with admin notes to yourself when editing.
Don’t touch this view.
@tom_l You can hide it temporarily, and the unhide it when you like. For example, I have a card that shows the power plugs I use to charge my snowblower batteries. From December to March its great to have on the dashboard. From April to November I would like to hide it rather than delete it and have to rebuild it the following December.
@ShadowFist I was thinking more like adding a way to disable the display of a device within a card.
For example, I have disabled the two plugs associated with my two snowblower battery chargers; but now see the following in my dashbaord:
It would be great if there was an option that when I edit that card that either allowed me to ‘hide disabled devices’ globally within the card, or alternatively an option to hide the devices one by one.
I tried changing from the visual editor to the code editor you get when you click on ‘show code editor’ and commenting out the two disabled entities by starting the associated lines with a # - but what happens is when you go back to the visual editor and then back in through ‘show code editor’ again the lines that were commented out are actually completely removed
Yes, that is standard behaviour because comments are parsed out when converting from yaml to json.
While I was typing, @tom_l’s suggestion popped up which is also an extremely viable option. If you want a more automated process, here’s a slightly modified code straight from the Conditional card docs which might work (haven’t tested it myself):
type: conditional
conditions:
- condition: state
entity: light.bed_light
state_not: "unavailable"
- condition: user
users:
- 581fca7fdc014b8b894519cc531f9a04
card:
type: entities
entities:
- device_tracker.demo_paulus
- cover.kitchen_window
- group.kitchen
- lock.kitchen_door
- light.bed_light
@tom_i Thanks, I hadn’t noticed that setting. However, when I made it the items were not really hidden, rather just greyed out:
Also, I restarted HA before posting this, just to ensure something didn’t have to be reloaded.
Additionally, of note, the greyed out look of the devices when they are disabled and their ‘Visible’ option is also disabled … is the same look I get when … the devices are enabled but not available and their ‘Visible’ option is left ‘on’ as is its default.
The look I was after was just to hide them completely.
Then do shadowfist’s suggestion above.
Sadly, no success:
But perhaps I am doing something wrong?
In any case, a toggle switch to ‘hide disabled devices’ near the top of the card would be more intuitive
It’s giving you a hint right in the error about a double quoted “scalar”.
You’re missing a closing " from after unavailable:
I fiddled around with @ShadowFist suggestion some more and found it hides the whole card when the conditions are met. Which in fairness is what I asked for in the original post, but not what I ended up realizing I needed. That is to say hide the entities when they are not available (but show the ones that are).
Yes, because that is EXACTLY what that sample code does. It will hide ALL your entities of one of the entities in your condition section is unavailable. This is because you’re showing a bunch of entities in a single card.
Someone smarter than me will eventually show up to show you a way to hide a single entity within a card which lists multiple ones. Until then, you can use the knowledge you’re just learned to apply that to (separate) individual entity cards.
thank you - I see now - the error seemed to say the issue was at line 30, when indeed it was at line 8.
Thank you, I appreciate your help.
Well, with your help, I did find a solution - kind of.
I created one conditional card that showed all the entities when the two in question are available, and I created another conditional card with all the entities except the two in question when the two in question are unavailable.
Visually it gives me exactly what I am after.
However, it means I need to have maintain two cards, and if I ever need to add another entity then I have to update it in both.
A strategy that is not recommendable.
So again, if anyone ever reads this, I would suggest a feature to hide disabled cards, as shown above.
Thanks again for your time and your help.
Well, that’s one way to go about it. Another would be to split off the entities which you know aren’t always available into a separate card & use conditions for those.
Yet another would be to use a vertical stack card with conditional cards inside it.
That’s without delving into the possibilities that custom cards from HACS open up.
You can keep this feature request open because it’s not a bad idea at all (don’t forget to vote), but in the meantime, you now have 3 more options you weren’t aware of earlier today.
Thank you - I’ll look into it further tomorrow!