Adjust name of Google Translate TTS provider (#124688)

This commit is contained in:
Erik Montnemery 2024-08-27 19:07:04 +02:00 committed by GitHub
parent 55c42fde88
commit 52b6f00363
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 9 deletions

View file

@ -74,7 +74,7 @@ class GoogleTTSEntity(TextToSpeechEntity):
else:
self._lang = lang
self._tld = tld
self._attr_name = f"Google {self._lang} {self._tld}"
self._attr_name = f"Google Translate {self._lang} {self._tld}"
self._attr_unique_id = config_entry.entry_id
@property
@ -130,7 +130,7 @@ class GoogleProvider(Provider):
else:
self._lang = lang
self._tld = tld
self.name = "Google"
self.name = "Google Translate"
@property
def default_language(self) -> str:

View file

@ -103,7 +103,7 @@ async def mock_config_entry_setup(hass: HomeAssistant, config: dict[str, Any]) -
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_en_com",
ATTR_ENTITY_ID: "tts.google_translate_en_com",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
},
@ -160,7 +160,7 @@ async def test_tts_service(
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_de_com",
ATTR_ENTITY_ID: "tts.google_translate_de_com",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
},
@ -216,7 +216,7 @@ async def test_service_say_german_config(
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_en_com",
ATTR_ENTITY_ID: "tts.google_translate_en_com",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
tts.ATTR_LANGUAGE: "de",
@ -273,7 +273,7 @@ async def test_service_say_german_service(
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_en_co_uk",
ATTR_ENTITY_ID: "tts.google_translate_en_co_uk",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
},
@ -329,7 +329,7 @@ async def test_service_say_en_uk_config(
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_en_com",
ATTR_ENTITY_ID: "tts.google_translate_en_com",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
tts.ATTR_LANGUAGE: "en-uk",
@ -386,7 +386,7 @@ async def test_service_say_en_uk_service(
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_en_com",
ATTR_ENTITY_ID: "tts.google_translate_en_com",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
tts.ATTR_OPTIONS: {"tld": "co.uk"},
@ -443,7 +443,7 @@ async def test_service_say_en_couk(
"mock_config_entry_setup",
"speak",
{
ATTR_ENTITY_ID: "tts.google_en_com",
ATTR_ENTITY_ID: "tts.google_translate_en_com",
tts.ATTR_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
tts.ATTR_MESSAGE: "There is a person at the front door.",
},