Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering op label doens't seem to work #453

Open
VPelt opened this issue Jul 3, 2024 · 7 comments
Open

Filtering op label doens't seem to work #453

VPelt opened this issue Jul 3, 2024 · 7 comments

Comments

@VPelt
Copy link

VPelt commented Jul 3, 2024

I can't seem to use labels to exclude entities
I want to create a list of my top 10 consumers

type: custom:auto-entities
card:
  type: entities
filter:
  include:
    - domain: sensor
      attributes:
        device_class: power
  exclude:
    - label: nolist
    - state: unknown
    - state: unavailable
sort:
  method: state
  reverse: true
  count: 10
  numeric: true

Schermafbeelding 2024-07-03 170349

Schermafbeelding 2024-07-03 170417

@tomofdarkness
Copy link

I just tried to exclude things lebeled with "service" from my kid's dashboard so he can't turn off the router or the washing machine, but I see this behavior too -- filtering on label doesn't work as an exclude: or as a not:

@mljenkinsdotcom
Copy link

mljenkinsdotcom commented Aug 4, 2024

Same issue. For example I am using a card with exclude and entities with the label "ignore" still populate on the view. I also tried to include entities with the label and they also did not show. Hence, most likely something with the filtering. I noticed the label functionality was the last change committed, so I fear something is wrong, or perhaps something has changed in HA that broke it.

Example include:

type: custom:auto-entities
filter:
  include:
    - label: ignore
show_empty: true
card:
  type: entities
  title: Ignored Entries
  state_color: true
sort:
  method: last_changed
  reverse: true

Example exclude:

type: custom:auto-entities
filter:
  include:
    - domain: light
      state: 'on'
      integration: insteon
      options:
        secondary_info: last-changed
    - domain: light
      state: 'on'
      integration: govee
      options:
        secondary_info: last-changed
    - domain: switch
      state: 'on'
      integration: tplink
      options:
        secondary_info: last-changed
    - domain: switch
      state: 'on'
      integration: insteon
      options:
        secondary_info: last-changed
  exclude:
    - area: Tag On
    - area: Tag On Bedroom
    - label: ignore
show_empty: true
card:
  type: entities
  title: Lights On
  state_color: true
sort:
  method: last_changed
  reverse: true

@mljenkinsdotcom
Copy link

mljenkinsdotcom commented Aug 4, 2024

Something to note, if anyone needs to INCLUDE items with labels, this can currently be done using a template like this to workaround the label filter issue:

type: custom:auto-entities
card:
  type: entities
filter:
  template: "{{ label_entities('important') }}"

Where important is the label you want to include. Unfortunately you cannot use a template to exclude items, so this doesn't help those like myself that want to exclude items based on a label.

@x4N70pHyLL
Copy link

Doesn't work for me as well.

What I noticed: Older labels do work, even when included in a new auto entities card. A newly created label does not, neither in include, nor in exclude.
The workaround with the template doesn't work for me as well.

@x4N70pHyLL
Copy link

Another note: It seems to work occasionally, I have no idea why. So using the label (for debugging I just have a filter "show all entities with this label") sometimes shows all the relevant entities (couple of times a day when looking at my dashboard), but most of the time it does not. Maybe this helps in analysis

@VPelt
Copy link
Author

VPelt commented Aug 6, 2024

My bug report was explicitly for the exclude functionality. Include does seem te work/have a workaround available

@simllll
Copy link

simllll commented Nov 2, 2024

Just ran into the same issue. Anything we can do to get this fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants