From 1011c30cc5734c50ce257ba19bfabc30a74207de Mon Sep 17 00:00:00 2001 From: Maikel Punie Date: Mon, 5 Dec 2022 17:12:27 +0100 Subject: [PATCH] Small fix for the velbus clear-cache service (#83279) --- homeassistant/components/velbus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/velbus/__init__.py b/homeassistant/components/velbus/__init__.py index 2ac751e283d..0da64227fd3 100644 --- a/homeassistant/components/velbus/__init__.py +++ b/homeassistant/components/velbus/__init__.py @@ -139,7 +139,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: """Handle a clear cache service call.""" # clear the cache with suppress(FileNotFoundError): - if call.data[CONF_ADDRESS]: + if CONF_ADDRESS in call.data and call.data[CONF_ADDRESS]: await hass.async_add_executor_job( os.unlink, hass.config.path(