Support for Sonoff WTS01Temperature Sensor aka DS18B20

Hi, is there any way to support Sonoff WTS01Temperature Sensor via one_wire dallas component im using sonoff THR320 with esphome firmware and WTS01 sensor.

My part of yaml file for this:

esphome:
  name: ${name}
  friendly_name: ${friendly_name}

esp32:
  board: esp32dev

logger:
  baud_rate: 0
  level: VERY_VERBOSE

time:
  - platform: homeassistant
    id: homeassistant_time

switch:
  - platform: gpio
    pin: 27
    id: dallas_power
    restore_mode: ALWAYS_ON

one_wire:
  - platform: gpio
    pin: 25

I tested it with the last esphome version:

[C][gpio.one_wire:016]: GPIO 1-wire bus:
[C][gpio.one_wire:017]:   Pin: GPIO25
[W][gpio.one_wire:078]:   Found no devices!```

I’m raising the issue. How to read the temperature from the WTS01 sensor in ESPHome?

The short answer is: no

Tasmota has support for it and there is a long thread there with enough information for someone motivated enough to make it work for esphome too. So far no one has been motivated enough to make it work for esphome, as far as I can tell.

I encountered a similar issue and ended up creating a pull request on the ESPHome project to add support for the Sonoff WTS01 (DS18B20 variant). The implementation is largely inspired by Tasmota’s native support.

Feel free to try it out as an external component:

esphome:
  on_boot:
    - priority: 90
      then:
      # Make sure the sensor power is on at startup
      - switch.turn_on: sensor_power

# Add WTS01 component from PR#8539
external_components:
  - source: github://pr#8539
    components: [ wts01 ]

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:
  id: uart_bus
  rx_pin: GPIO25 # for data
  baud_rate: 9600

sensor:
  - platform: wts01
     name: "Sonoff THR Temperature"
     # All other options from Sensor

Documentation in preview : WTS01 Temperature Sensor — ESPHome