From 40ad369b4e2c3940dc958c4e68725b168516dfa2 Mon Sep 17 00:00:00 2001 From: WeekendWarrior1 Date: Mon, 5 Jul 2021 11:22:54 +1000 Subject: [PATCH] add stepper accel and decel to docs (#1288) --- components/stepper/index.rst | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/components/stepper/index.rst b/components/stepper/index.rst index a9bffdeff..318346bb2 100644 --- a/components/stepper/index.rst +++ b/components/stepper/index.rst @@ -228,6 +228,46 @@ Configuration variables: - **speed** (**Required**, :ref:`templatable `, float): The speed in ``steps/s`` (steps per seconds) to drive the stepper at. +.. _stepper-set_acceleration_action: + +``stepper.set_acceleration`` Action +----------------------------------- + +This :ref:`Action ` allows you to set the acceleration of a stepper at runtime. + +.. code-block:: yaml + + on_...: + - stepper.set_acceleration: + id: my_stepper + speed: 250 steps/s^2 + +Configuration variables: + +- **id** (**Required**, :ref:`config-id`): The ID of the stepper. +- **acceleration** (**Required**, :ref:`templatable `, float): The acceleration + in ``steps/s^2`` (steps per seconds squared) to use when starting to move. + +.. _stepper-set_deceleration_action: + +``stepper.set_deceleration`` Action +----------------------------------- + +This :ref:`Action ` allows you to set the deceleration of a stepper at runtime. + +.. code-block:: yaml + + on_...: + - stepper.set_deceleration: + id: my_stepper + speed: 250 steps/s^2 + +Configuration variables: + +- **id** (**Required**, :ref:`config-id`): The ID of the stepper. +- **deceleration** (**Required**, :ref:`templatable `, float): The same as ``acceleration``, + but for when the motor is decelerating shortly before reaching the set position. + .. _stepper-ha-config: Home Assistant Configuration