Problems with DS18B20 and ESP32

I’m trying to setup a pair of DS18B20 sensors for a refrigerator and freezer, and I’m getting an “Invalid YAML syntax” message. I’ve tried to set it us following the YouTube example from mostlychris where he used an ESP8266, but even with a single sensor, I’m getting the error message. It did work with the ESP8266, but all I have available right now is an ESP32.
The YAML code that is failing is:

esphome:
name: esphome-web-232c24
friendly_name: DualTemps

esp32:
board: esp32dev
framework:
type: arduino

dallas:

  • pin: GPIO4

sensor:

  • platform: dallas
    address: 0x2f3ce1e380681e28
    name: “Temperature1”

What change do I need to get this as a single sensor to work, and then with additional sensors?
Thank you.

Edit your post to include pre formatted text tags around your yaml and then we will have a look.

As a purchaser of a HA-Yellow, I am not just sucking knowledge from the community, I’ve supported it some by purchasing the HA device. I could have used one of the PI4’s that I already had.

I’m not sure what the preformatting tags are, but I solved the problem, and having it formatted properly would probably would have helped. The text I entered looked like what I saw in the editor, but I had failed to double space after the “- platform:” entry.

Yep - that’s why I asked for preformatted text tags. That way people reading your post can see indenting which is so important in yaml.

Also if you have read the link I posted you will see that preformatted text is surrounded by back ticks and is represented by </> on the posting toolbar.