Only load requested coinbase accounts (#51981)

This commit is contained in:
Tom Brien
2021-06-28 19:21:04 +01:00
committed by GitHub
parent 6f41168616
commit 9e50bd0b30

View File

@@ -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