mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add update listener type hints to coinbase (#65414)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
256ad084c5
commit
340146e5fb
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user