Account for holidays in "additional costs"? #460
Replies: 2 comments
-
|
Hi, There is on way to handle this in the nordpool integration directly as it does not know anything about holy days and the holyday sensor uses the current date to let you know if it a holyday or not. The only way to fix this would be to sensor that displays the correct status for a holyday. I don’t think that is possible with a template. You would need to create a PR for a custom function that could be injected into nordpool sensor or write a custom integration that allows a datetime to be used. |
Beta Was this translation helpful? Give feedback.
-
|
Here is the code that handles the holyday sensor https://github.com/home-assistant/core/blob/dev/homeassistant/components/holiday/calendar.py it should be ok to implement if you know Python |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have an energy tariff adding peak surcharge to the nordpool price daytime during the winter, specifically on working Mo-Fri, 06-22, Nov thru Ma. The "other costs" feature of the nordpool integration works great to manage this normally, but not when holidays fall in the middle of the week - just as it does today when Boxing Day happens on a Thursday and I'm not paying the peak surcharge today.
Basically, I'd like to add something like this in my code (see red text in picture below), using a sensor that becomes true on holidays:

It works fine for today (holiday in the middle of the week), the problem is that tomorrow's prices are now also shown without the surcharge - but tomorrow is a normal Friday and the surcharge is there.
I assume I need a "holiday tomorrow"-sensor for it (creating one is easy) since the nordpool integration has no clue that then holiday-sensor will toggle at midnight, but I do not really see how I'd write the "other costs" template code properly.
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions