Speaker Components

The speaker domain contains common functionality shared across the speaker platforms.

Base Speaker Configuration

No configuration variables

Speaker Actions

All speaker actions can be used without specifying an id if you have only one speaker in your configuration YAML.

speaker.play Action

This action will start playing raw audio data from the speaker.

on_...:
  # Static raw audio data
  - speaker.play: [...]

  # Templated, return type is std::vector<uint8_t>
  - speaker.play: !lambda return {...};

  # in case you need to specify the speaker id
  - speaker.play:
      id: my_speaker
      data: [...]

Configuration variables:

  • id (Optional, ID): The speaker to control. Defaults to the only one in YAML.

  • data (Required, list of bytes): The raw audio data to play.

speaker.stop Action

This action will stop playing audio data from the speaker and discard the unplayed data.

Configuration variables:

  • id (Optional, ID): The speaker to control. Defaults to the only one in YAML.

Speaker Conditions

All speaker conditions can be used without specifying an id if you have only one speaker in your configuration YAML.

speaker.is_playing Condition

This condition will check if the speaker is currently playing audio data.

Configuration variables:

  • id (Optional, ID): The speaker to check. Defaults to the only one in YAML.

Platforms

See Also