From c62e7aed59ab610a931f1b4e32c5cb1cc818ba1d Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 16 Oct 2023 20:47:55 +0100 Subject: [PATCH] Include multi conf and change address for TB6612FNG (#3267) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- components/grove_tb6612fng.rst | 38 +++++++++++++++------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/components/grove_tb6612fng.rst b/components/grove_tb6612fng.rst index 26ac3a071..eebda11fc 100644 --- a/components/grove_tb6612fng.rst +++ b/components/grove_tb6612fng.rst @@ -14,28 +14,10 @@ At the current stage of implementation only DC motor is implemented. .. code-block:: yaml - # Example configuration grove motor + # Example configuration grove_tb6612fng: + - address: 0x14 id: test_motor - name: motor_outside - address: 0x14 - - # Example switch trigger - switch: - - platform: template - name: open_vent - id: open_vent - optimistic: True - on_turn_on: - then: - - grove_tb6612fng.run: - channel: 1 - speed: 255 - direction: BACKWARD - id: test_motor - - delay: 10s - - switch.turn_on: stop_motor - - switch.turn_off: open_vent Configuration variables: ************************ @@ -43,7 +25,6 @@ Configuration variables: - **id** (**Required**, :ref:`config-id`): The id to use for this TB6612FNG component. - **address** (*Optional*, int): The I²C address of the driver. Defaults to ``0x14``. -- **name** (**Required**, boolean): The name of the component .. grove_tb6612fng.run: @@ -124,6 +105,21 @@ Set the board to be awake, every esphome is restarted the default mode is set to - grove_tb6612fng.no_standby id: test_motor +.. grove_tb6612fng.change_address: + +``grove_tb6612fng.change_address`` Action +----------------------------------------- + +If you require connecting multiple boards at once, the address can be changed using this action. The address can be changed to a value in the range of ``0x01 - 0x7f`` inclusive. + +.. code-block:: yaml + + on_...: + then: + - grove_tb6612fng.change_address: + address: 0x15 + id: test_motor + See Also --------