Skip to content
krahabb edited this page Aug 24, 2021 · 1 revision

My own implementation of the dallas component features an 'auto-discovery' of Dallas temperature sensors on the 1-wire bus interface. This is accomplished when the ESP boots and allows to register temperature sensors in HA without knowing their ID in advance (the official implementation requires you to set this ID when configuring the node before flashing: see https://esphome.io/components/sensor/dallas.html).

Here is a minimal yaml snippet in order to use it (add it together with all the basic configuration stuff for esphome):

dallas:
  - pin: GPIO2
    auto_setup_sensors: true

There are a couple of optional configurations you can use to refine the node behaviour like this:

dallas:
  - pin: GPIO2
    auto_setup_sensors: true
    resolution: 11 # from 9 to 12 bits
    sensor_name_template: 'dallas_%s.%s' # component will throw in the node name and sensor UUID in place of %s (ordered)

Check the guide for the official dallas component for any other option (my component code is a 'patch' of the original one)

Clone this wiki locally