Skip to content

Ultrasonic Distance Sensor issues in 1.12 #147

@mack0352

Description

@mack0352

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Hass.io Addon v1.12

ESP (ESP32/ESP8266, Board/Sonoff):

ESP8266 NodeMcu LUA CP2102

Affected component:

https://esphome.io/components/sensor/ultrasonic.html

Description of problem:
Returns distance measurement of 0.1 m
Does not change values return. Tested on two different boards and two different HC-SR04.
I noticed there were a few comments in the compontent section as well saying that 1.12 broke their distance measurement, but I didn't see any bugs logged against it.

Problem-relevant YAML-configuration entries:

PASTE YAML FILE HERE
esphome:
  name: node2
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: myssid
  password: mypw
  manual_ip:
    # Set this to the IP of the ESP
    static_ip: 192.168.86.46
    # Set this to the IP address of the router. Often ends with .1
    gateway: 192.168.86.1
    # The subnet of the network. 255.255.255.0 works for most home networks.
    subnet: 255.255.255.0
# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

sensor:
  - platform: ultrasonic
    trigger_pin: D1
    echo_pin: D2
    name: "node2 ultrasonic"

Traceback (if applicable):


Additional information and things you've tried:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions