Update kitchen_sink
parent
92dad98b14
commit
c0ef7212b2
|
@ -43,7 +43,7 @@ class KitchenSinkConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
cls, config_entry: ConfigEntry
|
||||
) -> dict[str, type[ConfigSubentryFlow]]:
|
||||
"""Return subentries supported by this handler."""
|
||||
return {"add_entity": SubentryFlowHandler}
|
||||
return {"entity": SubentryFlowHandler}
|
||||
|
||||
async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult:
|
||||
"""Set the config entry up from yaml."""
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
}
|
||||
},
|
||||
"config_subentries": {
|
||||
"add_entity": {
|
||||
"entity": {
|
||||
"title": "Add entity",
|
||||
"step": {
|
||||
"add_sensor": {
|
||||
|
|
|
@ -116,7 +116,7 @@ async def test_subentry_flow(hass: HomeAssistant) -> None:
|
|||
await hass.async_block_till_done()
|
||||
|
||||
result = await hass.config_entries.subentries.async_init(
|
||||
(config_entry.entry_id, "add_entity"),
|
||||
(config_entry.entry_id, "entity"),
|
||||
context={"source": config_entries.SOURCE_USER},
|
||||
)
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
|
@ -132,7 +132,7 @@ async def test_subentry_flow(hass: HomeAssistant) -> None:
|
|||
subentry_id: config_entries.ConfigSubentry(
|
||||
data={"state": 15},
|
||||
subentry_id=subentry_id,
|
||||
subentry_type="add_entity",
|
||||
subentry_type="entity",
|
||||
title="Sensor 1",
|
||||
unique_id=None,
|
||||
)
|
||||
|
@ -151,7 +151,7 @@ async def test_subentry_reconfigure_flow(hass: HomeAssistant) -> None:
|
|||
config_entries.ConfigSubentryData(
|
||||
data={"state": 15},
|
||||
subentry_id="mock_id",
|
||||
subentry_type="add_entity",
|
||||
subentry_type="entity",
|
||||
title="Sensor 1",
|
||||
unique_id=None,
|
||||
)
|
||||
|
@ -163,7 +163,7 @@ async def test_subentry_reconfigure_flow(hass: HomeAssistant) -> None:
|
|||
await hass.async_block_till_done()
|
||||
|
||||
result = await config_entry.start_subentry_reconfigure_flow(
|
||||
hass, "add_entity", subentry_id
|
||||
hass, "entity", subentry_id
|
||||
)
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "reconfigure_sensor"
|
||||
|
@ -179,7 +179,7 @@ async def test_subentry_reconfigure_flow(hass: HomeAssistant) -> None:
|
|||
subentry_id: config_entries.ConfigSubentry(
|
||||
data={"state": 5},
|
||||
subentry_id=subentry_id,
|
||||
subentry_type="add_entity",
|
||||
subentry_type="entity",
|
||||
title="Renamed sensor 1",
|
||||
unique_id=None,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue