restriction-card icon indicating copy to clipboard operation
restriction-card copied to clipboard

[FR] Support auto-entities card

Open chemelli74 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Cannot combine restriction-card with auto-entities card

Describe the solution you'd like Been able to lock a row from a list generated by auto-entities

Describe alternatives you've considered None so far

Additional context

chemelli74 avatar Apr 25 '22 07:04 chemelli74

@iantrich, do you may consider the proposed FR ?

Simone

chemelli74 avatar Jul 31 '22 21:07 chemelli74

To use this card with auto-entities you can leverage this.entity_id:

This for example creates a grid of restricted light cards for all you lights:

type: custom:auto-entities
card:
  type: grid
  columns: 3
card_param: cards
filter:
  include:
    - domain: light
      options:
        type: custom:restriction-card
        card:
          type: light
          entity: this.entity_id
  exclude:
    - state: unavailable
    - state: unknown

Ref: https://github.com/thomasloven/lovelace-auto-entities#entity-options

pschmitt avatar Aug 29 '22 07:08 pschmitt

Finally found the tie to test your suggestion and with a bit of work I got it working as expected. Thank you very much for your help !

Simone

chemelli74 avatar Dec 09 '22 00:12 chemelli74