Sorry, I don’t understand the point of your suggestion. It doesn’t matter if it’s == or ===because the entire template is ignored if Custom-UI is not installed. That’s been the point of this exercise, to eliminate the use of Custom-UI and replace its functionality with custom cards.
In addition, the triple-equal was just something I copy-pasted from an example many, many versions ago and have left it that way ever since. I understand the variable’s type is unlikely to be anything other than string thereby making the use of triple-equals superfluous. Nevertheless, whether double or triple, it’s moot.
I appreciate the example you shared. However, the difference in complexity between what you posted and what I currently do to achieve the same effect, has led me to decide that I will continue using Custom-UI.
Hopefully, by the time I absolutely must discard Custom-UI, there will exist a compact way in Lovelace to achieve my modest requirements.
Agree, I wish it could be easier… on the other hand, I added some new functionality to it (on/off by hold) and it’s literally a couple of strings so that’s the core config that takes the most time and space.
It’s definitely possible to avoid creating additional sensors (using custom_fields) so it looks better but the whole thing is almost 100 lines… that’s the price for flexibility (as it’s really flexible in terms of what is configurable and where we can place it on the card but requires some JS knowledge - grid etc).
for individual buttons this can be a pain, but when you have a set of identical buttons for lights/switches what have you, you can create a button-card-template, or a decluttering template, or even use Lovelace_gen to cut code lines drastically.
Still no replacement for custom-ui, (to get back to topic) but very nice indeed.
FYI: Custom-ui for HA 110+ is here
Not all options designed for state cards are supported by Lovelace, but many still are, and of course icon_color templates work again. Thanks to all who helped me create this.
And of course, to Andrey! Where ever you may be, hope you fare well.
es5 can probably be taken out completely since that is for older devices. Unless you have older devices of course
the animated weather card has long been replaced by a Lovelace variant.
the icons, I dont know. But, extra_html_url imports are soon to be deprecated, so best find a substitute.
depending on the card (does is start and end with ), you might want to test the same technique.
2020-05-28 22:51:22 ERROR (MainThread) [frontend.js.latest.202005195] https://192.168.1.24:8123/local/custom-ui/custom-ui.js?v=20200528:31:8908 Uncaught TypeError: e.push is not a function
One thing… i still can see in the customization of the entities, voices regarding the old custom UI. How to delete them (i already disabled all the old entries about it)?
What i mean is the following:
when i go to the customization ui and want to change the attributes for an entity i can see between other options the following:
That, i think, is related to the old custom_ui or am i wrong? In case it is, how to delete those entries as i don’t have anymore nothing related in the various configs?
Hope to be clear now…