Include multi conf and change address for TB6612FNG (#3267)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Christian 2023-10-16 20:47:55 +01:00 committed by Jesse Hills
parent 0ea01df0f0
commit 20a8ee3b0c
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
1 changed files with 17 additions and 21 deletions

View File

@ -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
--------