    async def purge_redactions(self, hass: HomeAssistant):
        """Empty redactions and free up some memory."""
        self.redactions = {}
        self._purge_task = async_call_later(
            hass,
            8 * 60 * 60,
            lambda _: HassJob(
                hass.loop.call_soon_threadsafe(hass.async_create_task, self.purge_redactions(hass)),
                cancel_on_shutdown=True,
            ),
        )
        self._has_purged = True
Empty redactions and free up some memory.
custom_components/bermuda/coordinator.py