Closed svenakela closed 8 months ago
Hi, yes, as I said, i'm not a programmer :-D but I also sometimes need to add fake info, to get the data needed.
e.g. on tomorrow, I'll add price og 9999.9999, so I can filter out when, there is no data yet, and also in the windows for graf high and graf low, where I reuse old prises, to get the data needed, but you a right, it's overly complicated, but it makes it so I understand it :-D
I've added a pull request with refactoring of this and other improvements
Thanks, for all the updates. :-)
I will update the EDS version with your fixes tomorrow... :-)
The calculations for max and min prices can be so much smaller in your Yaml files.
No need to recreate arrays and sort them, there are max and min functions in Python. I'll give you examples that you can copy/paste into the Home Assistant Template Editor to give you an idea.
If you want to concatenate the today and tomorrow values, merging lists in Python is just a '+' operation.