Fix ecobee integration (#26951)
* Check for DATA_ECOBEE_CONFIG * Update homeassistant/components/ecobee/config_flow.py Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
This commit is contained in:
parent
e989239e19
commit
1de002013f
1 changed files with 5 additions and 1 deletions
|
@ -33,7 +33,11 @@ class EcobeeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
return self.async_abort(reason="one_instance_only")
|
||||
|
||||
errors = {}
|
||||
stored_api_key = self.hass.data[DATA_ECOBEE_CONFIG].get(CONF_API_KEY)
|
||||
stored_api_key = (
|
||||
self.hass.data[DATA_ECOBEE_CONFIG].get(CONF_API_KEY)
|
||||
if DATA_ECOBEE_CONFIG in self.hass.data
|
||||
else ""
|
||||
)
|
||||
|
||||
if user_input is not None:
|
||||
# Use the user-supplied API key to attempt to obtain a PIN from ecobee.
|
||||
|
|
Loading…
Add table
Reference in a new issue