Skip to content

Commit

Permalink
Removed stale translation and improved set_setting translation at H…
Browse files Browse the repository at this point in the history
…ome Connect (home-assistant#129878)
  • Loading branch information
Diegorro98 authored and frenck committed Nov 5, 2024
1 parent d671341 commit b71c437
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 1 addition & 4 deletions homeassistant/components/home_connect/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@
"set_light_color": {
"message": "Error while trying to set color of {entity_id}: {description}"
},
"set_light_effect": {
"message": "Error while trying to set effect of {entity_id}: {description}"
},
"set_setting": {
"message": "Error while trying to set \"{value}\" to \"{key}\" setting for {entity_id}: {description}"
"message": "Error while trying to assign the value \"{value}\" to the setting \"{key}\" for {entity_id}: {description}"
},
"turn_on": {
"message": "Error while trying to turn on {entity_id} ({key}): {description}"
Expand Down
4 changes: 3 additions & 1 deletion tests/components/home_connect/test_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ async def test_number_entity_error(
with pytest.raises(HomeConnectError):
getattr(problematic_appliance, mock_attr)()

with pytest.raises(ServiceValidationError, match=r"Error.*set.*setting.*"):
with pytest.raises(
ServiceValidationError, match=r"Error.*assign.*value.*to.*setting.*"
):
await hass.services.async_call(
NUMBER_DOMAIN,
SERVICE_SET_VALUE,
Expand Down
4 changes: 3 additions & 1 deletion tests/components/home_connect/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ async def test_time_entity_error(
with pytest.raises(HomeConnectError):
getattr(problematic_appliance, mock_attr)()

with pytest.raises(ServiceValidationError, match=r"Error.*set.*setting.*"):
with pytest.raises(
ServiceValidationError, match=r"Error.*assign.*value.*to.*setting.*"
):
await hass.services.async_call(
TIME_DOMAIN,
SERVICE_SET_VALUE,
Expand Down

0 comments on commit b71c437

Please sign in to comment.