mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Adjust name of Google Translate TTS provider (#124688)
This commit is contained in:
parent
55c42fde88
commit
52b6f00363
@ -74,7 +74,7 @@ class GoogleTTSEntity(TextToSpeechEntity):
|
|||||||
else:
|
else:
|
||||||
self._lang = lang
|
self._lang = lang
|
||||||
self._tld = tld
|
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
|
self._attr_unique_id = config_entry.entry_id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -130,7 +130,7 @@ class GoogleProvider(Provider):
|
|||||||
else:
|
else:
|
||||||
self._lang = lang
|
self._lang = lang
|
||||||
self._tld = tld
|
self._tld = tld
|
||||||
self.name = "Google"
|
self.name = "Google Translate"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def default_language(self) -> str:
|
def default_language(self) -> str:
|
||||||
|
@ -103,7 +103,7 @@ async def mock_config_entry_setup(hass: HomeAssistant, config: dict[str, Any]) -
|
|||||||
"mock_config_entry_setup",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
||||||
},
|
},
|
||||||
@ -160,7 +160,7 @@ async def test_tts_service(
|
|||||||
"mock_config_entry_setup",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
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",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
||||||
tts.ATTR_LANGUAGE: "de",
|
tts.ATTR_LANGUAGE: "de",
|
||||||
@ -273,7 +273,7 @@ async def test_service_say_german_service(
|
|||||||
"mock_config_entry_setup",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
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",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
||||||
tts.ATTR_LANGUAGE: "en-uk",
|
tts.ATTR_LANGUAGE: "en-uk",
|
||||||
@ -386,7 +386,7 @@ async def test_service_say_en_uk_service(
|
|||||||
"mock_config_entry_setup",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
||||||
tts.ATTR_OPTIONS: {"tld": "co.uk"},
|
tts.ATTR_OPTIONS: {"tld": "co.uk"},
|
||||||
@ -443,7 +443,7 @@ async def test_service_say_en_couk(
|
|||||||
"mock_config_entry_setup",
|
"mock_config_entry_setup",
|
||||||
"speak",
|
"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_MEDIA_PLAYER_ENTITY_ID: "media_player.something",
|
||||||
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
tts.ATTR_MESSAGE: "There is a person at the front door.",
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user