I have some programmable holiday lights using an outdoor neopixel and a esp8266 so I needed a way to detect the next holiday to change the color scheme automatically. So this morning I just pounded out this custom component sensor that just tells you the next upcoming holiday.
It’s based on the same python holiday component that the built-in workday sensor is made with so maybe I should try to add this capability to that sensor or something.
This is a custom component and you can put it in a folder called custom_components that would be in the same dir as your main configuration.yaml file. So for example, my configuration.yaml is in /home/homeassistant/.homeassistant and so this component’s files are in /home/homeassistant/.homeassistant/custom_components/next_holiday
thanks, no problem man… I like aviation and the redundancy it preaches on planes, that is, the more redundant when it comes to information I don’t know, the better )
So I made something like this using templates, one issue I ran into is that I would jump to the next holiday on the day of a current holiday, making automations useless. Is that what you’re doing here (haven’t looked at the code)
Sure that’s totally doable. As you found we already do lookahead into the next year if there are no future holidays in the current year. But making that configurable is a great idea. Thanks for the suggestion.