diff --git a/cmd/domogeek/domogeek.go b/cmd/domogeek/domogeek.go index 053a944..aa6a7a2 100644 --- a/cmd/domogeek/domogeek.go +++ b/cmd/domogeek/domogeek.go @@ -73,11 +73,17 @@ type CalendarHandler struct{} func (c *CalendarHandler) ServeHTTP(w http.ResponseWriter, _ *http.Request) { now := time.Now() + calDavHolidays, err := cal.IsHolidaysFromCaldav(now) + if err != nil { + zap.S().Warnf("unable to read holliday status from caldav: %v", err) + calDavHolidays = false + } + cd := CalendarDay{ Day: now, WorkingDay: cal.IsWorkingDay(now), Ferie: cal.IsHoliday(now), - Holiday: cal.IsHoliday(now), + Holiday: calDavHolidays, Weekday: cal.IsWeekDay(now), }