question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to filter media_player domain

See original GitHub issue

looks as though i can’t set my card type to anything like ‘media-control’ or ‘custom:mini-media-player’ because

mini-media-player Error: Specify an entity from within the media_player domain.
    at HTMLElement.setConfig (mini-media-player-bundle.js?v=1.0.2:1)
    at _createThing (card-tools.js?track=true&v=0:82)
    at Function.createThing (card-tools.js?track=true&v=0:112)
    at Function.createCard (card-tools.js?track=true&v=0:133)
    at HTMLElement.setConfig (auto-entities.js?v=be1323:12)
    at create_card_element_createElement (401352253e833b70a294.chunk.js:4823)
    at createCardElement (401352253e833b70a294.chunk.js:4823)
    at HTMLElement.createCardElement (401352253e833b70a294.chunk.js:5614)
    at config.cards.forEach (401352253e833b70a294.chunk.js:5693)
    at Array.forEach (<anonymous>)

or

hui-media-control-card Error: No entity specified
    at HTMLElement.setConfig (401352253e833b70a294.chunk.js:3896)
    at _createThing (card-tools.js?track=true&v=0:82)
    at Function.createThing (card-tools.js?track=true&v=0:112)
    at Function.createCard (card-tools.js?track=true&v=0:133)
    at HTMLElement.setConfig (auto-entities.js?v=be1323:12)
    at create_card_element_createElement (401352253e833b70a294.chunk.js:4823)
    at createCardElement (401352253e833b70a294.chunk.js:4823)
    at HTMLElement.createCardElement (401352253e833b70a294.chunk.js:5614)
    at config.cards.forEach (401352253e833b70a294.chunk.js:5693)
    at Array.forEach (<anonymous>)

I know that the error associates itself with card-tools but i think it just may be returning zero results from the filter in auto-entries. thus… opening the issue on this repo and not on card-tools.

Thanks for your help! love all the work you’ve put into lovelace.

btw here is my lovelace card:

type: 'custom:auto-entities'
card:
  type: media-control
filter:
  include:
    - domain: media_player

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
thomaslovencommented, Mar 8, 2019

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.

3reactions
k1rd3rfcommented, Apr 30, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

MediaPlayer - Android Developers
In general, some playback control operation may fail due to various reasons, such as unsupported audio/video format, poorly interleaved audio/video, ...
Read more >
Media Player | Apple Developer Documentation
A query that specifies a set of media items from the device's media library using a filter and a grouping type. MPMediaQuerySection. A...
Read more >
Media Player - Home Assistant
Instructions on how to setup your media players with Home Assistant.
Read more >
How To Fix when VLC Is Unable to Open the MRL
1. Click on the Start button on your Windows PC. 2. Go to the Settings. 3. Select “Update & Security.”
Read more >
Windows Media Player: WMP mini FAQ - Zachd.com
Presumably somewhere along the way those got reset or NULLed. * A failure registering the DRM dlls. Again, wmplayer.exe should be functional if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found