‘add_holidays
(list)(Optional)
Add custom holidays (such as company, personal holidays or vacations). Needs to formatted as YYYY-MM-DD.’
You should mention if your not in the US but in Germany and your config starts like
’ - platform: workday
country: DE’
You need to use -‘DD-MM-YYYY’ instead of YYYY-MM-DD
eg
The date is passed into the holidays pypi project un-doctored. It accepts any date format. So either of those will work.
Pulled from pypi doc:
# The Holiday class will also recognize strings of any format
# and int/float representing a Unix timestamp
'2014-01-01' in us_holidays # True
'1/1/2014' in us_holidays # True
1388597445 in us_holidays # True
Petro, if fed 4/7/2020 then there is ambiguity dd/mm or mm/dd leading zero’s or not.
(I don’t use this component so not that concerned but for the sake of clarity)?
but i am NOT in the US
your code works (in the US) but not somewhere else.
Thats the whole point of my post.
Just change your country in the config to DE and add a 2019-12-23 as holiday and restart Homeassistent.
Now change Country back to whatever it was and restar Homeassistent.
See the difference.
I read your post and what you aren’t understanding is that the format is correct for the US if the OS is set to the US. I’m assuming you have your country set properly everywhere (even in your os), therefor your date is formatted differently.
Just for further clarification… It should follow the format you see displayed in your UI, because that’s the true format. Which can’t really be captured in the documentation.
Thx,
since i am new and cant (or dont know how to) change the dokumention that post may in the wrong corner
Someone who can fix the dokumention should change it.
Have a nice time alltogether.
What you don’t understand is that the documentation works for people who set the PI to be english-US. So the example is actually correct in that regard.
Just because your country is set to DE for that integration does not mean the date format will match it. It’s based on the OS.
The documentation can be cleared up for that, but its not wrong in all instances.
sorry
you cant make me understand something i already understood
And because of i already understood i just opened this Thread for others who could use my information to change their config or change the doku.
I understand, but you still don’t seem to understand the difference between the configuration of the integration and the configuration of your operating system.