Iāve gone and made a crazy card that allows you to pretty much template anything in Lovelace for your card configurations using any information available on the frontend; states, attributes, user, etc.
Want state/attribute-based icons? DONE!
Want dynamic stacks; vertical vs horizontal based on user? DONE!
Want OR conditionals? DONE!
The list is pretty much endless and Iām sure you all will come up with some crazy stuff. Be sure to share.
Looks very promising! Gonna check it out this afternoon.
Maybe we should get a git for collecting templates, I expect the examples to number in size within weeks!
This sounds amazing, having custom cards like this instead of a buttload of template sensors, and my TV and Xbox can finally say on/off instead of home/away :). Is it also possible to colorize the icons, and have more than two options, say three possible āstatesā depending on sensor value? Looking forward to seeing some more examples of usage.
If you can explicitly do it in the config for a card for 1 scenario, you can template it out. Thatās all I can say about it. It takes ANY valid javascript and has access to the this.hass object.
That is amazing! I was looking for something like this a few days ago!
Now I donāt remember for what, but it is absolutely good to have this option now
Would you mind point me to the right direction in this scenario?
What I would like to do i add a ā- Chargingā if binary_sensor.andrea_oneplus5_charging is true.
The templating is not the problem here, my issue is, where do I put the ātype: custom:config-template-cardā bit in this scenario?
Part of being open source is having people contribute back. If you think a push towards having someone do that for the good of the community, then, wellā¦
I tried this hours ago and could not for the life of me get it to work, Iām glad I wasnāt the only one and thanks to those of you who worked out how āoffā the readme was because I tried loads of things to no avail.
This looks like being an amazingly useful card! Thank you.
really nice work and really useful for many case scenario in my setup working on them and i will post examples here and submit them after on your Git. Thank you again for that wonderful card
I was able to have the ācircle-sensor-cardā working with non numerical sensor, it absolutely needs a numerical state for the color change. So i made a 3 state color change here is the code i use.
(this is how the lovelace editor conform it)
On Clear it is green, on Warning it is yellow and Emergency red