Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new component] DS2406 #4569

Open
wants to merge 7 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions components/ds2406.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Dallas DS2406
====================

.. seo::
:description: Instructions for setting up Dallas DS2406
:image: ds2406.webp
:keywords: Dallas, ds2406, onewire

The ``ds2406`` component allows you to use the
`DS2406 <https://www.analog.com/en/products/ds2406.html>`__
(`datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/DS2406.pdf>`__)
component that is able to sense and switch two channels. A :ref:`1-Wire bus <one_wire>` is
required to be set up in your configuration for this component to work.

.. code-block:: yaml

# Example configuration entry
ds2406:
- address: 0x99000000c695bd12
update_interval: 1s

Configuration variables:
************************

- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. Necessary if you want
to define multiple instances of this component.
- **address** (*Optional*, int): The address of the sensor. Required if there is more than one device on the bus.
- **update_interval** (*Optional*, :ref:`config-time`): The interval that the sensors should be checked.
Defaults to 60 seconds.
- **one_wire_id** (*Optional*, :ref:`one_wire`): The ID of the 1-Wire bus to use.
Required if there is more than one bus.

Binary Sensor
-------------

With the :ref:`Binary Sensor components <config-binary_sensor>` you check whether voltage is applied to one of the channels.

.. code-block:: yaml

binary_sensor:
- platform: ds2406
name: Channel 1
channel: 1


Configuration variables:
************************

- **ds2406_id** (*Optional*, :ref:`config-id`): The ID of the DS2406 component defined above.
Required when multiple instances of the ``ds2406`` component are defined.
- **channel** (*Optional*, int): `1` or `2`. Which channel should be monitored.
- All other options from :ref:`Binary Sensor <config-binary_sensor>`.

Switch
------

With the :ref:`Switch components <config-switch>` channels could be turned on or off.

.. code-block:: yaml

switch:
- platform: ds2406
name: Channel 2
channel: 2

Configuration variables:
************************

- **ds2406_id** (*Optional*, :ref:`config-id`): The ID of the DS2406 component defined above.
Required when multiple instances of the ``ds2406`` component are defined.
- **channel** (*Optional*, int): `1` or `2`. Channel to be controlled.
- All other options from :ref:`Switch <config-switch>`.

See Also
--------
- :ref:`1-Wire bus <one_wire>`
- :ref:`Binary Sensor <config-binary_sensor>`
- :ref:`Switch <config-switch>`
- :ref:`config-id`
- :ghedit:`Edit`
Binary file added components/images/ds2406.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ds2406.webp
Binary file not shown.
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ I/O Expanders/Multiplexers
TCA9555, components/tca9555, tca9555.svg
WeiKai SPI/I²C UART/IO Expander, components/weikai, wk2168.jpg
XL9535, components/xl9535, xl9535.svg
DS2406, components/ds2406, ds2406.webp

CAN Bus
-------
Expand Down
2 changes: 1 addition & 1 deletion lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def find_all(a_str, sub):
"",
)
docs_types = [".rst"]
image_types = [".jpg", ".ico", ".png", ".svg", ".gif"]
image_types = [".jpg", ".ico", ".png", ".svg", ".gif", ".webp"]

LINT_FILE_CHECKS = []
LINT_CONTENT_CHECKS = []
Expand Down
Loading