Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional types #88

Open
shaiger opened this issue Nov 16, 2024 · 2 comments
Open

Support additional types #88

shaiger opened this issue Nov 16, 2024 · 2 comments

Comments

@shaiger
Copy link

shaiger commented Nov 16, 2024

Apologies, I do not consider myself to be nor a YAML or an HA expert.
For the very least I am hoping to learn about a new approach that I may have not considered in the past.

Problem:
I've become addicted to the ability to reuse config for cards. Decluttering templates make a huge difference for me in maintaining configurations across my dashboards and devices.
Over time I have accumulated a large number of dashboards and views. In fact, I have a certain baseline I use for all of my views and dashboards. What I lack is the ability to reuse "view:" configuration, just as I can do with my cards.
My dashboard and view configuration is becoming more and more convoluted over time.

The solution I'd like:
Here is a simple example for illustration:

template_view_base:
  view:
    title: '[[title]]'
    path: '[[path]]'
    type: sections
    max_columns: 10
    icon: '[[icon]]'
    dense_section_placement: true
    sections:
      - type: grid
        column_span: full
        cards: '[[cards]]'

Alternatives I've considered:

  1. Replicate and clutter :(
  2. Instead of managing customizations on top of the base in YAML, build a single stateful dashboard that can:
  • manage state per device
  • leverage some new configuration that will dictates which options to use per device
  • contain the logic to select desired behaviors in run time instead of config time
@ildar170975
Copy link

Alternatively:

  • you can use a lovelace_gen custom plugin;
  • you can use a custom layout-card which can represent a whole view (although it does not support sections).

@shaiger
Copy link
Author

shaiger commented Nov 16, 2024

Alternatively:

  • you can use a lovelace_gen custom plugin;
  • you can use a custom layout-card which can represent a whole view (although it does not support sections).

lovelace_gen - have not been able to get it to work, I'll give it another try at some point
layout-card - I am using it everywhere, but am getting funky results from time to time. a few more folks are struggling as well. It's not just the layout-card though, this path (cards as views) eventually leads to tab card hosting layout cards, etc which is getting more and more convoluted. I thought I'd simplify things and build upon what seems to be the emerging standard.
To add to that, templating a whole dashboard is my ultimate goal...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants