Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite Class Reference
Inheritance diagram for homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite:
[legend]
Collaboration diagram for homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite:
[legend]

Public Member Functions

None __init__ (self, ConfigEntry config_entry, RuntimeEntryData entry_data)
 
None async_added_to_hass (self)
 
None async_announce (self, assist_satellite.AssistSatelliteAnnouncement announcement)
 
assist_satellite.AssistSatelliteConfiguration async_get_configuration (self)
 
None async_set_configuration (self, assist_satellite.AssistSatelliteConfiguration config)
 
None async_set_wake_word (self, str wake_word_id)
 
None async_will_remove_from_hass (self)
 
None handle_announcement_finished (self, VoiceAssistantAnnounceFinished announce_finished)
 
None handle_audio (self, bytes data)
 
None handle_pipeline_finished (self)
 
int|None handle_pipeline_start (self, str conversation_id, int flags, VoiceAssistantAudioSettings audio_settings, str|None wake_word_phrase)
 
None handle_pipeline_stop (self, bool abort)
 
None handle_timer_event (self, TimerEventType event_type, TimerInfo timer_info)
 
None on_pipeline_event (self, PipelineEvent event)
 
str|None pipeline_entity_id (self)
 
str|None vad_sensitivity_entity_id (self)
 
- Public Member Functions inherited from homeassistant.components.esphome.entity.EsphomeAssistEntity
None __init__ (self, RuntimeEntryData entry_data)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
dict[str, Any]|None capability_attributes (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
StateType state (self)
 
dict[str, Any]|None state_attributes (self)
 
str|None suggested_object_id (self)
 
int|None supported_features (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.components.assist_satellite.entity.AssistSatelliteEntity
None async_accept_pipeline_from_satellite (self, AsyncIterable[bytes] audio_stream, PipelineStage start_stage=PipelineStage.STT, PipelineStage end_stage=PipelineStage.TTS, str|None wake_word_phrase=None)
 
None async_announce (self, AssistSatelliteAnnouncement announcement)
 
str|None async_intercept_wake_word (self)
 
None async_internal_announce (self, str|None message=None, str|None media_id=None)
 
None async_set_configuration (self, AssistSatelliteConfiguration config)
 
str|None state (self)
 
dict[str, Any]|None tts_options (self)
 
None tts_response_finished (self)
 

Public Attributes

 cli
 
 config_entry
 
 entry_data
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 

Static Public Attributes

 entity_description
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 
- Static Public Attributes inherited from homeassistant.components.assist_satellite.entity.AssistSatelliteEntity
 bool
 
 None
 

Private Member Functions

None _abort_pipeline (self)
 
int _start_udp_server (self)
 
None _stop_pipeline (self)
 
None _stop_udp_server (self)
 
None _stream_tts_audio (self, str media_id, int sample_rate=16000, int sample_width=2, int sample_channels=1, int samples_per_chunk=512)
 
None _update_satellite_config (self)
 
None _update_tts_format (self)
 
AsyncIterable[bytes] _wrap_audio_stream (self)
 

Private Attributes

 _attr_tts_options
 
 _is_running
 
 _pipeline_task
 
 _satellite_config
 
 _tts_streaming_task
 
 _udp_server
 

Detailed Description

Satellite running ESPHome.

Definition at line 101 of file assist_satellite.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.__init__ (   self,
ConfigEntry  config_entry,
RuntimeEntryData  entry_data 
)
Initialize satellite.

Definition at line 110 of file assist_satellite.py.

Member Function Documentation

◆ _abort_pipeline()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._abort_pipeline (   self)
private
Request pipeline to be aborted (no further processing).

Definition at line 603 of file assist_satellite.py.

◆ _start_udp_server()

int homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._start_udp_server (   self)
private
Start a UDP server on a random free port.

Definition at line 610 of file assist_satellite.py.

◆ _stop_pipeline()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._stop_pipeline (   self)
private
Request pipeline to be stopped by ending the audio stream and continue processing.

Definition at line 598 of file assist_satellite.py.

◆ _stop_udp_server()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._stop_udp_server (   self)
private
Stop the UDP server if it's running.

Definition at line 629 of file assist_satellite.py.

◆ _stream_tts_audio()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._stream_tts_audio (   self,
str  media_id,
int   sample_rate = 16000,
int   sample_width = 2,
int   sample_channels = 1,
int   samples_per_chunk = 512 
)
private
Stream TTS audio chunks to device via API or UDP.

Definition at line 524 of file assist_satellite.py.

◆ _update_satellite_config()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._update_satellite_config (   self)
private
Get the latest satellite configuration from the device.

Definition at line 174 of file assist_satellite.py.

◆ _update_tts_format()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._update_tts_format (   self)
private
Update the TTS format from the first media player.

Definition at line 498 of file assist_satellite.py.

◆ _wrap_audio_stream()

AsyncIterable[bytes] homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._wrap_audio_stream (   self)
private
Yield audio chunks from the queue until None.

Definition at line 589 of file assist_satellite.py.

◆ async_added_to_hass()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.async_added_to_hass (   self)
Run when entity about to be added to hass.

Reimplemented from homeassistant.components.esphome.entity.EsphomeAssistEntity.

Definition at line 200 of file assist_satellite.py.

◆ async_announce()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.async_announce (   self,
assist_satellite.AssistSatelliteAnnouncement   announcement 
)
Announce media on the satellite.

Should block until the announcement is done playing.

Definition at line 335 of file assist_satellite.py.

◆ async_get_configuration()

assist_satellite.AssistSatelliteConfiguration homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.async_get_configuration (   self)
Get the current satellite configuration.

Reimplemented from homeassistant.components.assist_satellite.entity.AssistSatelliteEntity.

Definition at line 156 of file assist_satellite.py.

◆ async_set_configuration()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.async_set_configuration (   self,
assist_satellite.AssistSatelliteConfiguration   config 
)
Set the current satellite configuration.

Definition at line 162 of file assist_satellite.py.

◆ async_set_wake_word()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.async_set_wake_word (   self,
str  wake_word_id 
)
Set active wake word and update config on satellite.

Definition at line 488 of file assist_satellite.py.

◆ async_will_remove_from_hass()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.async_will_remove_from_hass (   self)
Run when entity will be removed from hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 263 of file assist_satellite.py.

◆ handle_announcement_finished()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.handle_announcement_finished (   self,
VoiceAssistantAnnounceFinished   announce_finished 
)
Handle announcement finished message (also sent for TTS).

Definition at line 481 of file assist_satellite.py.

◆ handle_audio()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.handle_audio (   self,
bytes  data 
)
Handle incoming audio chunk from API.

Definition at line 446 of file assist_satellite.py.

◆ handle_pipeline_finished()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.handle_pipeline_finished (   self)
Handle when pipeline has finished running.

Definition at line 457 of file assist_satellite.py.

◆ handle_pipeline_start()

int | None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.handle_pipeline_start (   self,
str  conversation_id,
int  flags,
VoiceAssistantAudioSettings  audio_settings,
str | None  wake_word_phrase 
)
Handle pipeline run request.

Definition at line 377 of file assist_satellite.py.

◆ handle_pipeline_stop()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.handle_pipeline_stop (   self,
bool  abort 
)
Handle request for pipeline to stop.

Definition at line 450 of file assist_satellite.py.

◆ handle_timer_event()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.handle_timer_event (   self,
TimerEventType  event_type,
TimerInfo   timer_info 
)
Handle timer events.

Definition at line 462 of file assist_satellite.py.

◆ on_pipeline_event()

None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.on_pipeline_event (   self,
PipelineEvent  event 
)
Handle pipeline events.

Reimplemented from homeassistant.components.assist_satellite.entity.AssistSatelliteEntity.

Definition at line 270 of file assist_satellite.py.

◆ pipeline_entity_id()

str | None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.pipeline_entity_id (   self)
Return the entity ID of the pipeline to use for the next conversation.

Reimplemented from homeassistant.components.assist_satellite.entity.AssistSatelliteEntity.

Definition at line 134 of file assist_satellite.py.

◆ vad_sensitivity_entity_id()

str | None homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.vad_sensitivity_entity_id (   self)
Return the entity ID of the VAD sensitivity to use for the next conversation.

Reimplemented from homeassistant.components.assist_satellite.entity.AssistSatelliteEntity.

Definition at line 145 of file assist_satellite.py.

Member Data Documentation

◆ _attr_tts_options

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._attr_tts_options
private

Definition at line 418 of file assist_satellite.py.

◆ _is_running

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._is_running
private

Definition at line 267 of file assist_satellite.py.

◆ _pipeline_task

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._pipeline_task
private

Definition at line 430 of file assist_satellite.py.

◆ _satellite_config

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._satellite_config
private

Definition at line 129 of file assist_satellite.py.

◆ _tts_streaming_task

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._tts_streaming_task
private

Definition at line 307 of file assist_satellite.py.

◆ _udp_server

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite._udp_server
private

Definition at line 624 of file assist_satellite.py.

◆ cli

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.cli

Definition at line 120 of file assist_satellite.py.

◆ config_entry

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.config_entry

Definition at line 118 of file assist_satellite.py.

◆ entity_description

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.entity_description
static
Initial value:
= assist_satellite.AssistSatelliteEntityDescription(
key="assist_satellite", translation_key="assist_satellite"
)

Definition at line 106 of file assist_satellite.py.

◆ entry_data

homeassistant.components.esphome.assist_satellite.EsphomeAssistSatellite.entry_data

Definition at line 119 of file assist_satellite.py.


The documentation for this class was generated from the following file: