From d46962685542447c6adea1fb22e8338663f14389 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Fri, 6 Oct 2023 00:19:21 -0700 Subject: [PATCH] Fix bug in calendar state where alarms due to alarms not scheduled (#101510) --- homeassistant/components/calendar/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/calendar/__init__.py b/homeassistant/components/calendar/__init__.py index 1622f568a2d..5f6b54824fd 100644 --- a/homeassistant/components/calendar/__init__.py +++ b/homeassistant/components/calendar/__init__.py @@ -540,9 +540,9 @@ class CalendarEntity(Entity): @callback def update(_: datetime.datetime) -> None: - """Run when the active or upcoming event starts or ends.""" + """Update state and reschedule next alarms.""" _LOGGER.debug("Running %s update", self.entity_id) - self._async_write_ha_state() + self.async_write_ha_state() if now < event.start_datetime_local: self._alarm_unsubs.append(