DS18B20 one wire bus changes

Not able to update d1 mini since dallas platform as changed.

Cant find any example when you have several temperature sensor, but not in a chain (one sensor per pin)

one_wire: 
  onewirebus:
  - platform: gpio
    id: sensor_piscina_top
    pin: D4
  - platform: gpio    
    id: sensor_piscina_bottom
    pin: D5 #D4

sensor:
  - platform: dallas_temp
    address: 0x34ff40421f64ff28
    name: "Sensor Temp Piscina Bottom"
    resolution: 9  #9
    filters:
      - offset: -0.4
    device_class: temperature

  - platform: dallas_temp
    address: 0x7885654c1f64ff28
    name: "Sensor Temp Piscina Top"
    device_class: temperature
    resolution: 9

cant find examples of onewirebus, so I am not able to compile.

What am I doing wrong?

thx

https://community.home-assistant.io/t/heads-up-for-esphome-2024-6/741377/24?u=tom_l

Now its compiling.

Thank you so much @tom_l

The help message is misleading…at least for me, and documentation is very poor:

2 Likes

Hi
I had a lot of trouble getting my DS18B20 and ESP32 working with Home Assistant. Perhaps this is because some of the information provided is slightly out of date as thing keep evolving. This is my working section of my yaml file and it is seems to be working successfully. I initially didn’t know the address of the sensor so left the line out and it still worked. And then from the logs I saw the sensor address and then put the line back in.

Working 2025/02/17

# DS18B20 Sensor using one_wire
one_wire:
  - platform: gpio
    pin: 4
  
sensor:
  - platform: dallas_temp
    address: 0xXXXXXXXXXXXXX
    name: "DS18B20 Temperature Sensor"
    id: temp_sensor
    update_interval: 60s
    accuracy_decimals: 0

Look here