car_sensor.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: car_position_sensor | |
platform: ESP8266 | |
board: d1_mini | |
# WiFi connection, correct these | |
# with values for your WiFi. | |
wifi: | |
ssid: !secret Wifi_SSID | |
password: !secret Wifi_PWD | |
# Enable logging | |
logger: | |
# Enable Home Assistant API | |
api: | |
# Enable over-the-air updates. | |
ota: | |
# Enable Web server. | |
web_server: | |
port: 80 | |
# Sync time with Home Assistant. | |
time: | |
- platform: homeassistant | |
id: homeassistant_time | |
# Text sensors with general information. | |
text_sensor: | |
# Expose ESPHome version as sensor. | |
- platform: version | |
name: Car_position_sensor ESPHome Version | |
# Expose WiFi information as sensors. | |
- platform: wifi_info | |
ip_address: | |
name: Car_position_sensor IP | |
ssid: | |
name: Car_position_sensor SSID | |
bssid: | |
name: Car_position_sensor BSSID | |
# Exposed switches. | |
# Switch to restart the Car_position_sensor. | |
switch: | |
- platform: restart | |
name: "Car_position_sensor Restart" | |
# Sensors getting the distance between ceiling and car | |
# and converting them to the car height | |
sensor: | |
# Uptime sensor. | |
- platform: uptime | |
name: Car_position_sensor Uptime | |
# WiFi Signal sensor. | |
- platform: wifi_signal | |
name: Car_position_sensor WiFi Signal | |
update_interval: 60s | |
- platform: ultrasonic | |
trigger_pin: D1 | |
echo_pin: D2 | |
name: "Car_position_back" | |
update_interval: 1s | |
filters: | |
- lambda: return 2.44 - x; | |
- platform: ultrasonic | |
trigger_pin: D3 | |
echo_pin: D0 | |
name: "Car_position_centerb" | |
update_interval: 1s | |
filters: | |
- lambda: return 2.44 - x; | |
- platform: ultrasonic | |
trigger_pin: D5 | |
echo_pin: D6 | |
name: "Car_position_centerf" | |
update_interval: 1s | |
filters: | |
- lambda: return 2.44 - x; | |
- platform: ultrasonic | |
trigger_pin: D7 | |
echo_pin: D8 | |
name: "Car_position_front" | |
update_interval: 1s | |
filters: | |
- lambda: return 2.16 - x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment