Comments (6)
I don't think I'll add it as I don't think you should really be doing it in the frontend. Easy to get some big performance issues. You can check out https://github.com/thomasloven/lovelace-template-entity-row/blob/master/src/main.js for ideas on how to implement it though.
The main thing is that you want to restrict when you call it so that you only re-evaluate when necessary.
from boilerplate-card.
Thanks for the feedback!
Am I correct to say that performance impact could be limited if you only render the template when the entity has changed state?
from boilerplate-card.
yes
from boilerplate-card.
Thank you for the feedback. I've implemented it like this.
from boilerplate-card.
Sorry to reopen this issue.
I want to reiterate the notion of having templating support in this boilerplate card. I recently found that button-card has support for Javascript-based templates. These are executed in the front-end and have no performance impact.
I implemented it into my own card (button-text-card) and I feel like this way of templating is very powerful. I can't shake the thought that it would be nice to offer a standard way of front-end templating.
What are your thoughts? I can open a PR if you think it's a good idea to include in this project.
from boilerplate-card.
I don't think the boilerplate-card is the place to do it, first off. I think this would be better suited for something in a node module, like custom-card-helpers
from boilerplate-card.
Related Issues (20)
- " and handle the changes/suggestions HOT 1
- Update template to use lastest version of custom-card-helpers HOT 5
- Better documentation HOT 1
- Undefined entity when loading Card HOT 3
- Localize fails to detect language if not set on this device HOT 6
- `paper-dropdown-menu` custom element doesnt work anymore with lazy loading HOT 8
- Error when removing config properties HOT 1
- Request: Upgrade lit-element to lit? HOT 1
- Outdated Prettier version breaks on part of the card file and doesn't auto-format HOT 1
- This is undefined
- UI Editor HOT 3
- you are still relying on mwc elementes to be defined globally by HA HOT 7
- Add the ability to use sliders
- Changes not being detected
- `container start` fails - " unable to connect to github.com" - Replace `git://` by `https://` ? HOT 3
- Code Splitting problem when building HOT 1
- Installing Home Assistant in devcontainer fails HOT 1
- Bring the boilerplate-card to a modern version HOT 1
- add info.md and hacs.json HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boilerplate-card.