Skip to content

Commit

Permalink
Add title to reauthenticate integration issue (#111275)
Browse files Browse the repository at this point in the history
* Add title to reauthenticate integration issue

* Fix translation placeholder in test

* Update translation placeholders in test_init.py

* Update integration reauthentication message

* Update string
  • Loading branch information
timmo001 authored and balloob committed Feb 27, 2024
1 parent 367aaf9 commit 6b5735c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions homeassistant/config_entries.py
Expand Up @@ -828,6 +828,7 @@ async def _async_init_reauth(
issue_domain=self.domain,
severity=ir.IssueSeverity.ERROR,
translation_key="config_entry_reauth",
translation_placeholders={"name": self.title},
)

@callback
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/strings.json
Expand Up @@ -68,7 +68,7 @@
"config_flow": {
"title": {
"oauth2_pick_implementation": "Pick authentication method",
"reauth": "Reauthenticate integration",
"reauth": "Authentication expired for {name}",
"via_hassio_addon": "{name} via Home Assistant add-on"
},
"description": {
Expand Down
4 changes: 2 additions & 2 deletions tests/components/kitchen_sink/test_init.py
Expand Up @@ -205,7 +205,7 @@ async def test_issues_created(
"learn_more_url": None,
"severity": "error",
"translation_key": "config_entry_reauth",
"translation_placeholders": None,
"translation_placeholders": {"name": "Kitchen Sink"},
"ignored": False,
},
]
Expand Down Expand Up @@ -322,7 +322,7 @@ async def test_issues_created(
"learn_more_url": None,
"severity": "error",
"translation_key": "config_entry_reauth",
"translation_placeholders": None,
"translation_placeholders": {"name": "Kitchen Sink"},
"ignored": False,
},
]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config_entries.py
Expand Up @@ -963,7 +963,7 @@ async def test_reauth_issue(hass: HomeAssistant) -> None:
learn_more_url=None,
severity=ir.IssueSeverity.ERROR,
translation_key="config_entry_reauth",
translation_placeholders=None,
translation_placeholders={"name": "test_title"},
)

result = await hass.config_entries.flow.async_configure(issue.data["flow_id"], {})
Expand Down

0 comments on commit 6b5735c

Please sign in to comment.