diff --git a/homeassistant/components/esphome/assist_satellite.py b/homeassistant/components/esphome/assist_satellite.py index b2794fe043f..019cf3e47ac 100644 --- a/homeassistant/components/esphome/assist_satellite.py +++ b/homeassistant/components/esphome/assist_satellite.py @@ -247,15 +247,15 @@ class EsphomeAssistSatellite( assist_satellite.AssistSatelliteEntityFeature.ANNOUNCE ) + # Block until config is retrieved. + # If the device supports announcements, it will return a config. + _LOGGER.debug("Waiting for satellite configuration") + await self._update_satellite_config() + if not (feature_flags & VoiceAssistantFeature.SPEAKER): # Will use media player for TTS/announcements self._update_tts_format() - # Fetch latest config in the background - self.config_entry.async_create_background_task( - self.hass, self._update_satellite_config(), "esphome_voice_assistant_config" - ) - async def async_will_remove_from_hass(self) -> None: """Run when entity will be removed from hass.""" await super().async_will_remove_from_hass() diff --git a/tests/components/esphome/test_assist_satellite.py b/tests/components/esphome/test_assist_satellite.py index b2c44af2cf9..e8344e50161 100644 --- a/tests/components/esphome/test_assist_satellite.py +++ b/tests/components/esphome/test_assist_satellite.py @@ -1448,6 +1448,7 @@ async def test_get_set_configuration( states=[], device_info={ "voice_assistant_feature_flags": VoiceAssistantFeature.VOICE_ASSISTANT + | VoiceAssistantFeature.ANNOUNCE }, ) await hass.async_block_till_done()