Dual tariff energy with weekends - please help me with scheduler

Hi,
I would like to have switch working on the following schedule driven by low energy tariff which is:
from monday to friday - 22:00 - 06:00

  • (from october to march) - 13:00 - 15:00 - or (from april to september) - 15:00 - 17:00
  • saturday and sunday - 24h
  • some national hollydays - 24h
    my national hollydays in 2022:
    01/01/2022
    06/01/2022
    17/04/2022
    18/04/2022
    01/05/2022
    03/05/2022
    05/06/2022
    16/06/2022
    15/08/2022
    01/11/2022
    11/11/2022
    25/12/2022
    26/12/2022
    in 2023 there will be drifferent days.
    other time the switch (or more switches) should be off
    (my heating device is 6KW electric heater that’s why I would like to do it)
    Thanks in advance for any help or poining me for any tutorial
    Regards
    Maciek

no one have any clue how to do it?
maybe by simple if then else if … then loop?
regards
Maciek

can someone point me to any tutorial how to do it based on numeric state?
If it can be done that way?
if I define each day separately as in spreadsheet.

Hi, I think you could achieve much of what you need by defining a workday sensor to include all your specific dates and this should greatly simplify the logic that would be required.

For the times you could use two Times of the Day sensors:

Somehow you will also have to figure out the month ranges and this might help:

By combing the above in a template you should be able to create a sensor that describes your specific energy tariff.

I have not provided a complete solution for you but this might provide some avenues to explore and I hope this is helpful to you.

Thanky you very much, I hope it will be sufficient
Just I’m thinking how to change daytime low tariff when it depends of current month?
from october to march - 13:00 - 15:00 - from april to september - 15:00 - 17:00