punxaphil / maxi-media-player

Media card for Home Assistant UI with a focus on managing multiple media players, but not excluding single player setups.
7 stars 1 forks source link

FR add option to list entity: media_player.abc #52

Open Mariusthvdb opened 2 weeks ago

Mariusthvdb commented 2 weeks ago

Checklist:

Release with the issue: 1.7.1 Last working release (if known):

Browser and Operating System: any we tried

Description of problem:

No supported players found

trying to use your card in auto-entities,

    - type: custom:auto-entities
      card:
        type: custom:maxi-media-player
      filter:
        include:
          - domain: media_player
      # card_param: entities # is default, so not required

we get the below error, because your card does not accept

    - type: custom:maxi-media-player
      entities:
        - entity: media_player.googlehome_library
        - entity: media_player.googlehome_hal

which is what auto-entities produces, (and probably all HA card using entities accept).

eg, see: https://www.home-assistant.io/dashboards/entity-filter/ or entities card ofc, which goes without saying being the main entities listing card in HA

So, please consider accepting that in the config of your card, do we can create an auto-generated card config

Javascript errors shown in the web inspector (if applicable):

Scherm­afbeelding 2024-06-20 om 11 37 40

Additional information: https://community.home-assistant.io/t/maxi-media-player/705007/16?u=mariusthvdb

https://community.home-assistant.io/t/auto-entities-automatically-fill-cards-with-entities/147801/1359?u=mariusthvdb

Mariusthvdb commented 2 weeks ago

image

punxaphil commented 2 weeks ago

Where do you see in the docs that the format should be entity: ....? This page https://www.home-assistant.io/dashboards/entity-filter/ indicates that list of entity ids is ok, which is what maxi-media-player supports image

Mariusthvdb commented 2 weeks ago

I'm not saying it should be, I am saying it accepts it, sorry if that came across the wrong way

it would really be helpful if maxi-media-player would accept lists like above, including the entity:

    - type: custom:maxi-media-player
      entities:
        - entity: media_player.googlehome_library
        - entity: media_player.googlehome_hal
punxaphil commented 2 weeks ago

I still don't understand how it would help. Nothing in the link below says it should be in that format. Unless I am missing something? https://github.com/thomasloven/lovelace-auto-entities

Mariusthvdb commented 2 weeks ago

yes, your card can not accept

    - type: custom:maxi-media-player
      entities:
        - entity: media_player.googlehome_library
        - entity: media_player.googlehome_hal

but only entities like

    - type: custom:maxi-media-player
      entities:
        - media_player.googlehome_library
        - media_player.googlehome_hal

however, most other card accept the entity: so you can set names and other options. Most importantly in this FR though is the reason auto-entities outputs the list with the entity: as Ive posted above.

Mariusthvdb commented 1 week ago

btw, Ive just taken out all testing card configs with the maxi-media-player card, and the javascript error remains in Inspector:

Scherm­afbeelding 2024-06-21 om 09 45 06

and can only be prevented by removing the resource in HACS/not loading it.