Skip to content

Add WTS01 temperature sensor documentation and image #4811

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

Open
wants to merge 12 commits into
base: next
Choose a base branch
from
1 change: 1 addition & 0 deletions components/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ Air Quality
SPS30, components/sensor/sps30, sps30.jpg, Particulate
T6613/15, components/sensor/t6615, t6615.jpg, CO2
ZyAura, components/sensor/zyaura, zgm053.jpg, CO2 & Temperature & Humidity
WTS01, components/sensor/wts01, wts01.png, Temperature

Analogue
********
Expand Down
Binary file added components/sensor/images/wts01-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions components/sensor/wts01.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
WTS01 Temperature Sensor
========================

.. seo::
:description: Instructions for setting up WTS01 temperature sensors in ESPHome.
:image: wts01.png
:keywords: WTS01, Sonoff, TH Origin, TH Elite, THR316, THR320, THR316D, THR320D

The ``wts01`` platform allows you to use WTS01 temperature sensors with ESPHome.
This is the sensor used in Sonoff TH Origin (THR316, THR320) and TH Elite (THR316D, THR320D) devices.

For this component to work you need to have set up a UART bus in your configuration - only the RX pin should be necessary.

The sensor communicates with the microcontroller via :doc:`UART </components/uart>`.

.. figure:: images/wts01-full.png
:align: center
:width: 80.0%

WTS01 Temperature Sensor

**Basic configuration**

.. code-block:: yaml

# You need to have a UART bus setup in your configuration
uart:
rx_pin: GPIO17
baud_rate: 9600

# Then you can add the WTS01 sensor
sensor:
- platform: wts01
name: "WTS01 Temperature"

**More advanced configurations**

.. code-block:: yaml

# Throttle updates to the sensor
sensor:
- platform: wts01
name: "WTS01 Temperature"
filters:
- throttle: 60s

.. code-block:: yaml

# Convert the temperature to Fahrenheit
sensor:
- platform: wts01
name: "WTS01 Temperature"
filters:
- lambda: return x * (9.0/5.0) + 32.0;
unit_of_measurement: "°F"


Configuration variables:
------------------------

- **sensor** (*Required*): The sensor configuration.

- **platform** (*Required*, string): Must be ``wts01``.
- **name** (*Required*, string): The name of the temperature sensor.
- All other options from :ref:`Sensor <config-sensor>`.

.. note::

The WTS01 sensor is used in Sonoff TH Origin (THR316, THR320) and TH Elite (THR316D, THR320D) devices and connects to the main device using a RJ9 4C4P connector.
This sensor provides temperature readings with 0.1°C resolution.

See Also
--------

- :ref:`sensor-filters`
- :doc:`/components/uart`
- :apiref:`wts01/wts01.h`
- :ghedit:`Edit`
Binary file added images/wts01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.