1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-17 15:26:01 +00:00

Compare commits

...

23 Commits

Author SHA1 Message Date
J. Nick Koston
8b1f3b2b08 Merge branch 'bh1750_loop' into integration 2025-11-17 09:20:55 -06:00
J. Nick Koston
499ad18475 Merge branch 'dashboard_import_url_store_rodata' into integration 2025-11-17 09:13:30 -06:00
J. Nick Koston
0afaf182da Merge branch 'dev' into dashboard_import_url_store_rodata 2025-11-17 09:12:57 -06:00
J. Nick Koston
43f2405dc3 [dashboard_import] Store package import URL in .rodata instead of RAM 2025-11-17 09:10:51 -06:00
J. Nick Koston
41ac12a0e1 Update esphome/components/bh1750/bh1750.cpp 2025-11-17 08:48:42 -06:00
J. Nick Koston
a6f416a09e Update esphome/components/bh1750/bh1750.cpp 2025-11-17 08:48:13 -06:00
Javier Peletier
9e1f8d83f8 [config] Support !remove and !extend with LVGL-style configs (#11534) 2025-11-17 18:03:11 +11:00
Jesse Hills
fa0aa6defc Merge branch 'beta' into dev 2025-11-17 17:41:46 +13:00
Jesse Hills
70366d2124 Merge pull request #11944 from esphome/bump-2025.11.0b3
2025.11.0b3
2025-11-17 17:41:11 +13:00
Jesse Hills
a38c4e0c6e Bump version to 2025.11.0b3 2025-11-17 15:32:09 +13:00
Anton Sergunov
6c6b03bda0 [uart] Setup uart pins only if flags are set (#11914)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2025-11-17 15:32:09 +13:00
J. Nick Koston
9e02e31917 [web_server_idf] Fix lwIP assertion crash by shutting down sockets on connection close (#11937) 2025-11-17 15:32:09 +13:00
J. Nick Koston
3fd58f1a91 [web_server.ota] Merge multiple instances to prevent undefined behavior (#11905) 2025-11-17 15:32:09 +13:00
J. Nick Koston
9151489481 [sntp] Merge multiple instances to fix crash and undefined behavior (#11904) 2025-11-17 15:32:09 +13:00
J. Nick Koston
f19296ac7f [analyze-memory] Show all core symbols > 100 B instead of top 15 (#11909) 2025-11-17 15:32:09 +13:00
J. Nick Koston
36868ee7b1 [scheduler] Fix timing breakage after 49 days of uptime on ESP8266/RP2040 (#11924) 2025-11-17 15:32:09 +13:00
J. Nick Koston
d559f9f52e [ld2410] Add timeout filter to prevent stuck targets (#11920) 2025-11-17 15:32:09 +13:00
J. Nick Koston
6440b5fbf5 [ld2412] Fix stuck targets by adding timeout filter (#11919) 2025-11-17 15:32:09 +13:00
Jonathan Swoboda
97c4914573 [uart] Improve error handling and validate buffer size (#11895)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2025-11-17 15:32:09 +13:00
Edward Firmo
7ce94c27fe [wifi] Allow use_psram with Arduino (#11902) 2025-11-17 15:32:09 +13:00
Edward Firmo
eb54c0026d [light] Fix missing ColorMode::BRIGHTNESS case in logging (#11836) 2025-11-17 15:32:09 +13:00
Clyde Stubbs
fe00e209ff [esp32] Add sdkconfig flag to make OTA work for 32MB flash (#11883)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2025-11-17 15:32:08 +13:00
Clyde Stubbs
aed80732f9 [esp32] Make esp-idf default framework for P4 (#11884) 2025-11-17 15:32:08 +13:00
7 changed files with 112 additions and 33 deletions

View File

@@ -131,7 +131,8 @@ void BH1750Sensor::loop() {
this->process_coarse_result_(lx);
// Start fine measurement with optimal settings
if (!this->start_measurement_(this->fine_mode_, this->fine_mtreg_, now)) {
// fetch millis() again since the read can take a bit
if (!this->start_measurement_(this->fine_mode_, this->fine_mtreg_, millis())) {
this->fail_and_reset_();
break;
}

View File

@@ -3,10 +3,10 @@
namespace esphome {
namespace dashboard_import {
static std::string g_package_import_url; // NOLINT
static const char *g_package_import_url = ""; // NOLINT
const std::string &get_package_import_url() { return g_package_import_url; }
void set_package_import_url(std::string url) { g_package_import_url = std::move(url); }
const char *get_package_import_url() { return g_package_import_url; }
void set_package_import_url(const char *url) { g_package_import_url = url; }
} // namespace dashboard_import
} // namespace esphome

View File

@@ -1,12 +1,10 @@
#pragma once
#include <string>
namespace esphome {
namespace dashboard_import {
const std::string &get_package_import_url();
void set_package_import_url(std::string url);
const char *get_package_import_url();
void set_package_import_url(const char *url);
} // namespace dashboard_import
} // namespace esphome

View File

@@ -135,8 +135,7 @@ void MDNSComponent::compile_records_(StaticVector<MDNSService, MDNS_SERVICE_COUN
#ifdef USE_DASHBOARD_IMPORT
MDNS_STATIC_CONST_CHAR(TXT_PACKAGE_IMPORT_URL, "package_import_url");
txt_records.push_back(
{MDNS_STR(TXT_PACKAGE_IMPORT_URL), MDNS_STR(dashboard_import::get_package_import_url().c_str())});
txt_records.push_back({MDNS_STR(TXT_PACKAGE_IMPORT_URL), MDNS_STR(dashboard_import::get_package_import_url())});
#endif
}
#endif // USE_API

View File

@@ -338,21 +338,44 @@ def check_replaceme(value):
)
def _build_list_index(lst):
def _get_item_id(item: Any) -> str | Extend | Remove | None:
"""Attempts to get a list item's ID"""
if not isinstance(item, dict):
return None # not a dict, can't have ID
# 1.- Check regular case:
# - id: my_id
item_id = item.get(CONF_ID)
if item_id is None and len(item) == 1:
# 2.- Check single-key dict case:
# - obj:
# id: my_id
item = next(iter(item.values()))
if isinstance(item, dict):
item_id = item.get(CONF_ID)
if isinstance(item_id, Extend):
# Remove instances of Extend so they don't overwrite the original item when merging:
del item[CONF_ID]
return item_id
def _build_list_index(
lst: list[Any],
) -> tuple[
OrderedDict[str | Extend | Remove, Any], list[tuple[int, str, Any]], set[str]
]:
index = OrderedDict()
extensions, removals = [], set()
for item in lst:
for pos, item in enumerate(lst):
if item is None:
removals.add(None)
continue
item_id = None
if isinstance(item, dict) and (item_id := item.get(CONF_ID)):
if isinstance(item_id, Extend):
extensions.append(item)
continue
if isinstance(item_id, Remove):
removals.add(item_id.value)
continue
item_id = _get_item_id(item)
if isinstance(item_id, Extend):
extensions.append((pos, item_id.value, item))
continue
if isinstance(item_id, Remove):
removals.add(item_id.value)
continue
if not item_id or item_id in index:
# no id or duplicate -> pass through with identity-based key
item_id = id(item)
@@ -360,7 +383,7 @@ def _build_list_index(lst):
return index, extensions, removals
def resolve_extend_remove(value, is_key=None):
def resolve_extend_remove(value: Any, is_key: bool = False) -> None:
if isinstance(value, ESPLiteralValue):
return # do not check inside literal blocks
if isinstance(value, list):
@@ -368,26 +391,16 @@ def resolve_extend_remove(value, is_key=None):
if extensions or removals:
# Rebuild the original list after
# processing all extensions and removals
for item in extensions:
item_id = item[CONF_ID].value
for pos, item_id, item in extensions:
if item_id in removals:
continue
old = index.get(item_id)
if old is None:
# Failed to find source for extension
# Find index of item to show error at correct position
i = next(
(
i
for i, d in enumerate(value)
if d.get(CONF_ID) == item[CONF_ID]
)
)
with cv.prepend_path(i):
with cv.prepend_path(pos):
raise cv.Invalid(
f"Source for extension of ID '{item_id}' was not found."
)
item[CONF_ID] = item_id
index[item_id] = merge_config(old, item)
for item_id in removals:
index.pop(item_id, None)

View File

@@ -7,3 +7,27 @@ some_component:
value: 2
- id: component2
value: 5
lvgl:
pages:
- id: page1
widgets:
- obj:
id: object1
x: 3
y: 2
width: 4
- obj:
id: object3
x: 6
y: 12
widgets:
- obj:
id: object4
x: 14
y: 9
width: 15
height: 13
- obj:
id: object5
x: 10
y: 11

View File

@@ -13,6 +13,30 @@ packages:
value: 5
- id: component3
value: 6
- lvgl:
pages:
- id: page1
widgets:
- obj:
id: object1
x: 1
y: 2
- obj:
id: object2
x: 5
- obj:
id: object3
x: 6
y: 7
widgets:
- obj:
id: object4
x: 8
y: 9
- obj:
id: object5
x: 10
y: 11
some_component:
- id: !extend ${A}
@@ -20,3 +44,23 @@ some_component:
- id: component2
value: 3
- id: !remove ${C}
lvgl:
pages:
- id: !extend page1
widgets:
- obj:
id: !extend object1
x: 3
width: 4
- obj:
id: !remove object2
- obj:
id: !extend object3
y: 12
height: 13
widgets:
- obj:
id: !extend object4
x: 14
width: 15