Skip to content

Commit b0fd123

Browse files
author
Kevin Ahrendt
committed
document speaker volume_set action
1 parent ea7169b commit b0fd123

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

automations/all_actions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- **senseair:** ``abc_disable``, ``abc_enable``, ``abc_get_period``, ``background_calibration``, ``background_calibration_result``
5858
- **servo:** ``detach``, ``write``
5959
- **sim800l:** ``connect``, ``dial``, ``disconnect``, ``send_sms``, ``send_ussd``
60-
- **speaker:** ``play``, ``stop``
60+
- **speaker:** ``play``, ``stop``, ``finish``, ``volume_set``
6161
- **sprinkler:** ``clear_queued_valves``, ``next_valve``, ``pause``, ``previous_valve``, ``queue_valve``, ``resume``, ``resume_or_start_full_cycle``, ``set_divider``, ``set_multiplier``, ``set_repeat``, ``set_valve_run_duration``, ``shutdown``, ``start_from_queue``, ``start_full_cycle``, ``start_single_valve``
6262
- **sps30:** ``start_fan_autoclean``
6363
- **stepper:** ``report_position``, ``set_acceleration``, ``set_deceleration``, ``set_speed``, ``set_target``

components/speaker/index.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,31 @@ Configuration variables:
7171

7272
- **id** (*Optional*, :ref:`config-id`): The speaker to control. Defaults to the only one in YAML.
7373

74+
.. _speaker-volume_set:
75+
76+
``speaker.volume_set`` Action
77+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78+
79+
This action will set the volume of the speaker.
80+
81+
.. code-block::
82+
83+
on_...:
84+
# Simple
85+
- speaker.volume_set: 50%
86+
87+
# Full
88+
- speaker.volume_set:
89+
id: speaker_id
90+
volume: 50%
91+
92+
# Simple with lambda
93+
- speaker.volume_set: !lambda "return 0.5;"
94+
95+
Configuration variables:
96+
97+
**volume** (**Required**, percentage): The volume to set the speaker to.
98+
7499
.. _speaker-conditions:
75100

76101
Speaker Conditions

0 commit comments

Comments
 (0)