Hi,
I have a CYD (with esphome) hanging in the kitchen that shows various things, including the current PV yield and things like that.
I have reminders for to-dos sent to my cell phone, e.g. washing machine finished, dishwasher finished, taking out the trash, flushing the water connection, etc.
Each of these to-dos generates a sticky/persistent notification on the cell phone, which has a callback action to delete the sticky notification again after it has been completed.
In addition, each to-do counts up a counter helper so that I can see how many to-dos are still open.
Completing a to-do reduces the counter accordingly.
On my CYD I have a tile that shows the number of unfinished to-dos, and the LED is red as long as the counter is > 0.
I would now like to configure a button on the counter tile that shows/opens a second page in the CYD.
So far, no problem.
But on this second page, a dynamic list of open to-dos should now be displayed. And that’s where I’m stuck.
I’m thinking that every new to-do should be written/added to an array or a JSON, for example.
I then read this out with an input_text helper as a template sensor and pass the list to esphome for displaying.
I’m still not sure if that’s even possible.
The problem is, for example, when I complete a to-do, it has to be removed from the array. How do I do that? So how can I delete a certain string from the array that is always in a different position?
Does anyone have any better ideas on how I can generate and display a dynamic list of to-dos on the CYD?
Many thanks!