File tree 1 file changed +4
-1
lines changed
custom_components/elektronny_gorod
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,9 @@ async def async_step_sms(
145
145
}
146
146
147
147
for entry in self ._async_current_entries ():
148
+ if (data [CONF_ACCESS_TOKEN ] == entry .data [CONF_ACCESS_TOKEN ]):
149
+ LOGGER .info (f"Entry { entry .data } already exists" )
150
+ return self .async_abort (reason = "already_configured" )
148
151
if (
149
152
data [CONF_NAME ] == entry .data [CONF_NAME ]
150
153
and data [CONF_ACCOUNT_ID ] == entry .data [CONF_ACCOUNT_ID ]
@@ -153,7 +156,7 @@ async def async_step_sms(
153
156
LOGGER .info (f"Reauth entry { entry .data } with params { data } " )
154
157
self .hass .config_entries .async_update_entry (entry , data = data )
155
158
await self .hass .config_entries .async_reload (entry .entry_id )
156
- return self .async_abort (reason = "reauth_successful" )
159
+ return self .async_abort (reason = "reauth_successful" )
157
160
158
161
return self .async_create_entry (title = account [CONF_NAME ], data = data )
159
162
You can’t perform that action at this time.
0 commit comments