iantrich / restriction-card

🔒 Apply restrictions to Lovelace cards
MIT License
259 stars 22 forks source link

Make card appear in lovelace card picker? #53

Closed OmgImAlexis closed 3 years ago

OmgImAlexis commented 3 years ago

Is your feature request related to a problem? Please describe. I'd like to see the this added to the Lovelace card picker.

Describe the solution you'd like

// Configure the preview in the Lovelace card picker
window.customCards = window.customCards || [];
window.customCards.push({
  type: 'restriction-card',
  name: 'Restriction Card',
  preview: false,
  description: 'A card to provide restrictions on Lovelace cards defined within.'
});

Additional context I would add this myself but I'm not sure where you'd want it added since you don't just have a single flat js file.

iantrich commented 3 years ago

If I had a UI editor I think that would be nice, but as it is you have to do everything in yaml and don't see an advantage to adding this

OmgImAlexis commented 3 years ago

If I had a UI editor I think that would be nice, but as it is you have to do everything in yaml and don't see an advantage to adding this

For people wanting to add it it’s quicker than having to check the readme every time for the exact name. This has helped me use this card a lot more in my dashboard. Would you reconsider?

firestrife23 commented 3 years ago

I don't see a problem with adding this feature because Card Picker UI does allow you to edit YAML directly.

OmgImAlexis commented 3 years ago

@iantrich would you please reconsider this?

iantrich commented 2 years ago

The only thing it would populate is

type: custom:restriction-card

You'd still have to read the documentation

OmgImAlexis commented 2 years ago

Yes. For new people adding this card there nothing to really show it’s added. This helps.