Skip to content

Commit

Permalink
Fix missing translations in onewire (#130673)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored and frenck committed Nov 15, 2024
1 parent 8d6f2e7 commit 045e285
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/onewire/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def async_step_init(
}

if not self.configurable_devices:
return self.async_abort(reason="No configurable devices found.")
return self.async_abort(reason="no_configurable_devices")

return await self.async_step_device_selection(user_input=None)

Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/onewire/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
}
},
"options": {
"abort": {
"no_configurable_devices": "No configurable devices found"
},
"error": {
"device_not_selected": "Select devices to configure"
},
Expand Down
6 changes: 1 addition & 5 deletions tests/components/onewire/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ async def test_user_options_set_multiple(
)


@pytest.mark.parametrize( # Remove when translations fixed
"ignore_translations",
["component.onewire.options.abort.No configurable devices found."],
)
async def test_user_options_no_devices(
hass: HomeAssistant, config_entry: ConfigEntry
) -> None:
Expand All @@ -267,4 +263,4 @@ async def test_user_options_no_devices(
result = await hass.config_entries.options.async_init(config_entry.entry_id)
await hass.async_block_till_done()
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "No configurable devices found."
assert result["reason"] == "no_configurable_devices"

0 comments on commit 045e285

Please sign in to comment.