From e07af7dc103785b81640b7e474140462648695d3 Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Fri, 22 Nov 2024 23:14:00 -0500 Subject: [PATCH] openthread: add a force_dataset option to ignore the one saved in non-volatile storage --- esphome/components/openthread/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/components/openthread/__init__.py b/esphome/components/openthread/__init__.py index 9919f93a59..8fed9e795b 100644 --- a/esphome/components/openthread/__init__.py +++ b/esphome/components/openthread/__init__.py @@ -56,6 +56,10 @@ def set_sdkconfig_options(config): "CONFIG_OPENTHREAD_NETWORK_PSKC", f"{config[CONF_PSKC]}" ) + if CONF_FORCE_DATASET in config: + if config[CONF_FORCE_DATASET]: + cg.add_define("CONFIG_OPENTHREAD_FORCE_DATASET") + add_idf_sdkconfig_option("CONFIG_OPENTHREAD_DNS64_CLIENT", True) add_idf_sdkconfig_option("CONFIG_OPENTHREAD_SRP_CLIENT", True) add_idf_sdkconfig_option("CONFIG_OPENTHREAD_SRP_CLIENT_MAX_SERVICES", 5)