From 3d7a71c27bd01913998e9bfdb10544b5919284d8 Mon Sep 17 00:00:00 2001 From: Joostlek Date: Wed, 26 Mar 2025 10:30:54 +0100 Subject: [PATCH] Fix --- homeassistant/components/smartthings/strings.json | 2 +- tests/components/smartthings/test_switch.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index 2693d172c57..92591c95410 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -480,7 +480,7 @@ }, "deprecated_switch_appliance": { "title": "Deprecated switch detected in some automations or scripts", - "description": "The switch `{entity}` is deprecated and is used in the following automations or scripts:\n{items}\n\nThe actions of the switch did not work, and it has been replaced with a binary sensor instead. Please use them in the above automations or scripts to fix this issue." + "description": "The switch `{entity}` is deprecated because the actions did not work, so it has been replaced with a binary sensor instead.\n\nThe switch was used in the following automations or scripts:\n{items}\n\nPlease use them in the above automations or scripts to fix this issue." } } } diff --git a/tests/components/smartthings/test_switch.py b/tests/components/smartthings/test_switch.py index 705b06303be..1590a8c4013 100644 --- a/tests/components/smartthings/test_switch.py +++ b/tests/components/smartthings/test_switch.py @@ -184,7 +184,10 @@ async def test_create_issue( assert scripts_with_entity(hass, entity_id)[0] == "script.test" assert len(issue_registry.issues) == 1 - assert issue_registry.async_get_issue(DOMAIN, issue_id) + issue = issue_registry.async_get_issue(DOMAIN, issue_id) + assert issue is not None + assert issue.translation_key == "deprecated_switch_appliance" + assert issue.translation_placeholders["entity"] == entity_id await hass.config_entries.async_unload(mock_config_entry.entry_id) await hass.async_block_till_done()