Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions homeassistant/components/icloud/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
import voluptuous as vol

from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
from homeassistant.config_entries import SOURCE_USER, ConfigFlow, ConfigFlowResult
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.helpers.storage import Store

Expand Down Expand Up @@ -155,8 +155,8 @@ async def _validate_and_create_entry(self, user_input, step_id):
CONF_GPS_ACCURACY_THRESHOLD: self._gps_accuracy_threshold,
}

# If this is a password update attempt, update the entry instead of creating one
if step_id == "user":
# If this is a password update attempt, don't try and creating one
if self.source == SOURCE_USER:
return self.async_create_entry(title=self._username, data=data)

entry = await self.async_set_unique_id(self.unique_id)
Expand Down
Loading