Skip to content
Open
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
30 changes: 28 additions & 2 deletions src/docs/devices/Sonoff-THR316/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ difficulty: 3
| GPIO15 | Middle LED (Blue/WiFi) |
| GPIO16 | Left LED (Red/Relay) |
| GPIO21 | Relay |
| GPIO25 | Dallas Sensor Bus Data In/Out |
| GPIO27 | Dallas Sensor 3.3V Power |
| GPIO25 | Sensor Bus Data In/Out |
| GPIO27 | Sensor 3.3V Power |

## RJ9 Pinout

Expand Down Expand Up @@ -273,3 +273,29 @@ climate:
then:
- light.turn_on: auto_led
```

## Using a WTS01 temperature sensor

The following yaml enables the [WTS01 sensor](https://esphome.io/components/sensor/wts01/) on the Sonoff THR316
and exposes the measured value as `temp`.
Comment on lines +279 to +280
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text says the WTS01 value is exposed as temp, but the YAML only sets id: temp (which is for internal references) and does not set a name: for the sensor. If the intent is to expose it in Home Assistant, add an explicit name: (and consider adjusting the wording to avoid implying the entity name comes from the id).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback


```yaml
switch:
# This is needed to power the external sensor.
# It receives 3v3 from this pin, which is pulled up on boot.
- platform: gpio
pin: GPIO27
id: sensor_power
restore_mode: ALWAYS_ON

uart:
rx_pin: GPIO25
Comment thread
kellerza marked this conversation as resolved.
baud_rate: 9600

sensor:
- platform: wts01
id: temp
filters:
- throttle_average: 60s
- round: 1
```