konnected-io / konnected-esphome

ESPHome firmware configuration and recipes for Konnected devices
Other
49 stars 31 forks source link

fix: treat small distances as closed #20

Closed drothenberger closed 7 months ago

drothenberger commented 8 months ago

My sensor reads small distances [0,0.05] when the door is closed, instead of a large distance or NA. Treat distances between 0 and the margin of error as closed.

heythisisnate commented 7 months ago

Thanks for the PR but I think this is fixing the wrong problem. What you're seeing is a symptom of a sensor that needs a little bit of re-alignment or possibly some reflections from rough edges around the enclosure. You shouldn't really be seeing the very low readings when nothing is in front of the sensor. See this article for ways to fix: https://support.konnected.io/troubleshooting-the-garage-door-opener-optical-range-sensor