From 5ba610859d82d08cbe3f5fc9ad03c64d03cfd059 Mon Sep 17 00:00:00 2001 From: baurandr Date: Tue, 2 Jun 2020 19:46:17 -0400 Subject: [PATCH] Fix exception in callback async_remove_from_mem (#34075) Co-authored-by: Martin Hjelmare --- homeassistant/components/tts/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/tts/__init__.py b/homeassistant/components/tts/__init__.py index b7d3b4f1f4c..6dc2e9b7d45 100644 --- a/homeassistant/components/tts/__init__.py +++ b/homeassistant/components/tts/__init__.py @@ -399,7 +399,7 @@ class SpeechManager: @callback def async_remove_from_mem(): """Cleanup memcache.""" - self.mem_cache.pop(key) + self.mem_cache.pop(key, None) self.hass.loop.call_later(self.time_memory, async_remove_from_mem)