I took out the 1800000 in the code examples above to be prepared for the quarterly prices. The input_numbers are helpers I use to calculate the actual costs. I can update the energy tax, VAT or the purchase costs when they change without having to change the template trigger/sensor.
In NL we have a complex system, and I wanted to know when the prices including all costs and taxes are negative. When that happens I switch off our SolarEdge inverter with a HACS modbus integration. Because I do not want to pay for supplying energy to the grid. The SolarEdge app has a function to do that, but cannot handle the complex Dutch situation. It switches off the inverter too soon.
I also created a third graph to show the prices for today before the today’s auction time. (Based on yesterday’s prices for tomorrow. If you can still follow me
)
I think I found a bug. I had one trigger with two actions. One for the prices of today (the second action) and one for the prices of tomorrow. That fails of course when those prices are not known yet. Thus leaving me with an empty graph for today and tomorrow. Created a trigger for each action and I suspect that would fix the issue for why I thought I needed a third graph.
I like the import of the template file @teebar and used that as well.
Besides this I created an input datetime helper that I can use to select a date between the last two months and tomorrow. Along with a template trigger that gets triggered by changing the date and then uses that to get the prices for that day.
Only ApexCharts will not auto adjust graph_span. For now I use a span of 22days to get the highlights of that day.