iantrich / config-template-card

📝 Templatable Lovelace Configurations
MIT License
441 stars 56 forks source link

Deep press template #24

Closed jimz011 closed 4 years ago

jimz011 commented 4 years ago

Is your feature request related to a problem? Please describe. The card says 100% templatable, but it can’t template deep_press (or at least it doesn’t accept it).

Describe the solution you'd like I’d love for us to be able to use an input_select with a ‘true’ or ‘false’ option to set if a card should have deep_press or not.

The reason behind this is because I am doing exactly what you asked for. Going completely nuts on lovelace with your template card. Making almost everything configurable through the interface. This is the only piece currently missing.

Describe alternatives you've considered I have tried other template cards like the jinja template card and I have tried different ways to template with direct state or an if/else statement. Deep_press will accept the first word in the line. (So if the first word is true it will use true) it looks like it doesn’t do much with the template. I have only tried this on button-card

Additional context It would be really amazing if this could be possible as I use somewhat a same kind of method to set border radius and box shadow and that works like a charm. The card works fine on everything else btw and thank you for that.

iantrich commented 4 years ago

This wraps cards, the deep-press module is an overall thing that looks at your full lovelace config before this card is even loaded. i.e.

  lovelace
  |_ deep-press
  |_ card-mod
      |_ cards
         |_ rows
         |_ elements
jimz011 commented 4 years ago

Ah that is what I thought, too bad, would have been very cool. Though it does need the deep_press: true or false parameter, that is why I thought it would have been possible in one way or another. Thanks for the reply.