Skip to content

Commit

Permalink
Repair of a bug in config flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvejsada committed Feb 15, 2024
1 parent 43ae6c4 commit 3fd02e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pid_integration/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
async def async_step_user(self, user_input=None):

# Check for any previous instance of the integration and preload the API key.
if len(list(self.hass.data[DOMAIN].keys())) != 0:
if DOMAIN in list(self.hass.data.keys()):
data_schema = vol.Schema(
{vol.Required(CONF_ID): str, vol.Required(CONF_API_KEY, default=self.hass.data[DOMAIN][list(self.hass.data[DOMAIN].keys())[0]].api_key): str,
vol.Required(CONF_DEP_NUM): int}
Expand Down

0 comments on commit 3fd02e8

Please sign in to comment.