I have not seen this topic addressed anywhere so please forgive me if it is common knowledge. I have a light that I set to flash at the time I want to wake up each day. This automation uses the workday sensor to determine if each day is a work day, of course, and it normally runs fine. Today is President’s Day in my country, which is a government and banking holiday, but it is still a work day for me. I was lucky to wake up at my usual time, but the event got me thinking that I need to fix the automation so it doesn’t happen again. I researched the workday sensor and see that you can add specific dates to be included or excluded and you can also exclude named holidays. What I don’t see is a list of holidays that are ‘valid’ to the sensor. Can anyone point me to something or somewhere that has a list of such holidays so I can decide if I need to wake up or not?
There’s a link in the documentation that leads to the python-holiday module that serves as the basis for the Workday Sensor integration. You need to peruse the module’s python code, for your country, to see which holidays it employs.
For example, President’s Day is a holiday in the USA so here’s the code for the United States:
Follow the link to see all of it because only New Year’s Day is visible in this limited view.
Hi,
depending on your needs, you also could think about a different solution. I had the problem that I wanted to have notifications on different and very unregular days (not many). So I choosed HACS and the Waste Collection Schedule for this. Honestly, it’s not fully automated and needs your input sometimes, but was best solution in my case.
In your case you could do something like:
- Create an ics calender file with the additional working days
- Copy this ics-file to HA and setup the Waste Collecting Schedule
- Using new sensor as condition for your automation.
Config.yaml similar to this:
waste_collection_schedule:
sources:
- name: ics
args:
file: "www/Workingdays.ics"
customize:
- type: "Work"
alias: working_day
icon: mdi:briefcase
calendar_title: Working
fetch_time: "04:00"
day_switch_time: "10:00"
sensor:
- platform: waste_collection_schedule
name: Workingday
details_format: "upcoming"
value_template: '{{ value.daysTo }}'
types:
- working_day
This should create a sensor which you can use as additional condition for your automation.
Depending on the amount of additional working days and the regularity it might help out.
Regards,
Lars
I’m sorry to wake up this older topic, I want to add the variable holidays in Belgium and the holidays from our region in combinations with the language bound holidays. Because I don’t want to check this list every day (I’m thinking at the moment I need an automated home because i forget most of it).
So it would be helpful when I could holidays in CSV format in the text input field instead of entering day by day.
An other solution is to know where and how the added holidays are stored so I van edit the file directly.
Kind Greetings,
Frank