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

Thanks Tom, that was a big help.

Is it possible to use entity attribute as a secondary_info option?
I’d like to list all the automations with last_triggered addition.

I followed the instructions from the initial post, but if I add a manual card and enter custom:monster-card as its type, it shows

Cannot read property ‘include’ of undefined
{
“type”: “custom:monster-card”
}

I cleared the cache and restarted HA. It’s Hass.io 0.88.2, I use GUI configuration mode for Lovelace, not YAML (as apparently it’s impossible to use GUI in yaml mode).
Any idea on how to get it to work?

UPDATE: got it, that way it says that I need to add filter and then include inside it. Duh
 :expressionless:

I’m having the same issue. media-control cards don’t seem to work with monster-card or auto-enteties custom lovelace cards.

Did you ever find a way to get them to work?

Monster-card and auto-entities alike work on cards which have an entities property.
They put several entities into one card. They cannot be used to create several cards.

But not any card that has the entity property. Is that correct?

@Jokerigno I use auto-entities by @thomasloven to do what you’re trying to do - works a treat.

# Show all active media players
- type: custom:auto-entities
  show_empty: false
  filter:
    include:
      - domain: media_player
        state: /playing|paused/
        options:
          type: custom:mini-media-player
          artwork_border: true
          artwork: cover
          hide:
            icon: true
  card: 
    type: entities
#    title: Now Playing ...
    show_header_toggle : false

It uses mini media player as rows on an entities card, all the config can be entered once in the options section of the auto-entities card. I was previously using entity-filter on an entities card, but that meant individual entries with all the config for each possible media player. This is much cleaner and easier to maintain.

5 Likes

No, not every card has the entity property. And not every card has the entities property. auto-entities/monster-card work only with those that have the latter.

But @eggman’s suggestion is a great workaround!

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.

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)

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

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.

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.

Great solution! Thank you!

@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?

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

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

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=

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