mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 20:53:48 +01:00
Merge branch 'release' into dev
This commit is contained in:
@@ -805,6 +805,7 @@ async def to_code(config):
|
||||
add_idf_sdkconfig_option("CONFIG_AUTOSTART_ARDUINO", True)
|
||||
add_idf_sdkconfig_option("CONFIG_MBEDTLS_PSK_MODES", True)
|
||||
add_idf_sdkconfig_option("CONFIG_MBEDTLS_CERTIFICATE_BUNDLE", True)
|
||||
add_idf_sdkconfig_option("CONFIG_ESP_PHY_REDUCE_TX_POWER", True)
|
||||
|
||||
cg.add_build_flag("-Wno-nonnull-compare")
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from esphome.const import (
|
||||
CONF_COMMENT,
|
||||
CONF_ESPHOME,
|
||||
CONF_ETHERNET,
|
||||
CONF_OPENTHREAD,
|
||||
CONF_PORT,
|
||||
CONF_USE_ADDRESS,
|
||||
CONF_WEB_SERVER,
|
||||
@@ -641,6 +642,9 @@ class EsphomeCore:
|
||||
if CONF_ETHERNET in self.config:
|
||||
return self.config[CONF_ETHERNET][CONF_USE_ADDRESS]
|
||||
|
||||
if CONF_OPENTHREAD in self.config:
|
||||
return f"{self.name}.local"
|
||||
|
||||
return None
|
||||
|
||||
@property
|
||||
|
||||
@@ -570,6 +570,13 @@ class TestEsphomeCore:
|
||||
|
||||
assert target.address == "4.3.2.1"
|
||||
|
||||
def test_address__openthread(self, target):
|
||||
target.name = "test-device"
|
||||
target.config = {}
|
||||
target.config[const.CONF_OPENTHREAD] = {}
|
||||
|
||||
assert target.address == "test-device.local"
|
||||
|
||||
def test_is_esp32(self, target):
|
||||
target.data[const.KEY_CORE] = {const.KEY_TARGET_PLATFORM: "esp32"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user