mirror of
https://github.com/esphome/esphome.git
synced 2024-12-25 06:54:52 +01:00
Update CODEOWNERS and fix pre-commit hook
This commit is contained in:
parent
a8f1753e17
commit
dadc8f41c6
2 changed files with 22 additions and 18 deletions
|
@ -291,6 +291,7 @@ esphome/components/number/* @esphome/core
|
|||
esphome/components/one_wire/* @ssieb
|
||||
esphome/components/online_image/* @guillempages
|
||||
esphome/components/opentherm/* @olegtarasov
|
||||
esphome/components/openthread/* @mrene
|
||||
esphome/components/ota/* @esphome/core
|
||||
esphome/components/output/* @esphome/core
|
||||
esphome/components/pca6416a/* @Mat931
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
# from esphome.components.zephyr import ZEPHYR_CORE_KEY
|
||||
from esphome.const import (KEY_CORE, KEY_TARGET_PLATFORM, CONF_ID, CONF_MAC_ADDRESS)
|
||||
|
||||
from esphome.core import CORE, EsphomeError, coroutine_with_priority
|
||||
import esphome.config_validation as cv
|
||||
import esphome.codegen as cg
|
||||
|
||||
from esphome.components.esp32 import add_idf_sdkconfig_option, const, get_esp32_variant, add_idf_component
|
||||
from esphome.components.esp32 import add_idf_sdkconfig_option
|
||||
from esphome.components.mdns import MDNSComponent
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_CHANNEL, CONF_ID
|
||||
from esphome.core import CORE
|
||||
|
||||
AUTO_LOAD = ["network"] #"openthread_srp"
|
||||
CODEOWNERS = ["@mrene"]
|
||||
|
||||
AUTO_LOAD = ["network"]
|
||||
|
||||
# Wi-fi / Bluetooth / Thread coexistence isn't implemented at this time
|
||||
# TODO: Doesn't conflict with wifi if you're using another ESP as an RCP (radio coprocessor)
|
||||
|
@ -16,7 +15,6 @@ CONFLICTS_WITH = ["wifi"]
|
|||
DEPENDENCIES = ["esp32"]
|
||||
|
||||
CONF_NETWORK_NAME = "network_name"
|
||||
CONF_CHANNEL = "channel"
|
||||
CONF_NETWORK_KEY = "network_key"
|
||||
CONF_PSKC = "pskc"
|
||||
CONF_PANID = "panid"
|
||||
|
@ -25,7 +23,6 @@ CONF_MDNS_ID = "mdns_id"
|
|||
|
||||
|
||||
def set_sdkconfig_options(config):
|
||||
|
||||
if not (CORE.is_esp32 and CORE.using_esp_idf):
|
||||
raise cv.Invalid("OpenThread is only supported on ESP32 with ESP-IDF")
|
||||
|
||||
|
@ -40,19 +37,27 @@ def set_sdkconfig_options(config):
|
|||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_ENABLED", True)
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_NETWORK_PANID", config[CONF_PANID])
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_NETWORK_CHANNEL", config[CONF_CHANNEL])
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_NETWORK_MASTERKEY", f'{config[CONF_NETWORK_KEY]}')
|
||||
add_idf_sdkconfig_option(
|
||||
"CONFIG_OPENTHREAD_NETWORK_MASTERKEY", f"{config[CONF_NETWORK_KEY]}"
|
||||
)
|
||||
|
||||
if config[CONF_NETWORK_NAME]:
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_NETWORK_NAME", f'{config[CONF_NETWORK_NAME]}')
|
||||
add_idf_sdkconfig_option(
|
||||
"CONFIG_OPENTHREAD_NETWORK_NAME", f"{config[CONF_NETWORK_NAME]}"
|
||||
)
|
||||
if config[CONF_EXTPANID]:
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_NETWORK_EXTPANID", f'{config[CONF_EXTPANID]}')
|
||||
add_idf_sdkconfig_option(
|
||||
"CONFIG_OPENTHREAD_NETWORK_EXTPANID", f"{config[CONF_EXTPANID]}"
|
||||
)
|
||||
if config[CONF_PSKC]:
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_NETWORK_PSKC", f'{config[CONF_PSKC]}')
|
||||
add_idf_sdkconfig_option(
|
||||
"CONFIG_OPENTHREAD_NETWORK_PSKC", f"{config[CONF_PSKC]}"
|
||||
)
|
||||
|
||||
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)
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_FTD", True) # Full Thread Device
|
||||
add_idf_sdkconfig_option("CONFIG_OPENTHREAD_FTD", True) # Full Thread Device
|
||||
|
||||
|
||||
openthread_ns = cg.esphome_ns.namespace("openthread")
|
||||
|
@ -85,8 +90,6 @@ async def to_code(config):
|
|||
cg.add_global(cg.RawStatement('#include "esp_openthread.h"'))
|
||||
cg.add_global(cg.RawStatement('#include "esp_openthread_lock.h"'))
|
||||
cg.add_global(cg.RawStatement('#include "esp_task_wdt.h"'))
|
||||
cg.add_global(cg.RawStatement('#include <openthread/thread.h>'))
|
||||
cg.add_global(cg.RawStatement("#include <openthread/thread.h>"))
|
||||
|
||||
set_sdkconfig_options(config)
|
||||
|
||||
# file /home/mrene/dev/esp/thread/.esphome/build/ott-h2/.pioenvs/ott-h2/firmware.elf
|
||||
|
|
Loading…
Reference in a new issue