From 36d8e87f43ed753211bf774b4e3d83f508d06e2e Mon Sep 17 00:00:00 2001 From: rwrozelle Date: Wed, 30 Jul 2025 20:20:02 -0400 Subject: [PATCH 1/2] Update speaker.rst --- components/media_player/speaker.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/media_player/speaker.rst b/components/media_player/speaker.rst index e3cc6be9c8..ac1f683bab 100644 --- a/components/media_player/speaker.rst +++ b/components/media_player/speaker.rst @@ -46,6 +46,7 @@ Configuration variables: - **media_pipeline** (*Optional*, Pipeline Schema): Configuration settings for the media pipeline. Same options as the ``announcement_pipeline``. - **buffer_size** (*Optional*, positive integer): The buffer size in bytes for each pipeline. Must be between ``4000`` and ``4000000``. Defaults to ``1000000``. - **codec_support_enabled** (*Optional*, boolean): Enables the MP3 and FLAC decoders and optimizes the WiFi configuration for streaming high quality audio. Defaults to ``true``. +- **off_on_enabled** (*Optional*, boolean): Enables the supports_turn_off_on trait. This enables additional states, actions, triggers, and conditions. Defaults to ``false``. - **task_stack_in_psram** (*Optional*, boolean): Run the audio tasks in external memory. Defaults to ``false``. - **volume_increment** (*Optional*, percentage): Increment amount that the ``media_player.volume_up`` and ``media_player.volume_down`` actions will increase or decrease volume by. Defaults to ``5%``. - **volume_initial** (*Optional*, percentage): The default volume that mediaplayer uses for first boot where a volume has not been previously saved. Defaults to ``50%``. @@ -57,6 +58,8 @@ Configuration variables: - **on_mute** (*Optional*, :ref:`Automation `): An automation to perform when muted. - **on_unmute** (*Optional*, :ref:`Automation `): An automation to perform when unmuted. - **on_volume** (*Optional*, :ref:`Automation `): An automation to perform when the volume is changed. +- **on_turn_off** (*Optional*, :ref:`Automation `): An automation to perform when media_player is turned off, only available if off_on_enabled is true. +- **on_turn_on** (*Optional*, :ref:`Automation `): An automation to perform when media_player is turned on, only available if off_on_enabled is true. - All other options from :ref:`Media Player ` .. _media_player-speaker-examples: From be4f6d3c2a5e5ce4e07452c3aee8c19e4260655b Mon Sep 17 00:00:00 2001 From: rwrozelle Date: Thu, 4 Sep 2025 10:31:55 -0400 Subject: [PATCH 2/2] Update speaker.md --- content/components/media_player/speaker.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/components/media_player/speaker.md b/content/components/media_player/speaker.md index 8aad3a5362..7ea6f37e41 100644 --- a/content/components/media_player/speaker.md +++ b/content/components/media_player/speaker.md @@ -48,6 +48,7 @@ media_player: - **media_pipeline** (*Optional*, Pipeline Schema): Configuration settings for the media pipeline. Same options as the `announcement_pipeline`. - **buffer_size** (*Optional*, positive integer): The buffer size in bytes for each pipeline. Must be between `4000` and `4000000`. Defaults to `1000000`. - **codec_support_enabled** (*Optional*, boolean): Enables the MP3 and FLAC decoders and optimizes the WiFi configuration for streaming high quality audio. Defaults to `true`. +- **off_on_enabled** (*Optional*, boolean): Enables the supports_turn_off_on trait. This enables additional states, actions, triggers, and conditions. Defaults to ``false``. - **task_stack_in_psram** (*Optional*, boolean): Run the audio tasks in external memory. Defaults to `false`. - **volume_increment** (*Optional*, percentage): Increment amount that the `media_player.volume_up` and `media_player.volume_down` actions will increase or decrease volume by. Defaults to `5%`. - **volume_initial** (*Optional*, percentage): The default volume that mediaplayer uses for first boot where a volume has not been previously saved. Defaults to `50%`. @@ -59,6 +60,8 @@ media_player: - **on_mute** (*Optional*, [Automation](#automation)): An automation to perform when muted. - **on_unmute** (*Optional*, [Automation](#automation)): An automation to perform when unmuted. - **on_volume** (*Optional*, [Automation](#automation)): An automation to perform when the volume is changed. +- **on_turn_off** (*Optional*, :ref:`Automation `): An automation to perform when media_player is turned off, only available if off_on_enabled is true. +- **on_turn_on** (*Optional*, :ref:`Automation `): An automation to perform when media_player is turned on, only available if off_on_enabled is true. - All other options from [Media Player](#config-media_player) {{< anchor "media_player-speaker-examples" >}}