Lovelace and hiding entities

I’ve noticed that entities I’ve hidden with customizations aren’t being hidden in Lovelace. Is there a different way of accomplishing this?

The customize section does not affect lovelace at all.

If you don’t want the object to show up in lovelace, don’t add it to the interface. Lovelace is an opt in interface. Meaning you have to tell it to show objects. It doesn’t just search all your objects and display them.

If you want to conditionally show entities, there is 2 ways of doing that:

1 Like

In case that you are still looking for this customization and you didn’t notice, there is currently available a new custom card, monster-card, that can be used to exclude entities based on attributes or whatever you want.

I’m also looking for a way to hide entities from the lovelace ui easily. Or from Home Assistant completely.
As an example, I have a bunch of Philip Hue bulbs. I have a bedroom fan with 4 bulbs in it. In the Hue app, I named the bulbs Bedroom 1, Bedroom 2, Bedroom 3 and Bedroom 4 and put them in a room called “Bedroom”.
In HA, that creates 5 entity_id's: light.bedroom_1, light.bedroom_2, light.bedroom_3, light.bedroom_4 and light.bedroom.
I really don’t care to see the 4 individual bulbs in the UI at all since I will never need to turn them on or off individually.

I am using a monster-card that shows only lights that are on; but all 5 entities are shown when light.bedroom is on.
The only way I have figured to get around this is to take the example given in the monster-card docs:

card:
  entities: null
  title: Lights On
  type: glance
filter:
  exclude:
    - state: 'off'
    - state: unavailable
  include:
    - domain: light
show_empty: false
type: 'custom:monster-card'

and change it to this:

card:
  entities: null
  title: Lights On
  type: glance
filter:
  exclude:
    - state: 'off'
    - state: unavailable
  include:
    - entity_id: light.bedroom
    - entity_id: light.office
    - entity_id: light.living_room
...etc.
show_empty: false
type: 'custom:monster-card'

Unless anyone knows of an easier way?
Thanks!

That’s the nature of the monster card. It’s meant to do exactly what you don’t want it to do. The method that you use to only include the items that you want is the proper way. using domain.light will grab all lights.

1 Like

I would like to hide some entities when my main entity (printer) is connected.
Please guide

It’s too vague. How about conditional card?

1 Like

I’m one of there users who hasn’t explicitly added anything to show anywhere. I see this implication “Lovelace is the new standard” but that doesn’t say how to hide things.

https://github.com/home-assistant/home-assistant.io/pull/11754 ripped out both lines of description about hide_entity from the documentation, but no hints as what yo DO. https://github.com/home-assistant/core/pull/30799 ripped it out of the code and made checkers flag it, but they also don’t say hw to get this functionality, just that it’s wrong.

It seems that we have to take 16 characters of hide_entity: true and replace it with a svelte 15 lines of code. That seems pretty ridiculous, so there’s the more logical way to do this that I’m missing.

Please help me find the logical way to generate card: objects so that I can just hide the things that a user shouldn’t touch.

1 Like

I’m afraid that (maybe because of the pretty long rant) I don’t quite get your idea - could you explain what exactly you want to achieve so we could work with it?

because hiding thing’s isn’t how lovelace works.

If you are using the auto-generated interface (everytime you add something it appears in the interface), You need to ‘take control’ by just editing the interface with the 3 dots in the upper right corner. Once you do, delete/remove the item from your interface.

If you’re using normal lovelace, you simply don’t add the item to your interface. It’s “hidden” because you didn’t add it.

Now if you are referring to hiding it from EVERYWHERE, including the device list, entity list, states page, you can’t do that. Just delete the whole item.

All references to ‘hiding’ were part of the old interface where everything plopped itself onto the interface no matter what and the only way to remove them was to ‘hide them’.

long rant

I included the issue, the places I looked, and the admission that it’s probably my fault, I overlooked something.

I can bulletpoint the content for easier skimming:

  1. UI reports “don’t use hide_entity: true”
  2. you should use… what… nothing given, let’s go looking
  3. In trying to RTFM, these are the FM’s that I R’d:
    a. the error message,
    b. the document PR, (#11754)
    c. the PR (#30799) to add the warning of the issue.

PRs given in case I looked at the wrong one.

I sincerely think I’m doing something wrong, or I haven’t found the easy way that replaces a simply boolean.

Please help me find the logical way to generate card: objects so that I can just hide the things that a user shouldn’t touch.

could you explain what exactly you want to achieve

Comically, this line kinda said that. I’m not sure what the simplest replacement would be, looking for the logical concise way to hide entities.

I think you need to elaborate.

Lovelace only controls the overview page. That’s the only place things will be ‘hidden’, and again you don’t hide things, you remove them. Or don’t add them.

You cannot hide anything in the rest of the interface. The remainder of the interface is all helper areas for you to configure things. If you want to hide things in these area’s your only option is to delete the integration all together or the entity itself (done through the device page).

because hiding thing’s isn’t how lovelace works.

Now if you are referring to hiding it from EVERYWHERE, including the device list, entity list, states page, you can’t do that. Just delete the whole item.

“Hide” and “delete” are different words. I want them to be not visible, like hide_entity used to do. hide_entity doesn’t delete the entity, it hides it. That’s what i’m trying to do.

I appreciate your willingness to help, but it seems you think I want to delete the entities, and that’s not the case. I just want them not-visible so that the interface has better signal-to-noise.

I still don’t think you understand what I’m saying so I’ll take a different approach:

Please take a screenshot of the page in which you want to hide an item. I’ll tell you if it’s possible.

Thanks, Petro; I’ve circled in red the things I hid for various reasons.

I didn’t see these before, but removing the hide_entity seems to coincide with them coming back.

click the 3 dots like I said and remove it. It does not remove it from the your system only that card.

This is what I was referring to when I said ‘take control’.

  1. Click 3 dots in upper right corner.
  2. Click configure UI.

  1. Select the card’s edit button where you want to remove the item.

  1. Delete the item.

Again, You aren’t deleting the item from you system, only the interface.

Also, keep in mind. From this point forward you have to add all the items you want to the interface. You must be currently in ‘auto generate’ mode. When you configure the UI for the first time, it switches you from ‘auto generate’ to normal configuration mode. Everytime you want a new card/entity, you have to add it yourself.

Do yourself a favor and read the lovelace documentation and watch the video. Everything through the UI is pretty self explanatory at that point.

Also you can play around with the demo interface, it’s where I took the screenshots.

1 Like

I appreciate the actual links to further reading; researching those and sharing it is awesome.

“GitOps” is the mentality that everything you’re using starts from source control, is pushed to the service that needs it, and that service has no config that didn’t come from source control. Everything running is deliberately sourced from a repository that can be rolled back or verified if something goes sideways. It’s how we consistently launch services at massive scale like FB, Apple, Google, Indeed, etc. It becomes a habit, but it’s the opposite of clicking on a UI (because that’s not generated from source control). In Hass terms, the HomeAssistant config would be regenerated on a clean system with a configured git_pull.

Do these UI changes result in config files built that represent the resulting dialog boxes? I see “show code editor” but I’m not sure where that yaml gets inserted.

The files that hold these changes are hidden but present inside your config folder. You’ll need to be able to view hidden files on whatever computer you are using. The are located in config\.storage. There’s tons of files, edit them at your own risk. All the files are json and they are not meant to be edited by a human.

If you want to use configuration files to configure lovelace, move to lovelace yaml mode.

In regards to all your comments about git and pulling / pushing. drop that from your mind. This software is trying to reach out to users who don’t code. They do not understand git, nor should they need to. Therefore none of this relates to git at all.

Maybe those users who don’t code will build the next addon or integration? :-/

1 Like

Not everyone wants to contribute. They only want to use the product.

When I say drop this from your mind, i’m referring to your use of home assistant. Not deployment of add-on or integrations. That should be 100% separate from your configuration.

For example, when I develop, I use my developmentbox set up in a virtual env. All those changes are managed through git but its 100% separate from my working configuration.

My actual configuration that runs my house is on a NUC where daily snapshots are performed. The snapshots contain the entire configuration and everything configured through the UI. Separate from that I maintain a git repository that stores my configuration history with pushes and pulls. This does not include changes done through the UI, it only includes changes made to .yaml configurations.