Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/chore_helper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
),
Expand Down
6 changes: 6 additions & 0 deletions custom_components/chore_helper/chore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down