multiple esphome device updates and new devices
This commit is contained in:
@@ -37,31 +37,34 @@ substitutions:
|
||||
#
|
||||
#
|
||||
|
||||
#############################################
|
||||
# Included Common Packages
|
||||
# https://esphome.io/components/esphome.html
|
||||
#############################################
|
||||
##########################################################################################
|
||||
# PACKAGES: Included Common Packages
|
||||
# https://esphome.io/components/packages.html
|
||||
##########################################################################################
|
||||
packages:
|
||||
common_wifi: !include
|
||||
file: common/network_common.yaml
|
||||
vars:
|
||||
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_device_name: "${device_name}"
|
||||
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
|
||||
common_mqtt: !include
|
||||
file: common/mqtt_common.yaml
|
||||
vars:
|
||||
local_device_name: "${device_name}"
|
||||
common_sntp: !include
|
||||
file: common/sntp_common.yaml
|
||||
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
|
||||
@@ -73,29 +76,35 @@ esphome:
|
||||
comment: ${description_comment} #appears on the esphome page in HA
|
||||
min_version: 2024.6.0
|
||||
area: "${device_area}"
|
||||
on_boot: #LD1125H Initial Setting, will remember previous values (if set)
|
||||
priority: -200
|
||||
then:
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string th1st = "mth1=" + str_sprintf("%.0f",id(LD1125H_mth1).state) +"\r\n";
|
||||
return std::vector<uint8_t>(th1st.begin(), th1st.end());
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string th2st = "mth2=" + str_sprintf("%.0f",id(LD1125H_mth2).state) +"\r\n";
|
||||
return std::vector<uint8_t>(th2st.begin(), th2st.end());
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string th3st = "mth3=" + str_sprintf("%.0f",id(LD1125H_mth3).state) +"\r\n";
|
||||
return std::vector<uint8_t>(th3st.begin(), th3st.end());
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string rmaxst = "rmax=" + str_sprintf("%.1f",id(LD1125H_rmax).state) +"\r\n";
|
||||
return std::vector<uint8_t>(rmaxst.begin(), rmaxst.end());
|
||||
platformio_options:
|
||||
build_flags:
|
||||
- "-Os" # optimize for size
|
||||
- "-Wl,--gc-sections" # drop unused code/data
|
||||
- "-fno-exceptions" # strip C++ exceptions
|
||||
#- "-fno-rtti" # strip C++ RTTI
|
||||
on_boot:
|
||||
- priority: -200
|
||||
then:
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string th1st = "mth1=" + str_sprintf("%.0f", id(LD1125H_mth1).state) + "\r\n";
|
||||
return std::vector<uint8_t>(th1st.begin(), th1st.end());
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string th2st = "mth2=" + str_sprintf("%.0f", id(LD1125H_mth2).state) + "\r\n";
|
||||
return std::vector<uint8_t>(th2st.begin(), th2st.end());
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string th3st = "mth3=" + str_sprintf("%.0f", id(LD1125H_mth3).state) + "\r\n";
|
||||
return std::vector<uint8_t>(th3st.begin(), th3st.end());
|
||||
- uart.write:
|
||||
id: LD1125H_UART_BUS
|
||||
data: !lambda |-
|
||||
std::string rmaxst = "rmax=" + str_sprintf("%.1f", id(LD1125H_rmax).state) + "\r\n";
|
||||
return std::vector<uint8_t>(rmaxst.begin(), rmaxst.end());
|
||||
|
||||
#############################################
|
||||
# ESP Platform and Framework
|
||||
|
Reference in New Issue
Block a user