182 files

This commit is contained in:
Home Assistant Version Control
2026-08-17 12:11:35 +00:00
parent 7dddf6bb13
commit ece15a1c1b
183 changed files with 11457 additions and 3092 deletions
@@ -12,7 +12,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util import dt as dt_util
from .const import (
CONF_ADVANCED_SCHEDULE_TIME,
CONF_OBJECT,
CONF_TASKS,
DOMAIN,
@@ -20,7 +19,9 @@ from .const import (
MaintenanceStatus,
ScheduleType,
)
from .helpers.aggregate import merged_tasks
from .helpers.dates import interval_span_days
from .helpers.global_options import is_schedule_time_enabled
from .helpers.i18n import normalize_language
from .models.maintenance_task import MaintenanceTask
@@ -521,9 +522,7 @@ class MaintenanceCalendar(CalendarEntity):
live_tasks = {}
# Merge static (ConfigEntry) + dynamic (Store) task data
store = getattr(runtime_data, "store", None) if runtime_data else None
static_tasks = entry.data.get(CONF_TASKS, {})
tasks_data = store.merge_all_tasks(static_tasks) if store is not None else static_tasks
tasks_data = merged_tasks(entry)
for task_id, task_dict in tasks_data.items():
task = MaintenanceTask.from_dict(task_dict)
@@ -638,9 +637,5 @@ class MaintenanceCalendar(CalendarEntity):
)
def _is_schedule_time_feature_enabled(self) -> bool:
"""Lookup the global advanced flag — same approach as coordinator."""
for ce in self._hass.config_entries.async_entries(DOMAIN):
if ce.unique_id == GLOBAL_UNIQUE_ID:
opts = ce.options or ce.data
return bool(opts.get(CONF_ADVANCED_SCHEDULE_TIME, False))
return False
"""Lookup the global advanced flag — same source as the coordinator."""
return is_schedule_time_enabled(self._hass)