Fix ESPHome and VoIP Assist satellite entity names (#126229)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
pull/126854/head
Michael Hansen 2024-09-26 13:22:09 -05:00 committed by GitHub
parent 185d00c86c
commit 9db5b481be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 11 deletions

View File

@ -59,6 +59,11 @@
}
},
"entity": {
"assist_satellite": {
"assist_satellite": {
"name": "[%key:component::assist_satellite::entity_component::_::name%]"
}
},
"binary_sensor": {
"assist_in_progress": {
"name": "[%key:component::assist_pipeline::entity::binary_sensor::assist_in_progress::name%]"

View File

@ -21,6 +21,7 @@ from homeassistant.components.assist_satellite import (
AssistSatelliteEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory
from homeassistant.core import Context, HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@ -79,7 +80,7 @@ class VoipAssistSatellite(VoIPEntity, AssistSatelliteEntity, RtpDatagramProtocol
entity_description = AssistSatelliteEntityDescription(key="assist_satellite")
_attr_translation_key = "assist_satellite"
_attr_has_entity_name = True
_attr_entity_category = EntityCategory.CONFIG
_attr_name = None
def __init__(

View File

@ -10,16 +10,6 @@
}
},
"entity": {
"assist_satellite": {
"assist_satellite": {
"state": {
"listening_wake_word": "[%key:component::assist_satellite::entity_component::_::state::listening_wake_word%]",
"listening_command": "[%key:component::assist_satellite::entity_component::_::state::listening_command%]",
"responding": "[%key:component::assist_satellite::entity_component::_::state::responding%]",
"processing": "[%key:component::assist_satellite::entity_component::_::state::processing%]"
}
}
},
"binary_sensor": {
"call_in_progress": {
"name": "Call in progress"

View File

@ -61,6 +61,7 @@ def get_satellite_entity(
)
if satellite_entity_id is None:
return None
assert satellite_entity_id.endswith("_assist_satellite")
component: EntityComponent[AssistSatelliteEntity] = hass.data[
assist_satellite.DOMAIN

View File

@ -57,6 +57,7 @@ def async_get_satellite_entity(
)
if satellite_entity_id is None:
return None
assert not satellite_entity_id.endswith("none")
component: EntityComponent[AssistSatelliteEntity] = hass.data[
assist_satellite.DOMAIN