diff --git a/homeassistant/components/assist_pipeline/strings.json b/homeassistant/components/assist_pipeline/strings.json index 8ee0ad286b9..d85eb1aaed9 100644 --- a/homeassistant/components/assist_pipeline/strings.json +++ b/homeassistant/components/assist_pipeline/strings.json @@ -1,8 +1,13 @@ { "entity": { + "binary_sensor": { + "assist_in_progress": { + "name": "Assist in progress" + } + }, "select": { "pipeline": { - "name": "Assist Pipeline", + "name": "Assist pipeline", "state": { "preferred": "Preferred" } diff --git a/homeassistant/components/esphome/binary_sensor.py b/homeassistant/components/esphome/binary_sensor.py index ccfa4306880..77ec780acb3 100644 --- a/homeassistant/components/esphome/binary_sensor.py +++ b/homeassistant/components/esphome/binary_sensor.py @@ -34,7 +34,7 @@ async def async_setup_entry( entry_data = DomainData.get(hass).get_entry_data(entry) assert entry_data.device_info is not None if entry_data.device_info.voice_assistant_version: - async_add_entities([EsphomeCallActiveBinarySensor(entry_data)]) + async_add_entities([EsphomeAssistInProgressBinarySensor(entry_data)]) class EsphomeBinarySensor( @@ -68,12 +68,12 @@ class EsphomeBinarySensor( return super().available -class EsphomeCallActiveBinarySensor(EsphomeAssistEntity, BinarySensorEntity): +class EsphomeAssistInProgressBinarySensor(EsphomeAssistEntity, BinarySensorEntity): """A binary sensor implementation for ESPHome for use with assist_pipeline.""" entity_description = BinarySensorEntityDescription( - key="call_active", - translation_key="call_active", + key="assist_in_progress", + translation_key="assist_in_progress", ) @property diff --git a/homeassistant/components/esphome/strings.json b/homeassistant/components/esphome/strings.json index 7171339ac0a..81350c2c653 100644 --- a/homeassistant/components/esphome/strings.json +++ b/homeassistant/components/esphome/strings.json @@ -48,8 +48,8 @@ }, "entity": { "binary_sensor": { - "call_active": { - "name": "Call Active" + "assist_in_progress": { + "name": "[%key:component::assist_pipeline::entity::binary_sensor::assist_in_progress::name%]" } }, "select": { diff --git a/homeassistant/components/voip/binary_sensor.py b/homeassistant/components/voip/binary_sensor.py index 70ecb870984..8eeefbd5d94 100644 --- a/homeassistant/components/voip/binary_sensor.py +++ b/homeassistant/components/voip/binary_sensor.py @@ -31,19 +31,19 @@ async def async_setup_entry( @callback def async_add_device(device: VoIPDevice) -> None: """Add device.""" - async_add_entities([VoIPCallActive(device)]) + async_add_entities([VoIPCallInProgress(device)]) domain_data.devices.async_add_new_device_listener(async_add_device) - async_add_entities([VoIPCallActive(device) for device in domain_data.devices]) + async_add_entities([VoIPCallInProgress(device) for device in domain_data.devices]) -class VoIPCallActive(VoIPEntity, BinarySensorEntity): - """Entity to represent voip is allowed.""" +class VoIPCallInProgress(VoIPEntity, BinarySensorEntity): + """Entity to represent voip call is in progress.""" entity_description = BinarySensorEntityDescription( - key="call_active", - translation_key="call_active", + key="call_in_progress", + translation_key="call_in_progress", ) _attr_is_on = False diff --git a/homeassistant/components/voip/strings.json b/homeassistant/components/voip/strings.json index 6eb9d36df73..83931d42c57 100644 --- a/homeassistant/components/voip/strings.json +++ b/homeassistant/components/voip/strings.json @@ -11,13 +11,13 @@ }, "entity": { "binary_sensor": { - "call_active": { - "name": "Call Active" + "call_in_progress": { + "name": "Call in progress" } }, "switch": { "allow_call": { - "name": "Allow Calls" + "name": "Allow calls" } }, "select": { diff --git a/tests/components/esphome/test_binary_sensor.py b/tests/components/esphome/test_binary_sensor.py index 90cf99747f0..3f780f3003d 100644 --- a/tests/components/esphome/test_binary_sensor.py +++ b/tests/components/esphome/test_binary_sensor.py @@ -5,24 +5,24 @@ from homeassistant.components.esphome import DomainData from homeassistant.core import HomeAssistant -async def test_call_active( +async def test_assist_in_progress( hass: HomeAssistant, mock_voice_assistant_v1_entry, ) -> None: - """Test call active binary sensor.""" + """Test assist in progress binary sensor.""" entry_data = DomainData.get(hass).get_entry_data(mock_voice_assistant_v1_entry) - state = hass.states.get("binary_sensor.test_call_active") + state = hass.states.get("binary_sensor.test_assist_in_progress") assert state is not None assert state.state == "off" entry_data.async_set_assist_pipeline_state(True) - state = hass.states.get("binary_sensor.test_call_active") + state = hass.states.get("binary_sensor.test_assist_in_progress") assert state.state == "on" entry_data.async_set_assist_pipeline_state(False) - state = hass.states.get("binary_sensor.test_call_active") + state = hass.states.get("binary_sensor.test_assist_in_progress") assert state.state == "off" diff --git a/tests/components/voip/test_binary_sensor.py b/tests/components/voip/test_binary_sensor.py index 67a0bef0f62..794d307ee01 100644 --- a/tests/components/voip/test_binary_sensor.py +++ b/tests/components/voip/test_binary_sensor.py @@ -4,22 +4,22 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant -async def test_allow_call( +async def test_call_in_progress( hass: HomeAssistant, config_entry: ConfigEntry, voip_device: VoIPDevice, ) -> None: - """Test allow call.""" - state = hass.states.get("binary_sensor.192_168_1_210_call_active") + """Test call in progress.""" + state = hass.states.get("binary_sensor.192_168_1_210_call_in_progress") assert state is not None assert state.state == "off" voip_device.set_is_active(True) - state = hass.states.get("binary_sensor.192_168_1_210_call_active") + state = hass.states.get("binary_sensor.192_168_1_210_call_in_progress") assert state.state == "on" voip_device.set_is_active(False) - state = hass.states.get("binary_sensor.192_168_1_210_call_active") + state = hass.states.get("binary_sensor.192_168_1_210_call_in_progress") assert state.state == "off"