Fix missing translations in onewire (#130673)

This commit is contained in:
epenet 2024-11-15 08:40:57 +01:00 committed by GitHub
parent 5806304d79
commit ae95d802cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 6 deletions

View File

@ -144,7 +144,7 @@ class OnewireOptionsFlowHandler(OptionsFlow):
}
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)

View File

@ -94,6 +94,9 @@
}
},
"options": {
"abort": {
"no_configurable_devices": "No configurable devices found"
},
"error": {
"device_not_selected": "Select devices to configure"
},

View File

@ -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:
@ -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"