Merge remote-tracking branch 'upstream/dev' into integration

This commit is contained in:
J. Nick Koston
2026-03-20 12:25:10 -10:00
8 changed files with 38 additions and 13 deletions
+5 -1
View File
@@ -64,7 +64,11 @@ static constexpr uint32_t KEEPALIVE_DISCONNECT_TIMEOUT = (KEEPALIVE_TIMEOUT_MS *
// A stalled handshake from a buggy client or network glitch holds a connection
// slot, which can prevent legitimate clients from reconnecting. Also hardens
// against the less likely case of intentional connection slot exhaustion.
static constexpr uint32_t HANDSHAKE_TIMEOUT_MS = 15000;
//
// 60s is intentionally high: on ESP8266 with power_save_mode: LIGHT and weak
// WiFi (-70 dBm+), TCP retransmissions push real-world handshake times to
// 28-30s. See https://github.com/esphome/esphome/issues/14999
static constexpr uint32_t HANDSHAKE_TIMEOUT_MS = 60000;
static constexpr auto ESPHOME_VERSION_REF = StringRef::from_lit(ESPHOME_VERSION);
+5 -4
View File
@@ -530,10 +530,11 @@ void LD2450Component::handle_periodic_data_() {
}
#endif
// Store target info for zone target count
this->target_info_[index].x = tx;
this->target_info_[index].y = ty;
this->target_info_[index].is_moving = is_moving;
// Store target info for zone target count. Zero out untracked targets (td==0)
// so stale coordinates don't produce ghost counts in count_targets_in_zone_().
this->target_info_[index].x = (td > 0) ? tx : 0;
this->target_info_[index].y = (td > 0) ? ty : 0;
this->target_info_[index].is_moving = (td > 0) && is_moving;
} // End loop thru targets
+1 -1
View File
@@ -406,7 +406,7 @@ class MeterType(WidgetType):
lv.scale_section_set_style(
tvar, LV_PART.MAIN, await arc_style.get_var()
)
lw = Widget(tvar, arc_indicator_type)
lw = Widget.create(iid, tvar, arc_indicator_type)
await set_indicator_values(lw, v)
if t == CONF_TICK_STYLE:
@@ -93,13 +93,23 @@ bool WiFiComponent::wifi_mode_(optional<bool> sta, optional<bool> ap) {
return ret;
}
bool WiFiComponent::wifi_apply_power_save_() {
// ESP8266 sleep types have confusing names — LIGHT_SLEEP_T is the MORE aggressive mode.
// SDK enum: NONE_SLEEP_T=0, LIGHT_SLEEP_T=1, MODEM_SLEEP_T=2
// https://github.com/esp8266/Arduino/blob/3.1.2/tools/sdk/include/user_interface.h#L447-L451
// Arduino ESP32 compat confirms: WIFI_PS_MIN_MODEM=MODEM_SLEEP, WIFI_PS_MAX_MODEM=LIGHT_SLEEP
// https://github.com/esp8266/Arduino/blob/3.1.2/libraries/ESP8266WiFi/src/ESP8266WiFiType.h#L53-L55
sleep_type_t power_save;
switch (this->power_save_) {
case WIFI_POWER_SAVE_LIGHT:
power_save = LIGHT_SLEEP_T;
// MODEM_SLEEP_T: only the WiFi modem sleeps between DTIM beacons, CPU stays active.
// Matches ESP32's WIFI_PS_MIN_MODEM.
power_save = MODEM_SLEEP_T;
break;
case WIFI_POWER_SAVE_HIGH:
power_save = MODEM_SLEEP_T;
// LIGHT_SLEEP_T: both WiFi modem AND CPU suspend between DTIM beacons.
// Most aggressive — prevents TCP processing during sleep. Matches ESP32's WIFI_PS_MAX_MODEM.
// See https://github.com/esphome/esphome/issues/14999
power_save = LIGHT_SLEEP_T;
break;
case WIFI_POWER_SAVE_NONE:
default: