well, itās not obsolete, thereās just 2 functions that do the same thing. But that function (to_json) only exists in HA, it does not exist in lovelace_gen.
It is a custom button card and funnily enough it is based on one you came up with a few years ago.
Less funny, I found a ridiculous typo.
In case you donāt remember it was these, theyāre still going strong for me albeit with quite a bit of hacking for various other uses. I keep thinking about moving on from them but I still like them!
(Yes, Iām just trying to deflect from my stupidity)
I use lovelace_gen a lot in my config but I am at a loss as to why this dashboard refuses to load because it appears to be similar to countless other examples I have.
No, the template and the dashboard are in the same folder.
I have the syntax form you suggest in almost every other !include in my config because usually they are not in the same folder.
The way I have it now it displays everything correctly it is just that if I add the # lovelace_gen to the first line it then refuses to load.
(Obviously, eventually I want to add some jinja, this is just to illustrate a trivial example)
I have moved the !include file into the same place as all my other !include templates which pretty much all all have # lovelace_gen and still have the same problem.
Well I tried everything I could think of, in the end I just moved everything I wanted to do into a script which was slightly inconvenient, but offset by being āstandardā I suppose.
However, I have several dozens of āincludesā and it does not seem very efficient to run an include for every room (although I understand this only happens when it is parsed the first time). I tried to do it the following way and this crashes my dashboard with āUnknown errorā.
# lovelace_gen
rooms: !include roomconfig.yaml
{% set room_data = rooms["master_bedroom"]%} # the inclusion of this line makes the lovelace crash
Why does this not work? Can I not reference the YAML dictionary via JINJA?
hi guys, can anyone advise if my jinja code on the offset_num is correct? i am trying to make conditional display by group_by or statistics based on the offset_num value but they donāt work.