mirror of
https://github.com/esphome/esphome.git
synced 2025-08-10 20:29:24 +00:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6c96281a1d | ||
![]() |
3727342bce | ||
![]() |
fc3f806555 | ||
![]() |
c013c3bf61 | ||
![]() |
849a98d5b4 | ||
![]() |
e4e404d54f | ||
![]() |
995db1d0e1 | ||
![]() |
5cb80619dd | ||
![]() |
0914dc7198 | ||
![]() |
12f00a9d3d | ||
![]() |
7b3d6747d5 | ||
![]() |
7904d3b157 | ||
![]() |
3a48b10757 | ||
![]() |
0e50cac399 | ||
![]() |
04225d5717 | ||
![]() |
86791422f0 | ||
![]() |
9c2af6318c | ||
![]() |
c747d7d45d | ||
![]() |
bbd7c9cf86 | ||
![]() |
169fb79c97 | ||
![]() |
1579dfeb80 | ||
![]() |
d8a6d8594a | ||
![]() |
7be071a0e9 |
@@ -34,28 +34,32 @@ RUN \
|
||||
python3-wheel=0.38.4-2 \
|
||||
iputils-ping=3:20221126-1 \
|
||||
git=1:2.39.2-1.1 \
|
||||
curl=7.88.1-10+deb12u5 \
|
||||
curl=7.88.1-10+deb12u6 \
|
||||
openssh-client=1:9.2p1-2+deb12u2 \
|
||||
python3-cffi=1.15.1-5 \
|
||||
libcairo2=1.16.0-7 \
|
||||
libmagic1=1:5.44-3 \
|
||||
patch=2.7.6-7; \
|
||||
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential=12.9 \
|
||||
python3-dev=3.11.2-1+b1 \
|
||||
zlib1g-dev=1:1.2.13.dfsg-1 \
|
||||
libjpeg-dev=1:2.1.5-2 \
|
||||
libfreetype-dev=2.12.1+dfsg-5 \
|
||||
libssl-dev=3.0.11-1~deb12u2 \
|
||||
libffi-dev=3.4.4-1 \
|
||||
libopenjp2-7=2.5.0-2 \
|
||||
libtiff6=4.5.0-6+deb12u1 \
|
||||
cargo=0.66.0+ds1-1 \
|
||||
pkg-config=1.8.1-1 \
|
||||
gcc-arm-linux-gnueabihf=4:12.2.0-3; \
|
||||
fi; \
|
||||
rm -rf \
|
||||
patch=2.7.6-7 \
|
||||
&& ( \
|
||||
( \
|
||||
[ "$TARGETARCH$TARGETVARIANT" = "armv7" ] && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential=12.9 \
|
||||
python3-dev=3.11.2-1+b1 \
|
||||
zlib1g-dev=1:1.2.13.dfsg-1 \
|
||||
libjpeg-dev=1:2.1.5-2 \
|
||||
libfreetype-dev=2.12.1+dfsg-5+deb12u3 \
|
||||
libssl-dev=3.0.13-1~deb12u1 \
|
||||
libffi-dev=3.4.4-1 \
|
||||
libopenjp2-7=2.5.0-2 \
|
||||
libtiff6=4.5.0-6+deb12u1 \
|
||||
cargo=0.66.0+ds1-1 \
|
||||
pkg-config=1.8.1-1 \
|
||||
gcc-arm-linux-gnueabihf=4:12.2.0-3 \
|
||||
) \
|
||||
|| [ "$TARGETARCH$TARGETVARIANT" != "armv7" ] \
|
||||
) \
|
||||
&& rm -rf \
|
||||
/tmp/* \
|
||||
/var/{cache,log}/* \
|
||||
/var/lib/apt/lists/*
|
||||
@@ -190,8 +194,8 @@ RUN \
|
||||
clang-format-13=1:13.0.1-11+b2 \
|
||||
clang-tidy-14=1:14.0.6-12 \
|
||||
patch=2.7.6-7 \
|
||||
software-properties-common=0.99.30-4 \
|
||||
nano=7.2-1 \
|
||||
software-properties-common=0.99.30-4.1~deb12u1 \
|
||||
nano=7.2-1+deb12u1 \
|
||||
build-essential=12.9 \
|
||||
python3-dev=3.11.2-1+b1 \
|
||||
&& rm -rf \
|
||||
|
@@ -60,6 +60,7 @@ from esphome.cpp_types import ( # noqa
|
||||
std_ns,
|
||||
std_shared_ptr,
|
||||
std_string,
|
||||
std_string_ref,
|
||||
std_vector,
|
||||
uint8,
|
||||
uint16,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import i2c, esp32
|
||||
from esphome.const import CONF_ID, CONF_TEMPERATURE_OFFSET
|
||||
from esphome.const import CONF_ID, CONF_SAMPLE_RATE, CONF_TEMPERATURE_OFFSET
|
||||
|
||||
CODEOWNERS = ["@trvrnrth"]
|
||||
DEPENDENCIES = ["i2c"]
|
||||
@@ -11,7 +11,6 @@ MULTI_CONF = True
|
||||
CONF_BME680_BSEC_ID = "bme680_bsec_id"
|
||||
CONF_IAQ_MODE = "iaq_mode"
|
||||
CONF_SUPPLY_VOLTAGE = "supply_voltage"
|
||||
CONF_SAMPLE_RATE = "sample_rate"
|
||||
CONF_STATE_SAVE_INTERVAL = "state_save_interval"
|
||||
|
||||
bme680_bsec_ns = cg.esphome_ns.namespace("bme680_bsec")
|
||||
|
@@ -4,33 +4,33 @@ from esphome.components import sensor
|
||||
from esphome.const import (
|
||||
CONF_GAS_RESISTANCE,
|
||||
CONF_HUMIDITY,
|
||||
CONF_IAQ_ACCURACY,
|
||||
CONF_PRESSURE,
|
||||
CONF_SAMPLE_RATE,
|
||||
CONF_TEMPERATURE,
|
||||
DEVICE_CLASS_ATMOSPHERIC_PRESSURE,
|
||||
DEVICE_CLASS_CARBON_DIOXIDE,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS_PARTS,
|
||||
DEVICE_CLASS_ATMOSPHERIC_PRESSURE,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS_PARTS,
|
||||
ICON_GAS_CYLINDER,
|
||||
ICON_GAUGE,
|
||||
STATE_CLASS_MEASUREMENT,
|
||||
UNIT_CELSIUS,
|
||||
UNIT_HECTOPASCAL,
|
||||
UNIT_OHM,
|
||||
UNIT_PARTS_PER_MILLION,
|
||||
UNIT_PERCENT,
|
||||
ICON_GAS_CYLINDER,
|
||||
ICON_GAUGE,
|
||||
)
|
||||
from . import (
|
||||
BME680BSECComponent,
|
||||
CONF_BME680_BSEC_ID,
|
||||
CONF_SAMPLE_RATE,
|
||||
SAMPLE_RATE_OPTIONS,
|
||||
)
|
||||
|
||||
DEPENDENCIES = ["bme680_bsec"]
|
||||
|
||||
CONF_IAQ = "iaq"
|
||||
CONF_IAQ_ACCURACY = "iaq_accuracy"
|
||||
CONF_CO2_EQUIVALENT = "co2_equivalent"
|
||||
CONF_BREATH_VOC_EQUIVALENT = "breath_voc_equivalent"
|
||||
UNIT_IAQ = "IAQ"
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome.components import text_sensor
|
||||
from esphome.const import CONF_IAQ_ACCURACY
|
||||
from . import BME680BSECComponent, CONF_BME680_BSEC_ID
|
||||
|
||||
DEPENDENCIES = ["bme680_bsec"]
|
||||
|
||||
CONF_IAQ_ACCURACY = "iaq_accuracy"
|
||||
ICON_ACCURACY = "mdi:checkbox-marked-circle-outline"
|
||||
|
||||
TYPES = [CONF_IAQ_ACCURACY]
|
||||
|
@@ -145,24 +145,21 @@ bool DallasTemperatureSensor::check_scratch_pad_() {
|
||||
float DallasTemperatureSensor::get_temp_c_() {
|
||||
int16_t temp = (this->scratch_pad_[1] << 8) | this->scratch_pad_[0];
|
||||
if ((this->address_ & 0xff) == DALLAS_MODEL_DS18S20) {
|
||||
if (this->scratch_pad_[7] != 0x10)
|
||||
ESP_LOGE(TAG, "unexpected COUNT_PER_C value: %u", this->scratch_pad_[7]);
|
||||
temp = ((temp & 0xfff7) << 3) + (0x10 - this->scratch_pad_[6]) - 4;
|
||||
} else {
|
||||
switch (this->resolution_) {
|
||||
case 9:
|
||||
temp &= 0xfff8;
|
||||
break;
|
||||
case 10:
|
||||
temp &= 0xfffc;
|
||||
break;
|
||||
case 11:
|
||||
temp &= 0xfffe;
|
||||
break;
|
||||
case 12:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (temp >> 1) + (this->scratch_pad_[7] - this->scratch_pad_[6]) / float(this->scratch_pad_[7]) - 0.25;
|
||||
}
|
||||
switch (this->resolution_) {
|
||||
case 9:
|
||||
temp &= 0xfff8;
|
||||
break;
|
||||
case 10:
|
||||
temp &= 0xfffc;
|
||||
break;
|
||||
case 11:
|
||||
temp &= 0xfffe;
|
||||
break;
|
||||
case 12:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return temp / 16.0f;
|
||||
|
@@ -37,14 +37,18 @@ void DS1307Component::read_time() {
|
||||
ESP_LOGW(TAG, "RTC halted, not syncing to system clock.");
|
||||
return;
|
||||
}
|
||||
ESPTime rtc_time{.second = uint8_t(ds1307_.reg.second + 10 * ds1307_.reg.second_10),
|
||||
.minute = uint8_t(ds1307_.reg.minute + 10u * ds1307_.reg.minute_10),
|
||||
.hour = uint8_t(ds1307_.reg.hour + 10u * ds1307_.reg.hour_10),
|
||||
.day_of_week = uint8_t(ds1307_.reg.weekday),
|
||||
.day_of_month = uint8_t(ds1307_.reg.day + 10u * ds1307_.reg.day_10),
|
||||
.day_of_year = 1, // ignored by recalc_timestamp_utc(false)
|
||||
.month = uint8_t(ds1307_.reg.month + 10u * ds1307_.reg.month_10),
|
||||
.year = uint16_t(ds1307_.reg.year + 10u * ds1307_.reg.year_10 + 2000)};
|
||||
ESPTime rtc_time{
|
||||
.second = uint8_t(ds1307_.reg.second + 10 * ds1307_.reg.second_10),
|
||||
.minute = uint8_t(ds1307_.reg.minute + 10u * ds1307_.reg.minute_10),
|
||||
.hour = uint8_t(ds1307_.reg.hour + 10u * ds1307_.reg.hour_10),
|
||||
.day_of_week = uint8_t(ds1307_.reg.weekday),
|
||||
.day_of_month = uint8_t(ds1307_.reg.day + 10u * ds1307_.reg.day_10),
|
||||
.day_of_year = 1, // ignored by recalc_timestamp_utc(false)
|
||||
.month = uint8_t(ds1307_.reg.month + 10u * ds1307_.reg.month_10),
|
||||
.year = uint16_t(ds1307_.reg.year + 10u * ds1307_.reg.year_10 + 2000),
|
||||
.is_dst = false, // not used
|
||||
.timestamp = 0 // overwritten by recalc_timestamp_utc(false)
|
||||
};
|
||||
rtc_time.recalc_timestamp_utc(false);
|
||||
if (!rtc_time.is_valid()) {
|
||||
ESP_LOGE(TAG, "Invalid RTC time, not syncing to system clock.");
|
||||
|
@@ -1,10 +1,17 @@
|
||||
import logging
|
||||
|
||||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
import esphome.final_validate as fv
|
||||
from esphome.components.ota import BASE_OTA_SCHEMA, ota_to_code, OTAComponent
|
||||
from esphome.config_helpers import merge_config
|
||||
from esphome.const import (
|
||||
CONF_ESPHOME,
|
||||
CONF_ID,
|
||||
CONF_NUM_ATTEMPTS,
|
||||
CONF_OTA,
|
||||
CONF_PASSWORD,
|
||||
CONF_PLATFORM,
|
||||
CONF_PORT,
|
||||
CONF_REBOOT_TIMEOUT,
|
||||
CONF_SAFE_MODE,
|
||||
@@ -12,6 +19,8 @@ from esphome.const import (
|
||||
)
|
||||
from esphome.core import coroutine_with_priority
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CODEOWNERS = ["@esphome/core"]
|
||||
AUTO_LOAD = ["md5", "socket"]
|
||||
@@ -21,6 +30,65 @@ esphome = cg.esphome_ns.namespace("esphome")
|
||||
ESPHomeOTAComponent = esphome.class_("ESPHomeOTAComponent", OTAComponent)
|
||||
|
||||
|
||||
def ota_esphome_final_validate(config):
|
||||
full_conf = fv.full_config.get()
|
||||
full_ota_conf = full_conf[CONF_OTA]
|
||||
new_ota_conf = []
|
||||
merged_ota_esphome_configs_by_port = {}
|
||||
ports_with_merged_configs = []
|
||||
for ota_conf in full_ota_conf:
|
||||
if ota_conf.get(CONF_PLATFORM) == CONF_ESPHOME:
|
||||
if (
|
||||
conf_port := ota_conf.get(CONF_PORT)
|
||||
) not in merged_ota_esphome_configs_by_port:
|
||||
merged_ota_esphome_configs_by_port[conf_port] = ota_conf
|
||||
else:
|
||||
if merged_ota_esphome_configs_by_port[conf_port][
|
||||
CONF_VERSION
|
||||
] != ota_conf.get(CONF_VERSION):
|
||||
raise cv.Invalid(
|
||||
f"Found multiple configurations but {CONF_VERSION} is inconsistent"
|
||||
)
|
||||
if (
|
||||
merged_ota_esphome_configs_by_port[conf_port][CONF_ID].is_manual
|
||||
and ota_conf.get(CONF_ID).is_manual
|
||||
):
|
||||
raise cv.Invalid(
|
||||
f"Found multiple configurations but {CONF_ID} is inconsistent"
|
||||
)
|
||||
if (
|
||||
CONF_PASSWORD in merged_ota_esphome_configs_by_port[conf_port]
|
||||
and CONF_PASSWORD in ota_conf
|
||||
and merged_ota_esphome_configs_by_port[conf_port][CONF_PASSWORD]
|
||||
!= ota_conf.get(CONF_PASSWORD)
|
||||
):
|
||||
raise cv.Invalid(
|
||||
f"Found multiple configurations but {CONF_PASSWORD} is inconsistent"
|
||||
)
|
||||
|
||||
ports_with_merged_configs.append(conf_port)
|
||||
merged_ota_esphome_configs_by_port[conf_port] = merge_config(
|
||||
merged_ota_esphome_configs_by_port[conf_port], ota_conf
|
||||
)
|
||||
else:
|
||||
new_ota_conf.append(ota_conf)
|
||||
|
||||
for port_conf in merged_ota_esphome_configs_by_port.values():
|
||||
new_ota_conf.append(port_conf)
|
||||
|
||||
full_conf[CONF_OTA] = new_ota_conf
|
||||
fv.full_config.set(full_conf)
|
||||
|
||||
if len(ports_with_merged_configs) > 0:
|
||||
_LOGGER.warning(
|
||||
"Found and merged multiple configurations for %s %s %s port(s) %s",
|
||||
CONF_OTA,
|
||||
CONF_PLATFORM,
|
||||
CONF_ESPHOME,
|
||||
ports_with_merged_configs,
|
||||
)
|
||||
|
||||
|
||||
CONFIG_SCHEMA = (
|
||||
cv.Schema(
|
||||
{
|
||||
@@ -50,6 +118,8 @@ CONFIG_SCHEMA = (
|
||||
.extend(cv.COMPONENT_SCHEMA)
|
||||
)
|
||||
|
||||
FINAL_VALIDATE_SCHEMA = ota_esphome_final_validate
|
||||
|
||||
|
||||
@coroutine_with_priority(52.0)
|
||||
async def to_code(config):
|
||||
|
@@ -257,7 +257,7 @@ async def http_request_action_to_code(config, action_id, template_arg, args):
|
||||
trigger,
|
||||
[
|
||||
(cg.std_shared_ptr.template(HttpContainer), "response"),
|
||||
(cg.std_string, "body"),
|
||||
(cg.std_string_ref, "body"),
|
||||
],
|
||||
conf,
|
||||
)
|
||||
|
@@ -43,10 +43,10 @@ class HttpContainer : public Parented<HttpRequestComponent> {
|
||||
bool secure_{false};
|
||||
};
|
||||
|
||||
class HttpRequestResponseTrigger : public Trigger<std::shared_ptr<HttpContainer>, std::string> {
|
||||
class HttpRequestResponseTrigger : public Trigger<std::shared_ptr<HttpContainer>, std::string &> {
|
||||
public:
|
||||
void process(std::shared_ptr<HttpContainer> container, std::string response_body) {
|
||||
this->trigger(std::move(container), std::move(response_body));
|
||||
void process(std::shared_ptr<HttpContainer> container, std::string &response_body) {
|
||||
this->trigger(std::move(container), response_body);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -153,8 +153,17 @@ template<typename... Ts> class HttpRequestSendAction : public Action<Ts...> {
|
||||
}
|
||||
}
|
||||
|
||||
for (auto *trigger : this->response_triggers_) {
|
||||
trigger->process(container, response_body);
|
||||
if (this->response_triggers_.size() == 1) {
|
||||
// if there is only one trigger, no need to copy the response body
|
||||
this->response_triggers_[0]->process(container, response_body);
|
||||
} else {
|
||||
for (auto *trigger : this->response_triggers_) {
|
||||
// with multiple triggers, pass a copy of the response body to each
|
||||
// one so that modifications made in one trigger are not visible to
|
||||
// the others
|
||||
auto response_body_copy = std::string(response_body);
|
||||
trigger->process(container, response_body_copy);
|
||||
}
|
||||
}
|
||||
container->end();
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ import esphome.config_validation as cv
|
||||
import esphome.codegen as cg
|
||||
|
||||
from esphome import pins
|
||||
from esphome.const import CONF_CHANNEL, CONF_ID, CONF_NUMBER
|
||||
from esphome.const import CONF_CHANNEL, CONF_ID, CONF_NUMBER, CONF_SAMPLE_RATE
|
||||
from esphome.components import microphone, esp32
|
||||
from esphome.components.adc import ESP32_VARIANT_ADC1_PIN_TO_CHANNEL, validate_adc_pin
|
||||
|
||||
@@ -20,7 +20,6 @@ DEPENDENCIES = ["i2s_audio"]
|
||||
CONF_ADC_PIN = "adc_pin"
|
||||
CONF_ADC_TYPE = "adc_type"
|
||||
CONF_PDM = "pdm"
|
||||
CONF_SAMPLE_RATE = "sample_rate"
|
||||
CONF_BITS_PER_SAMPLE = "bits_per_sample"
|
||||
CONF_USE_APLL = "use_apll"
|
||||
|
||||
|
@@ -115,12 +115,15 @@ void LEDCOutput::write_state(float state) {
|
||||
const uint32_t max_duty = (uint32_t(1) << this->bit_depth_) - 1;
|
||||
const float duty_rounded = roundf(state * max_duty);
|
||||
auto duty = static_cast<uint32_t>(duty_rounded);
|
||||
|
||||
#ifdef USE_ARDUINO
|
||||
ESP_LOGV(TAG, "Setting duty: %u on channel %u", duty, this->channel_);
|
||||
ledcWrite(this->channel_, duty);
|
||||
#endif
|
||||
#ifdef USE_ESP_IDF
|
||||
// ensure that 100% on is not 99.975% on
|
||||
if ((duty == max_duty) && (max_duty != 1)) {
|
||||
duty = max_duty + 1;
|
||||
}
|
||||
auto speed_mode = get_speed_mode(channel_);
|
||||
auto chan_num = static_cast<ledc_channel_t>(channel_ % 8);
|
||||
int hpoint = ledc_angle_to_htop(this->phase_angle_, this->bit_depth_);
|
||||
|
@@ -116,7 +116,8 @@ void ModbusController::on_modbus_read_registers(uint8_t function_code, uint16_t
|
||||
ESP_LOGD(TAG, "Matched register. Address: 0x%02X. Value type: %zu. Register count: %u. Value: %0.1f.",
|
||||
server_register->address, static_cast<uint8_t>(server_register->value_type),
|
||||
server_register->register_count, value);
|
||||
number_to_payload(sixteen_bit_response, value, server_register->value_type);
|
||||
std::vector<uint16_t> payload = float_to_payload(value, server_register->value_type);
|
||||
sixteen_bit_response.insert(sixteen_bit_response.end(), payload.cbegin(), payload.cend());
|
||||
current_address += server_register->register_count;
|
||||
found = true;
|
||||
break;
|
||||
|
@@ -15,7 +15,7 @@ void ModbusTextSensor::parse_and_publish(const std::vector<uint8_t> &data) {
|
||||
std::ostringstream output;
|
||||
uint8_t items_left = this->response_bytes;
|
||||
uint8_t index = this->offset;
|
||||
char buffer[4];
|
||||
char buffer[5];
|
||||
while ((items_left > 0) && index < data.size()) {
|
||||
uint8_t b = data[index];
|
||||
switch (this->encode_) {
|
||||
|
@@ -27,7 +27,7 @@ async def to_code(config):
|
||||
var = await binary_sensor.new_binary_sensor(config)
|
||||
hub = await cg.get_variable(config[CONF_MPR121_ID])
|
||||
cg.add(var.set_channel(config[CONF_CHANNEL]))
|
||||
cg.register_parented(var, hub)
|
||||
await cg.register_parented(var, hub)
|
||||
|
||||
if CONF_TOUCH_THRESHOLD in config:
|
||||
cg.add(var.set_touch_threshold(config[CONF_TOUCH_THRESHOLD]))
|
||||
|
@@ -56,21 +56,20 @@ CONFIG_SCHEMA = cv.All(
|
||||
|
||||
@coroutine_with_priority(50.0)
|
||||
async def to_code(config):
|
||||
if config[CONF_DISABLED]:
|
||||
return
|
||||
if not config[CONF_DISABLED]:
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
await cg.register_component(var, config)
|
||||
for conf in config.get(CONF_ON_SAFE_MODE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(trigger, [], conf)
|
||||
|
||||
for conf in config.get(CONF_ON_SAFE_MODE, []):
|
||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||
await automation.build_automation(trigger, [], conf)
|
||||
condition = var.should_enter_safe_mode(
|
||||
config[CONF_NUM_ATTEMPTS],
|
||||
config[CONF_REBOOT_TIMEOUT],
|
||||
config[CONF_BOOT_IS_GOOD_AFTER],
|
||||
)
|
||||
cg.add(RawExpression(f"if ({condition}) return"))
|
||||
|
||||
condition = var.should_enter_safe_mode(
|
||||
config[CONF_NUM_ATTEMPTS],
|
||||
config[CONF_REBOOT_TIMEOUT],
|
||||
config[CONF_BOOT_IS_GOOD_AFTER],
|
||||
)
|
||||
cg.add(RawExpression(f"if ({condition}) return"))
|
||||
CORE.data[CONF_SAFE_MODE] = {}
|
||||
CORE.data[CONF_SAFE_MODE][KEY_PAST_SAFE_MODE] = True
|
||||
|
@@ -114,7 +114,7 @@ EAP_AUTH_SCHEMA = cv.All(
|
||||
cv.Optional(CONF_USERNAME): cv.string_strict,
|
||||
cv.Optional(CONF_PASSWORD): cv.string_strict,
|
||||
cv.Optional(CONF_CERTIFICATE_AUTHORITY): wpa2_eap.validate_certificate,
|
||||
cv.Optional(CONF_TTLS_PHASE_2): cv.All(
|
||||
cv.SplitDefault(CONF_TTLS_PHASE_2, esp32_idf="mschapv2"): cv.All(
|
||||
cv.enum(TTLS_PHASE_2), cv.only_with_esp_idf
|
||||
),
|
||||
cv.Inclusive(
|
||||
@@ -350,7 +350,7 @@ def eap_auth(config):
|
||||
("ca_cert", ca_cert),
|
||||
("client_cert", client_cert),
|
||||
("client_key", key),
|
||||
("ttls_phase_2", config.get(CONF_TTLS_PHASE_2, TTLS_PHASE_2["mschapv2"])),
|
||||
("ttls_phase_2", config.get(CONF_TTLS_PHASE_2)),
|
||||
)
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
"""Constants used by esphome."""
|
||||
|
||||
__version__ = "2024.6.2"
|
||||
__version__ = "2024.6.6"
|
||||
|
||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||
@@ -355,6 +355,7 @@ CONF_HUMIDITY_SENSOR = "humidity_sensor"
|
||||
CONF_HYSTERESIS = "hysteresis"
|
||||
CONF_I2C = "i2c"
|
||||
CONF_I2C_ID = "i2c_id"
|
||||
CONF_IAQ_ACCURACY = "iaq_accuracy"
|
||||
CONF_IBEACON_MAJOR = "ibeacon_major"
|
||||
CONF_IBEACON_MINOR = "ibeacon_minor"
|
||||
CONF_IBEACON_UUID = "ibeacon_uuid"
|
||||
@@ -719,6 +720,7 @@ CONF_RX_BUFFER_SIZE = "rx_buffer_size"
|
||||
CONF_RX_ONLY = "rx_only"
|
||||
CONF_RX_PIN = "rx_pin"
|
||||
CONF_SAFE_MODE = "safe_mode"
|
||||
CONF_SAMPLE_RATE = "sample_rate"
|
||||
CONF_SAMSUNG = "samsung"
|
||||
CONF_SATELLITES = "satellites"
|
||||
CONF_SCAN = "scan"
|
||||
|
@@ -10,6 +10,7 @@ int_ = global_ns.namespace("int")
|
||||
std_ns = global_ns.namespace("std")
|
||||
std_shared_ptr = std_ns.class_("shared_ptr")
|
||||
std_string = std_ns.class_("string")
|
||||
std_string_ref = std_ns.namespace("string &")
|
||||
std_vector = std_ns.class_("vector")
|
||||
uint8 = global_ns.namespace("uint8_t")
|
||||
uint16 = global_ns.namespace("uint16_t")
|
||||
|
7
tests/components/wifi/test-eap.esp32-ard.yaml
Normal file
7
tests/components/wifi/test-eap.esp32-ard.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: MySSID
|
||||
eap:
|
||||
username: username
|
||||
password: password
|
||||
identity: identity
|
Reference in New Issue
Block a user