From 340146e5fbb370daa9fd018a56c95a5383893250 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 3 Feb 2022 01:25:51 +0100 Subject: [PATCH] Add update listener type hints to coinbase (#65414) Co-authored-by: epenet --- homeassistant/components/coinbase/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/coinbase/__init__.py b/homeassistant/components/coinbase/__init__.py index 238ff1db87d..4ef26a11130 100644 --- a/homeassistant/components/coinbase/__init__.py +++ b/homeassistant/components/coinbase/__init__.py @@ -99,7 +99,7 @@ def create_and_update_instance(entry: ConfigEntry) -> CoinbaseData: return instance -async def update_listener(hass, config_entry): +async def update_listener(hass: HomeAssistant, config_entry: ConfigEntry) -> None: """Handle options update.""" await hass.config_entries.async_reload(config_entry.entry_id) @@ -113,11 +113,11 @@ async def update_listener(hass, config_entry): for entity in entities: currency = entity.unique_id.split("-")[-1] if "xe" in entity.unique_id and currency not in config_entry.options.get( - CONF_EXCHANGE_RATES + CONF_EXCHANGE_RATES, [] ): registry.async_remove(entity.entity_id) elif "wallet" in entity.unique_id and currency not in config_entry.options.get( - CONF_CURRENCIES + CONF_CURRENCIES, [] ): registry.async_remove(entity.entity_id)