mirror of
https://github.com/jdillenburg/esphome.git
synced 2026-01-10 07:10:39 -07:00
1.2 KiB
1.2 KiB
TFMini-S Time of Flight Distance Sensor for ESPHome
This is an external component for ESPHome that supports the TFMini-S time of flight distance sensor.
Installation
You can install this component in two ways:
1. Using ESPHome external components
external_components:
- source: github://your-username/esphome-tfmini@main
components: [ tfmini ]
2. Manual installation
Clone this repository into your ESPHome custom_components directory:
cd <your config directory>/custom_components
git clone https://github.com/your-username/esphome-tfmini.git
Configuration
Add the following to your ESPHome configuration file:
# Example configuration
uart:
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 115200
sensor:
- platform: tfmini
name: "Distance Sensor"
update_interval: 1s
Features
- Measures distance in meters
- Automatic configuration of the TFMini-S sensor
- Signal strength validation
- Temperature monitoring (internal, not exposed yet)
Notes
- The sensor is configured to use the standard 9-byte output format
- Refresh rate is set to 100Hz
- Data is provided in meters with 2 decimal precision
License
This component is licensed under the MIT License.