From 9e50bd0b30f7429a4afaf727783e29ff55ce3f97 Mon Sep 17 00:00:00 2001 From: Tom Brien Date: Mon, 28 Jun 2021 19:21:04 +0100 Subject: [PATCH] Only load requested coinbase accounts (#51981) --- homeassistant/components/coinbase/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/coinbase/sensor.py b/homeassistant/components/coinbase/sensor.py index b090add2ddd..b30fbabf8ef 100644 --- a/homeassistant/components/coinbase/sensor.py +++ b/homeassistant/components/coinbase/sensor.py @@ -44,10 +44,10 @@ async def async_setup_entry(hass, config_entry, async_add_entities): account[API_ACCOUNT_CURRENCY] for account in instance.accounts ] + desired_currencies = [] + if CONF_CURRENCIES in config_entry.options: desired_currencies = config_entry.options[CONF_CURRENCIES] - else: - desired_currencies = provided_currencies exchange_native_currency = instance.exchange_rates.currency