Add title to reauthenticate integration issue (#111275)

* Add title to reauthenticate integration issue

* Fix translation placeholder in test

* Update translation placeholders in test_init.py

* Update integration reauthentication message

* Update string
This commit is contained in:
Aidan Timson 2024-02-26 13:19:37 +00:00 committed by GitHub
parent 0947bdbd20
commit 9f77e275e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View file

@ -891,6 +891,7 @@ class ConfigEntry:
issue_domain=self.domain,
severity=ir.IssueSeverity.ERROR,
translation_key="config_entry_reauth",
translation_placeholders={"name": self.title},
)
@callback

View file

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

View file

@ -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,
},
]
@ -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,
},
]

View file

@ -1044,7 +1044,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"], {})