Remove translations from WS get_services and REST /api/services (#147120)

This commit is contained in:
Erik Montnemery
2025-10-23 17:26:33 +02:00
committed by GitHub
parent 1ac2ae3443
commit a020a32d8a
9 changed files with 79 additions and 183 deletions

View File

@@ -601,7 +601,7 @@ async def test_translated_unit(
"""Test translated unit."""
with patch(
"homeassistant.helpers.service.translation.async_get_translations",
"homeassistant.helpers.entity_platform.translation.async_get_translations",
return_value={
"component.test.entity.sensor.test_translation_key.unit_of_measurement": "Tests"
},
@@ -633,7 +633,7 @@ async def test_translated_unit_with_native_unit_raises(
"""Test that translated unit."""
with patch(
"homeassistant.helpers.service.translation.async_get_translations",
"homeassistant.helpers.entity_platform.translation.async_get_translations",
return_value={
"component.test.entity.sensor.test_translation_key.unit_of_measurement": "Tests"
},
@@ -664,7 +664,7 @@ async def test_unit_translation_key_without_platform_raises(
"""Test that unit translation key property raises if the entity has no platform yet."""
with patch(
"homeassistant.helpers.service.translation.async_get_translations",
"homeassistant.helpers.entity_platform.translation.async_get_translations",
return_value={
"component.test.entity.sensor.test_translation_key.unit_of_measurement": "Tests"
},