Home Assistant Community

Lovelace: Bringing back entity-filter (monster-card)

#90

I’m sure it would require a creative solution, but would it be possible to use auto entities in sections of an entities card? I have an entities card with 4 section labels (representing buildings), and I’d like to populate each section with filtered entities that correspond to that building. I know I could just use separate cards instead, but that is not my preference.

#91

you could use a single vertical-stack-in-card with 4 separate auto-entities & entities cards. It’d look like one card (unlike the standard vertical-stack).

Although, you’d probably have to use titles for section labels and they’d be too big (IMO)

#92

Yeah, that’s my concern - I prefer the smaller text of the section labels versus the card titles.

#93

Based on the example here, it seems something like this could be possible. It looks like entity rows could be passed to the ‘cards’ property? Unfortunately, I can’t quite seem to make it work.

#94

Looks like it should work. I’m constantly amazed by the flexibility of lovelace, what cards can go where and how they interact. Can make for some very complicated setups though.

#95

Great solution! Thank you!

#96

@thomasloven - Thoughts on this? Is it possible to mix section headers and auto-entity lists in a single entities card? Your example is based on your custom fold-entity-row…can this be done with standard entity row types?

#97

I haven’t really thought of it before, but sure, why not.
Add a special include filter for the section, and have it look for a single entity that you know exists (which one doesn’t matter), then put the rest of the options under options:

type: custom:auto-entities
filter:
  include:
    - entity_id: /light/
      state: "on"
    - entity_id: sun.sun
      options:
        type: section
        label: Sensors
    - domain: sensor
      state: ">5"
  card:
    type: entities

#98

Awesome! Thank you so much for the example - this is a huge help!

#99

I can’t get my auto-entities card to work. Using custom updater to ensure latest of card-tools (ca9579) and auto-entities (e957ab)

See this in chrome console. Advice?

:8443/local/custom_ui/customcards/card-tools.js?v=1:275 CARD-TOOLS IS INSTALLEDDeviceID: d6d0d60a-a3941e67
:8443/local/custom_ui/customcards/card-tools.js?v=1:15 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at Function.litElement (:8443/local/custom_ui/customcards/card-tools.js?v=1:15)
    at customElements.whenDefined.then (:8443/local/custom_ui/customcards/auto-entities.js?v=1:2)
litElement @ :8443/local/custom_ui/customcards/card-tools.js?v=1:15
customElements.whenDefined.then @ :8443/local/custom_ui/customcards/auto-entities.js?v=1:2
:8443/local/custom_ui/customcards/card-tools.js?v=1:15 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at Function.litElement (:8443/local/custom_ui/customcards/card-tools.js?v=1:15)
    at customElements.whenDefined.then (:8443/local/custom_ui/customcards/fold-entity-row.js?v=1:2)
litElement @ :8443/local/custom_ui/customcards/card-tools.js?v=1:15
customElements.whenDefined.then @ :8443/local/custom_ui/customcards/fold-entity-row.js?v=1:2
:8443/local/custom_ui/customcards/card-tools.js?v=1:15 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.getPrototypeOf (<anonymous>)
    at Function.litElement (:8443/local/custom_ui/customcards/card-tools.js?v=1:15)
    at customElements.whenDefined.then (:8443/local/custom_ui/customcards/state-switch.js?v=
#100

Hey guys,
Could someone point me to a guide on how to “install” monster card?
I’m using lovelace but, I where do i find ui-lovelace.yaml? It’s not in my /config.
Do i need to create it?
I’ ve read this, but if i do it, do i need to write all my UI in yaml? or i can just enable it to enter the js code?
Thanks in advance

#101

Hi all

What’s wrong with this code?

      - type: custom:monster-card
        card:
          type: entities
          title: Consumi prese
          show_header_toggle: false
        show_empty: false
        filter:
          include:
            - entity_id: 'sensor.lavatrice_power'
              options:
                secondary_info:
                  entity_id: 'sensor.lavatrice_today'

or

                secondary_info: 'sensor.lavatrice_today'

It does not show the entity value.

Is it possible?
What should be the code?

Thanks

#102

Download monster-card.json into /www
Click on three dots in right upper corner of your HA GUI and select Configure UI, then again on three dots and select Raw config editor.
Add at the top

resources:
  - type: js
    url: /local/monster-card.js?v=0.0.1

and you should be ready to roll.

1 Like
#103

Thanks, that was so simple :slight_smile:

#104

my monster-card-based card is not working after upgrading to 0.90.0 :frowning:

#105

Working for me on 0.90.2

#106

sorry, should be 0.91.0
it is working actually, but for some reason ALL 3 automations that are into that card and control its behaviour were OFF (I did not turn them off and their initial_state: true).
don’t know what’s happened during update.

#107

As soon as I exclude a light group entity (e.g. light.cinema_downlights ) all lights that are on disappear from this monster card:

card:
  title: Lights On
  type: entities
filter:
  include:
    - domain: light
      state: 'on'
  exclude:
    - entity: light.cinema_downlights # <---- add this and no "on" lights show.
show_empty: false
type: 'custom:monster-card'

Does it not support light group entity exclusion?

My ultimate goal would be to have a wildcard exclusion for my “all” light groups. e.g. "*light.all_*" should exclude the entities: light.all_kitchen_lights and light.all_lights from the above card.

EDIT:

Actually excluding any single light entity clears the whole card of lights that are on. Am I missing something?

card:
  title: Lights On
  type: entities
filter:
  include:
    - domain: light
      state: 'on'
  exclude:
    - entity: light.lifx_bar_1
show_empty: false
type: 'custom:monster-card'

EDIT 2: My fault. it’s ‘entity_id’, not ‘entity’. All good.

#108

hello to all
anyway to use this:
type: ‘custom:monster-card’
show_empty: false
card:
type: entities
title: Lights On
filter:
include:
- domain: light
state: ‘on’

but for timers?

#109

Point 3 & 11,