Skip to content

Commit 3e20c2e

Browse files
authored
Fix missing description placeholders in MQTT subentry flow (home-assistant#156684)
1 parent 60130d3 commit 3e20c2e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

homeassistant/components/mqtt/config_flow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4237,7 +4237,8 @@ async def async_step_entity(
42374237
return self.async_show_form(
42384238
step_id="entity",
42394239
data_schema=data_schema,
4240-
description_placeholders={
4240+
description_placeholders=TRANSLATION_DESCRIPTION_PLACEHOLDERS
4241+
| {
42414242
"mqtt_device": device_name,
42424243
"entity_name_label": entity_name_label,
42434244
"platform_label": platform_label,

tests/components/mqtt/test_config_flow.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3770,6 +3770,10 @@ async def test_subentry_configflow(
37703770
assert result["type"] is FlowResultType.FORM
37713771
assert result["step_id"] == "entity"
37723772
assert result["errors"] == {}
3773+
assert "description_placeholders" in result
3774+
for placeholder, translation in TRANSLATION_DESCRIPTION_PLACEHOLDERS.items():
3775+
assert placeholder in result["description_placeholders"]
3776+
assert result["description_placeholders"][placeholder] == translation
37733777

37743778
# Process entity flow (initial step)
37753779

0 commit comments

Comments
 (0)