@bvisick wrote:
Is it possible to use a template in a horizontal stack card to generate other cards?
I have a weekly summary of information that I show in seven markdown cards, each containing a template that formats the raw data. Because each day’s code is similar, I’d like to put it in a loop and generate both the daily content and its markdown card. I would like to put such a template inside a horizontal stack so that an entire week can be displayed across the screen.
I can run the loop in Developer Tools/Template but I’m struggling to get it to work in a Lovelace card and am not even sure if it’s possible. At the moment I repeat the daily 40+ lines of code seven times inside the horizontal stack, which seems very clunky. If there’s a better way to achieve this I’d be really grateful - thanks in advance.
Posts: 3
Participants: 2