Skip to content

Commit

Permalink
Update udp.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
nagyrobi authored Jun 7, 2024
1 parent 9f1d6ca commit f6cd9a5
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions components/sensor/udp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ UDP Sensor
:description: Instructions for setting up a UDP sensor.
:image: udp.svg

The ``udp`` sensor platform allows you to receive sensor data from another device.
The ``udp`` sensor platform allows you to receive sensor data directly from another device.

.. code-block:: yaml
Expand All @@ -16,33 +16,29 @@ The ``udp`` sensor platform allows you to receive sensor data from another devic
id: temperature_id
remote_id: temp_id
Configuration variables
-----------------------

- **name** (*Optional*, string): The name of the sensor.
- **internal** (*Optional*, boolean): Whether the sensor should be exposed via API (e.g. to Home Assistant.) Defaults to true if name is not set, required if name is provided.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **remote_id** (*Optional*, :ref:`config-id`): The ID of the sensor in the remote device. If not specified defaults to the ID configured with ``id:``.
- **remote_id** (*Optional*, :ref:`config-id`): The ID of the original sensor in the provider device. If not specified defaults to the ID configured with ``id:``.
- **name** (*Optional*, string): The name of the sensor.
- **internal** (*Optional*, boolean): Whether the sensor should be exposed via API (e.g. to Home Assistant.) Defaults to ``true`` if name is not set, required if name is provided.
- All other options from :ref:`Sensor <config-sensor>`.

At least one of ``id`` and ``remote_id`` must be configured. Since
At least one of ``id`` and ``remote_id`` must be configured.


Publishing to Home Assistant
----------------------------

Typically this type of binary sensor would be used for internal automation purposes rather than having it published to
HA, since it will be a duplicate of the remote sensor.
Typically this type of binary sensor would be used for internal automation purposes rather than having it published back to
Home Assistant, since it will be a duplicate of the original sensor.

If it *is* desired to expose the sensor to HA, then the ``internal:`` configuration setting needs to be explicitly
If it *is* desired to expose the sensor to Home Assistant, then the ``internal:`` configuration setting needs to be explicitly
set to ``false`` and a name provided.
Only the state (i.e. binary value) of the remote sensor is received by the consumer, so any other attributes must be explicitly
configured.




See Also
--------

Expand Down

0 comments on commit f6cd9a5

Please sign in to comment.