Dallas Temperature Sensor

The dallas_temp component allows you to use DS18B20 (datasheet) and similar 1-Wire temperature sensors. A 1-Wire bus is required to be set up in your configuration for this sensor to work.

# Example configuration entries
sensor:
  # only one device
  - platform: dallas_temp
    name: temperature
    update_interval: 120s
  # specific address
  - platform: dallas_temp
    address: 0x1234567812345628
    name: temperature2
  # second device
  - platform: dallas_temp
    index: 1
    name: temperature1

Configuration variables

  • address (Optional, int): The address of the sensor. Required if there is more than one device on the bus and index is not specified.

  • index (Optional, byte): The index (0-based) of the sensor. Required if there is more than one device on the bus and address is not specified. Note this index is based on the hardware addresses of the sensors and the order can change if sensors are changed, added, or removed.

  • resolution (Optional, int): An optional resolution from 9 to 12. Higher means more accurate. Defaults to the maximum for most Dallas temperature sensors: 12.

  • update_interval (Optional, Time): The interval that the sensors should be checked. Defaults to 60 seconds.

  • one_wire_id (Optional, 1-Wire Bus): The ID of the 1-Wire bus to use. Required if there is more than one bus.

  • All other options from Sensor.

Byte Order of the Address

EspHome (most recent version 2026-January) - uses reversed order of the bytes, compared to the Arduino IDE. That means, if you have an address for a sensor via the Arduino IDE that says 0x2870F5E0161301C7 - then you have to use 0xc7011316e0f57028 in EspHome. The bytes are pairwise ordered in reverse. The Arduino IDE version ends in the above example with c7 - the EspHome version the same address starts with c7. - The other pairs accordingly. The arduino IDE is LSB‑first. While EspHome is MSB‑first.

If you don’t have the addresses, use index instead of addresses for the first run. EspHome will print the addresses on the log at first use with index. After that, try with addresses, if you want.

See Also