diff --git a/components/output/dac7678.rst b/components/output/dac7678.rst new file mode 100644 index 000000000..440dfeb1c --- /dev/null +++ b/components/output/dac7678.rst @@ -0,0 +1,114 @@ +DAC7678 +======= + +.. seo:: + :description: Instructions for setting up the DAC7678. + :image: dac7678.svg + :keywords: DAC7678 + +.. _dac7678-component: + +Component/Hub +------------- + +The DAC7678 component represents a DAC7678 12-bit 8 channel DAC with internal reference +(`datasheet `__) in ESPHome. It +uses the :ref:`I²C Bus ` for communication. + +To use the channels of this components, you first need to setup the +global ``dac7678`` hub and give it an id, and then define the +:ref:`individual output channels `. + +.. code-block:: yaml + + # Example configuration entry + dac7678: + address: 0x4A + id: dac7678_hub1 + internal_reference: true + + # Individual outputs + output: + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 0 + +Configuration variables: +************************ + +- **address** (*Optional*, int): The I²C address of the driver. + Defaults to ``0x48``. +- **id** (*Optional*, :ref:`config-id`): The id to use for + this dac7678 component. Use this if you have multiple DAC7678s connected at the same time +- **internal_reference** (*Optional*, bool): State of the internal reference. + Defaults to ``false``. + +.. _dac7678-output: + +DAC Output +---------- + +The DAC7678 output component exposes a DAC7678 DAC channel of a global +:ref:`DAC7678 hub ` as a float +output. + +.. code-block:: yaml + + # Example configuration entry + dac7678: + address: 0x4A + id: dac7678_hub1 + internal_reference: true + + # Individual outputs + output: + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 0 + id: 'dac7678_1_ch0' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 1 + id: 'dac7678_1_ch1' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 2 + id: 'dac7678_1_ch2' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 3 + id: 'dac7678_1_ch3' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 4 + id: 'dac7678_1_ch4' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 5 + id: 'dac7678_1_ch5' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 6 + id: 'dac7678_1_ch6' + - platform: dac7678 + dac7678_id: 'dac7678_hub1' + channel: 7 + id: 'dac7678_1_ch7' + + +Configuration variables: +************************ + +- **id** (**Required**, :ref:`config-id`): The id to use for this output component. +- **channel** (**Required**, int): Chose the channel of the DAC7678 of + this output component. Must be in range from 0 to 7. +- **dac7678_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the + :ref:`DAC7678 hub `. + Use this if you have multiple DAC7678 devices. +- All other options from :ref:`Output `. + +See Also +-------- + +- :doc:`/components/output/index` +- :ghedit:`Edit` diff --git a/images/dac7678.svg b/images/dac7678.svg new file mode 100644 index 000000000..8b6eae07f --- /dev/null +++ b/images/dac7678.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.rst b/index.rst index bc1ea6fc6..f6e63b428 100644 --- a/index.rst +++ b/index.rst @@ -441,6 +441,7 @@ Output Components MCP4725, components/output/mcp4725, mcp4725.jpg MCP4728, components/output/mcp4728, mcp4728.jpg MCP47A1, components/output/mcp47a1, mcp47a1.svg + DAC7678, components/output/dac7678, dac7678.svg BLE Binary Output, components/output/ble_client, bluetooth.svg Modbus Output, components/output/modbus_controller, modbus.png Custom Output, components/output/custom, language-cpp.svg