mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add additional calendar state alarm debugging (#101631)
This commit is contained in:
parent
faea3b1634
commit
0f4aae4128
@ -528,7 +528,9 @@ class CalendarEntity(Entity):
|
|||||||
the current or upcoming event.
|
the current or upcoming event.
|
||||||
"""
|
"""
|
||||||
super().async_write_ha_state()
|
super().async_write_ha_state()
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Clearing %s alarms (%s)", self.entity_id, len(self._alarm_unsubs)
|
||||||
|
)
|
||||||
for unsub in self._alarm_unsubs:
|
for unsub in self._alarm_unsubs:
|
||||||
unsub()
|
unsub()
|
||||||
self._alarm_unsubs.clear()
|
self._alarm_unsubs.clear()
|
||||||
@ -536,6 +538,7 @@ class CalendarEntity(Entity):
|
|||||||
now = dt_util.now()
|
now = dt_util.now()
|
||||||
event = self.event
|
event = self.event
|
||||||
if event is None or now >= event.end_datetime_local:
|
if event is None or now >= event.end_datetime_local:
|
||||||
|
_LOGGER.debug("No alarms needed for %s (event=%s)", self.entity_id, event)
|
||||||
return
|
return
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user