a bunch of esphome improvements
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
#############################################
|
||||
#############################################
|
||||
# HiLink LD2410 mmWave sensor, with BME280 Temp/Hum/Pres Sensor and PIR on an ESP32
|
||||
# VERSION
|
||||
# V2.0 2025-06-05 YAML Tidyups
|
||||
#
|
||||
# https://github.com/patrick3399/Hi-Link_mmWave_Radar_ESPHome/tree/main
|
||||
# https://github.com/patrick3399/Hi-Link_mmWave_Radar_ESPHome/blob/main/LD1125H/ESP32-LD1125H-Complete.yaml
|
||||
#
|
||||
# https://esphome.io/components/sensor/ld2410.html
|
||||
# https://www.simplysmart.house/blog/presence-detection-ld2410-home-assistant
|
||||
#
|
||||
# The B and c versions of this device can use Bluetooth, but we are not using it here.
|
||||
# The B and C versions of this device can use Bluetooth, but we are not using it here.
|
||||
#############################################
|
||||
#############################################
|
||||
|
||||
@@ -16,16 +19,25 @@
|
||||
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||
#############################################
|
||||
substitutions:
|
||||
devicename: "esp-occupancystair"
|
||||
# Device Naming
|
||||
device_name: "esp-occupancystair"
|
||||
friendly_name: "Stair Occupancy and Underhouse Environment"
|
||||
description_comment: "D1 Mini ESP32 with LD2410 mmWave for internal stairwell and environment sensors for under house"
|
||||
device_area: "Outside" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
|
||||
|
||||
# Project Naming
|
||||
project_name: "Generic.ESP32" # Project Details
|
||||
project_version: "v1.0" # Project V denotes release of yaml file, allowing checking of deployed vs latest version
|
||||
|
||||
# Passwords
|
||||
api_key: !secret esp-occupancystair_api_key # unfortunately you can't use substitutions inside secrets names
|
||||
ota_pass: !secret esp-occupancystair_ota_pass # unfortunately you can't use substitutions inside secrets names
|
||||
static_ip_address: !secret esp-occupancystair_ip
|
||||
|
||||
# Device Settings
|
||||
log_level: "INFO" # Define logging level: NONE, ERROR, WARN, INFO, DEBUG (Default), VERBOSE, VERY_VERBOSE
|
||||
update_interval: "60s" # update time for for general sensors etc
|
||||
room: "Outside" # Allows ESP device to be automatically linked to an 'Area' in Home Assistant.
|
||||
|
||||
|
||||
#############################################
|
||||
# Included Common Packages
|
||||
# https://esphome.io/components/esphome.html
|
||||
@@ -34,14 +46,14 @@ packages:
|
||||
common_wifi: !include
|
||||
file: common/network_common.yaml
|
||||
vars:
|
||||
local_static_ip_address: ${static_ip_address}
|
||||
local_ota_pass: ${ota_pass}
|
||||
local_static_ip_address: "${static_ip_address}"
|
||||
local_ota_pass: "${ota_pass}"
|
||||
common_api: !include
|
||||
file: common/api_common.yaml
|
||||
vars:
|
||||
local_api_key: ${api_key}
|
||||
common_webportal: !include
|
||||
file: common/webportal_common.yaml
|
||||
local_api_key: "${api_key}"
|
||||
# common_webportal: !include
|
||||
# file: common/webportal_common.yaml
|
||||
common_mqtt: !include
|
||||
file: common/mqtt_common.yaml
|
||||
common_sntp: !include
|
||||
@@ -49,20 +61,20 @@ packages:
|
||||
common_general_sensors: !include
|
||||
file: common/sensors_common.yaml
|
||||
vars:
|
||||
local_friendly_name: ${friendly_name}
|
||||
local_update_interval: ${update_interval}
|
||||
local_friendly_name: "${friendly_name}"
|
||||
local_update_interval: "${update_interval}"
|
||||
|
||||
#############################################
|
||||
# ESPHome
|
||||
# https://esphome.io/components/esphome.html
|
||||
#############################################
|
||||
esphome:
|
||||
name: ${devicename}
|
||||
friendly_name: ${friendly_name}
|
||||
comment: ${description_comment} #appears on the esphome page in HA
|
||||
name: "${device_name}"
|
||||
friendly_name: "${friendly_name}"
|
||||
comment: "${description_comment}" # appears on the esphome page in HA
|
||||
min_version: 2024.6.0
|
||||
area: "${room}"
|
||||
#on_boot: #Initial Setting, will remember previous values (if set)
|
||||
area: "${device_area}"
|
||||
#on_boot: # Initial Setting, will remember previous values (if set)
|
||||
#priority: -200
|
||||
#then:
|
||||
|
||||
@@ -73,9 +85,8 @@ esphome:
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
#type: arduino
|
||||
type: esp-idf #Suggested Use ESP-IDF Framework, or Plug Out the UART Cable Might Cause ESP32 Hang.
|
||||
version: recommended #recommended, latest or dev
|
||||
type: esp-idf # "esp-idf" OR "arduino". Suggested ESP-IDF Framework, or Plug Out the UART Cable Might Cause ESP32 Hang.
|
||||
version: recommended # recommended, latest or dev
|
||||
|
||||
#############################################
|
||||
# i2s bus
|
||||
@@ -92,8 +103,8 @@ i2c:
|
||||
# https://esphome.io/components/logger.html
|
||||
#############################################
|
||||
logger:
|
||||
level: INFO #INFO Level suggested, or DEBUG for testing
|
||||
baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
level: INFO # INFO Level suggested, or DEBUG for testing
|
||||
baud_rate: 0 # set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
#esp8266_store_log_strings_in_flash: false
|
||||
#tx_buffer_size: 64
|
||||
|
||||
@@ -182,58 +193,58 @@ ld2410:
|
||||
number:
|
||||
- platform: ld2410
|
||||
timeout:
|
||||
name: Timeout
|
||||
name: "Timeout"
|
||||
light_threshold:
|
||||
name: Light Threshold
|
||||
name: "Light Threshold"
|
||||
max_move_distance_gate:
|
||||
name: Max Move Distance Gate
|
||||
name: "Max Move Distance Gate"
|
||||
max_still_distance_gate:
|
||||
name: Max Still Distance Gate
|
||||
name: "Max Still Distance Gate"
|
||||
g0:
|
||||
move_threshold:
|
||||
name: g0 move threshold
|
||||
name: "g0 move threshold"
|
||||
still_threshold:
|
||||
name: g0 still threshold
|
||||
name: "g0 still threshold"
|
||||
g1:
|
||||
move_threshold:
|
||||
name: g1 move threshold
|
||||
name: "g1 move threshold"
|
||||
still_threshold:
|
||||
name: g1 still threshold
|
||||
name: "g1 still threshold"
|
||||
g2:
|
||||
move_threshold:
|
||||
name: g2 move threshold
|
||||
name: "g2 move threshold"
|
||||
still_threshold:
|
||||
name: g2 still threshold
|
||||
name: "g2 still threshold"
|
||||
g3:
|
||||
move_threshold:
|
||||
name: g3 move threshold
|
||||
name: "g3 move threshold"
|
||||
still_threshold:
|
||||
name: g3 still threshold
|
||||
name: "g3 still threshold"
|
||||
g4:
|
||||
move_threshold:
|
||||
name: g4 move threshold
|
||||
name: "g4 move threshold"
|
||||
still_threshold:
|
||||
name: g4 still threshold
|
||||
name: "g4 still threshold"
|
||||
g5:
|
||||
move_threshold:
|
||||
name: g5 move threshold
|
||||
name: "g5 move threshold"
|
||||
still_threshold:
|
||||
name: g5 still threshold
|
||||
name: "g5 still threshold"
|
||||
g6:
|
||||
move_threshold:
|
||||
name: g6 move threshold
|
||||
name: "g6 move threshold"
|
||||
still_threshold:
|
||||
name: g6 still threshold
|
||||
name: "g6 still threshold"
|
||||
g7:
|
||||
move_threshold:
|
||||
name: g7 move threshold
|
||||
name: "g7 move threshold"
|
||||
still_threshold:
|
||||
name: g7 still threshold
|
||||
name: "g7 still threshold"
|
||||
g8:
|
||||
move_threshold:
|
||||
name: g8 move threshold
|
||||
name: "g8 move threshold"
|
||||
still_threshold:
|
||||
name: g8 still threshold
|
||||
name: "g8 still threshold"
|
||||
|
||||
#The ld2410 select allows you to control your LD2410 Sensor.
|
||||
#distance_resolution (Optional): Control the gates distance resolution. Can be 0.75m or 0.2m. Defaults to 0.75m. All options from Select.
|
||||
@@ -244,13 +255,13 @@ number:
|
||||
select:
|
||||
- platform: ld2410
|
||||
distance_resolution:
|
||||
name: ${friendly_name} LD2140 Distance Resolution
|
||||
name: "${friendly_name} LD2140 Distance Resolution"
|
||||
baud_rate:
|
||||
name: ${friendly_name} LD2140 Baud Rate
|
||||
name: "${friendly_name} LD2140 Baud Rate"
|
||||
light_function:
|
||||
name: ${friendly_name} LD2140 Light Function
|
||||
name: "${friendly_name} LD2140 Light Function"
|
||||
out_pin_level:
|
||||
name: ${friendly_name} LD2140 Out Pin Level
|
||||
name: "${friendly_name} LD2140 Out Pin Level"
|
||||
|
||||
#############################################
|
||||
# General Sensors
|
||||
@@ -270,7 +281,7 @@ sensor:
|
||||
accuracy_decimals: 1
|
||||
oversampling: 2x
|
||||
address: 0x76
|
||||
update_interval: ${update_interval}
|
||||
update_interval: "${update_interval}"
|
||||
|
||||
#The ld2410 sensor values
|
||||
- platform: ld2410
|
||||
@@ -337,9 +348,9 @@ sensor:
|
||||
switch:
|
||||
- platform: ld2410
|
||||
engineering_mode:
|
||||
name: ${friendly_name} LD2140 Engineering Mode
|
||||
name: "${friendly_name} LD2140 Engineering Mode"
|
||||
#bluetooth:
|
||||
#name: ${friendly_name} LD2140 Control Bluetooth
|
||||
#name: "${friendly_name} LD2140 Control Bluetooth"
|
||||
|
||||
#The ld2410 binary sensors to get presence notification
|
||||
binary_sensor:
|
||||
@@ -369,19 +380,19 @@ binary_sensor:
|
||||
button:
|
||||
- platform: ld2410
|
||||
factory_reset:
|
||||
name: ${friendly_name} LD2140 Factory reset"
|
||||
name: "${friendly_name} LD2140 Factory reset"
|
||||
restart:
|
||||
name: ${friendly_name} LD2140 Restart
|
||||
name: "${friendly_name} LD2140 Restart"
|
||||
query_params:
|
||||
name: Query Parameters
|
||||
name: "Query Parameters"
|
||||
|
||||
#The ld2410 text sensor allows you to get information about your LD2410 Sensor.
|
||||
#Bluetooth sensor is only useful of you have a B or C model
|
||||
text_sensor:
|
||||
- platform: ld2410
|
||||
version:
|
||||
name: ${friendly_name} LD2140 Firmware Version
|
||||
name: "${friendly_name} LD2140 Firmware Version"
|
||||
#mac_address:
|
||||
#name: ${friendly_name} LD2140 BT MAC Address
|
||||
#name: "${friendly_name} LD2140 BT MAC Address"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user