Skip to content

Commit 7513c57

Browse files
committed
fix config flow strings
1 parent 25ef93b commit 7513c57

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

custom_components/pyscript/config_flow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ async def async_step_import(self, import_config: Dict[str, Any] = None) -> Dict[
6262
self.hass.config_entries.async_update_entry(entry=entry, data=updated_data)
6363
return self.async_abort(reason="updated_entry")
6464

65-
return self.async_abort(reason="already_configured_service")
65+
return self.async_abort(reason="already_configured")
6666

6767
return await self.async_step_user(user_input=import_config)

custom_components/pyscript/strings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
}
1111
},
1212
"abort": {
13-
"already_configured_service": "[%key:common::config_flow::abort::already_configured_service%]",
14-
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
13+
"already_configured": "Already configured.",
14+
"single_instance_allowed": "Already configured. Only a single configuration possible.",
1515
"updated_entry": "This entry has already been setup but the configuration has been updated."
1616
}
1717
}

custom_components/pyscript/translations/en.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
}
1111
},
1212
"abort": {
13-
"already_configured_service": "[%key:common::config_flow::abort::already_configured_service%]",
14-
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
13+
"already_configured": "Already configured.",
14+
"single_instance_allowed": "Already configured. Only a single configuration possible.",
1515
"updated_entry": "This entry has already been setup but the configuration has been updated."
1616
}
1717
}

tests/test_config_flow.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def test_import_flow_no_update(hass):
134134
)
135135

136136
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
137-
assert result["reason"] == "already_configured_service"
137+
assert result["reason"] == "already_configured"
138138

139139

140140
async def test_import_flow_update_user(hass):

0 commit comments

Comments
 (0)