Error with pin and dallas sensor in wemo d1

Hello

I’m stuck here with my ESP8266 wemo D1

I want to add a Dallas temperature sensor and I always get an error ( [pin] is an invalid option for [sensor.dallas]. Please check the indentation.)

This pin is not yet assigned and is only connected to the Dallas temperature sensor on the D4 GPIO2

Can someone help me with this.

Sorry for my english

binary_sensor:

  • platform: gpio
    pin:
    number: D2
    mode: INPUT_PULLUP
    name: “Balcony Door”
    device_class: window

  • platform: gpio
    pin:
    number: D3
    mode: INPUT_PULLUP
    name: “leer2”
    device_class: window

text_sensor:

  • platform: wifi_info
    ip_address:
    name: ESP IP Address
    ssid:
    name: ESP Connected SSID
    bssid:
    name: ESP Connected BSSID

sensor:

  • platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: “WiFi Signal dB”
    id: wifi_signal_db
    update_interval: 10s
    entity_category: “diagnostic”

  • platform: copy # Reports the WiFi signal strength in %
    source_id: wifi_signal_db
    name: “WiFi Signal Percent”
    filters:

    • lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
      unit_of_measurement: “Signal %”
      entity_category: “diagnostic”
      device_class: “”
  • platform: pulse_counter
    pin: D1
    name: “Pulse Counter”
    update_interval: 3s

  • platform: dallas
    pin: GPIO2
    address: 0x6e041701d00fff28
    name: “Motor”

Please post your yaml properly. How to help us help you - or How to ask a good question

In this section you are calling GPIO’s (GPIO2) by a different naming convention.

Try replacing it with the Wemos mini’s Gpios naming convention ( D4 ).

  • platform: dallas
    pin: D4
    address: 0x6e041701d00fff28
    name: “Engine”

pin D4 is underlined in red

The error occurs during manual install compilation.

INFO ESPHome 2024.3.2
INFO Reading configuration /config/esphome/neu3.yaml…
Failed config

sensor.dallas: [source /config/esphome/neu3.yaml:83]
platform: dallas

[pin] is an invalid option for [sensor.dallas]. Please check the indentation.

You do not have the complete Dallas entry.
Refer to Dallas Temperature Sensor — ESPHome for pointers.

It should look something like:

# Example configuration entry
dallas:
  - pin: D4

# Individual sensors
sensor:
  - platform: dallas
    address: 0x1c0000031edd2a28  # <---"THIS IS A UNIQUE address to Your sensor"
    name: "Livingroom Temperature"

Example from that page I linked.