diff --git a/custom_components/chore_helper/__init__.py b/custom_components/chore_helper/__init__.py index 875d1d6..05c90c2 100644 --- a/custom_components/chore_helper/__init__.py +++ b/custom_components/chore_helper/__init__.py @@ -102,7 +102,7 @@ OFFSET_DATE_SCHEMA = vol.Schema( { vol.Required(CONF_ENTITY_ID): vol.All(cv.ensure_list, [cv.string]), - vol.Required(const.CONF_DATE): cv.date, + vol.Optional(const.CONF_DATE): cv.date, vol.Required(const.CONF_OFFSET): vol.All( vol.Coerce(int), vol.Range(min=-31, max=31) ), diff --git a/custom_components/chore_helper/chore.py b/custom_components/chore_helper/chore.py index 8ae1d24..46bec33 100644 --- a/custom_components/chore_helper/chore.py +++ b/custom_components/chore_helper/chore.py @@ -550,6 +550,12 @@ def calculate_day1(self, day1: date, schedule_start_date: date) -> date: if schedule_start_date > day1: day1 = schedule_start_date today = helpers.now().date() + if ( + day1 == start_date + and self.last_completed is not None + and self.last_completed.date() == day1 + ): + day1 = day1 + relativedelta(days=1) if ( day1 == today and self.last_completed is not None