Giter VIP home page Giter VIP logo

Comments (10)

thomasloven avatar thomasloven commented on August 10, 2024 4

Auto-entities works by populating the entities: field of the supplied card.
Media-control doesn't have an entities: field, but rather an entity: field, so it won't work.

Auto-entities can't be used to create several cards at this point.

from lovelace-auto-entities.

k1rd3rf avatar k1rd3rf commented on August 10, 2024 3

I have managed to make a workaround for this by using entities as type on the wrapper card and by adding a type as option (which will be appended on the card config for each entity):

type: custom:auto-entities
card:
  type: entities
  title: Media
  show_header_toggle: false
filter:
  include:
    - entity_id: "media_player.*"
      options:
        type: custom:mini-media-player
        artwork: cover
  exlude:
    - state: "unavailable"

See https://www.home-assistant.io/lovelace/entities/#options-for-entities

from lovelace-auto-entities.

auredor avatar auredor commented on August 10, 2024 1

It would be good to support it somehow ;-)

from lovelace-auto-entities.

thomasloven avatar thomasloven commented on August 10, 2024 1

Auto-entities can't be used to create several cards at this point.

from lovelace-auto-entities.

thomasloven avatar thomasloven commented on August 10, 2024 1

Or see the bottom here: https://github.com/thomasloven/lovelace-layout-card#a-few-tips

from lovelace-auto-entities.

pironic avatar pironic commented on August 10, 2024

from lovelace-auto-entities.

jes1417 avatar jes1417 commented on August 10, 2024

Thanks for this card I was really hoping this would help with my Plex on Xbox, it keys creating new players and I was hoping I could use this card to just display any player it so happens to use.

from lovelace-auto-entities.

Tiwing1 avatar Tiwing1 commented on August 10, 2024

A year+ later, but wanted to share a slightly different take on this - thanks to all the above for your previous posts! I've implemented like this, which only shows the cards that are playing or paused: (apparently I suck at formatting. sorry cant figure out how to put a code block. just puts it all inline.)

type: custom:auto-entities card: type: entities show_header_toggle: false filter: include: - state: playing options: type: custom:mini-media-player artwork: cover - state: paused options: type: custom:mini-media-player artwork: cover show_empty: false

from lovelace-auto-entities.

natethelen avatar natethelen commented on August 10, 2024

I think this is how you had it formatted:

type: custom:auto-entities
card:
  type: entities
  show_header_toggle: false
filter:
  include:
    - state: playing
      options:
        type: custom:mini-media-player
        artwork: cover
    - state: paused
      options:
        type: custom:mini-media-player
        artwork: cover
show_empty: false

BTW, you can use markdown to format the code and even specify that it is yaml for proper colorization. Start it with this and then end it with 3 more backticks:
```yaml

from lovelace-auto-entities.

natethelen avatar natethelen commented on August 10, 2024

In case others come across this post and my config could help them...

I have a (likely relatively unique) setup where I have a bunch of Sonos Ports plugged into a matrix audio switcher that drives a bunch of rooms. Nowadays you would just have 1 Port per room, but in my case the Sonos-es came later and the # of Ports would be cost prohibitive.

I wanted a dynamic UI that would show just the rooms currently sourced to each Sonos so here is what I have per Sonos:

type: entities
entities:
  - type: custom:mini-media-player
    entity: media_player.main_floor
    group: true
    info: short
    hide:
      volume: true
      power: true
      source: true
  - type: custom:auto-entities
    card:
      type: entities
    filter:
      include:
        - entity_id: media_player.*_speakers
          attributes:
            source: Main Floor Sonos
          options:
            type: custom:mini-media-player
            group: true
            toggle_power: false
            hide:
              controls: true
      sort:
        method: name
    show_empty: false
    unique: true

Then I have this to list out all the rooms that are not associated to a Sonos so I can easily assign them:

type: custom:auto-entities
card:
  type: entities
  title: Unassigned Speakers
filter:
  include:
    - entity_id: media_player.*_speakers
      state: 'off'
      options:
        type: custom:mini-media-player
        group: true
        toggle_power: false
        hide:
          controls: true
      sort:
        method: name
show_empty: false
unique: true

from lovelace-auto-entities.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.