My Lovelace Plugins

auto-entities

Sometimes you may wish to add a lot of entities to a card, or perhaps just some, but which ones may change.
Like say you want to list all lights that are turned on, or all sensors whose battery is about to run out.

My first contact with custom lovelace cards was the monster-card by ciotlosm, which does exactly this. It does have some shortcomings, though, and that’s why I made a reimplementation of it which I chose to call

auto-entities

Differences from monster-card includes:

  • support for actual regular expressions
  • support for custom cards (it can be used to populate a fold-entity-row, for example)
  • support for fetching entities from a group
  • ability to parse advanced attribute specifications

6 Likes

Awesome!!!
Now there’s the need for a:
- type: custom:thomasloven_magic_monster_update_and_whatever_comes_next_card
:clap:

1 Like

Awesome thanks @thomasloven

I’m going to give this a crack to see if I can use it to fix this problem:
image

It doesn’t seem to work with media-control and custom mini player cards… Should it? I got excited about this one specifically for this purpose (dynamically showing all plex media player playing)

*Also, could you show me an example of the combined with fold entity, etc… (I mean the lovelace code and format itself), not entirely sure how to do it along with auto-entities…

**And finally, is there a sort option? I have a view that shows me all scripts, lights, etc… I used Monster before and they were sorted alphabetically, with this one, not sorted at all…

1 Like

OK well that rocks the free world…

          - type: custom:auto-entities
            card:
              type: entities
              title: NSW Warnings & Events
              show_header_toggle: false
            filter:
              include:
                - entity_id: "geo_location.nsw_fire_service_feed_*"
            show_empty: true

Not sure how to integrate it into the folding-entity-row though?

image


so there’s 5 in the group but 2 have disappeared so they don’t show so no more nasty yellow which is exactly what I wanted…

Would be nice if they could be sorted in distance order as well…

Same problem I’m wondering about… tried a few things but can’t make it work yet

Also, it’s not yet available in the custom-updater like your other cards…

I use the card-modder (attachment code) … and it does not show the design background

  - type: custom:card-modder
    card:
      type: custom:auto-entities
      show_empty: false
      card:
        type: entities
        title: Lights on
        show_header_toggle: false
      filter:
        include:
          - domain: light
        exclude:
        - state: "off"
        - state: "unavailable"
    style:
      background-image: url("/local/lovelace/background/cardbackk.png")
      background-repeat: no-repeat
      background-color: rgba(50,50,50,0.3)
      background-size: 100% 68px
      border-radius: 20px
      border: solid 1px rgba(100,100,100,0.3)
      box-shadow: 3px 3px rgba(0,0,0,0.4)
      overflow: hidden 

is the extra ‘k’ supposed to be in the file name?

background-image: url("/local/lovelace/background/cardbackk.png")

Yes, this is the correct name for the background image. I use the same name for other places

Thanks @thomasloven. Working great again. I had to manually update it. It’s been over 6 hours since you posted the update, and card tracker is still showing the previous version as the latest, and wants me to install that. :face_with_symbols_over_mouth: Not sure what’s happening there.

Is card tracker playing up for anyone else?

yes I don’t see the auto-entity card in the tracker either

Updater usually runs once a day I think. https://github.com/custom-cards/information/blob/master/repos.json

@ludeeus does a job need to be kicked off?

That would make sense based on what I see. That’s a shame. Should be able to click the check button and it checks the latest versions of each card installed.

1 Like

That is correct @iantrich, Im working on getting it down to hourly

What time does it run at the moment? And what time zone?

fold-entity-row

Is it possible to change the name: and icon: of the head:?

for example, but not like this, it doesn’t work

        - type: custom:fold-entity-row
          head: sensor.tasmota_earliest_installed_version
            - name: Sonoff / Tasmota Earliest Installed Version
            - icon: mdi:alpha-s-box
          items:
            - entity: sensor.sonoff01_firmware
              name: Sonoff 01
              icon: mdi:alpha-s-box

Do it the same way you would if it was a normal entity in an entities card.

Do you mean like this, because it doesn’t work.
(So obviously not)

            - type: custom:fold-entity-row
              head: 
                - entity: sensor.tasmota_earliest_installed_version
                  name: Sonoff / Tasmota Earliest Installed Version
                  icon: mdi:alpha-s-box

image

Since head expect only one thing, and not a list, you should remove the dash.

1 Like