This commit is contained in:
Joostlek
2025-03-26 10:30:54 +01:00
parent c6d39d38de
commit 3d7a71c27b
2 changed files with 5 additions and 2 deletions

View File

@@ -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."
}
}
}

View File

@@ -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()