1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-15 09:42:19 +01:00

Use platform consts (#5508)

This commit is contained in:
Jesse Hills
2023-10-10 10:54:15 +13:00
committed by GitHub
parent be7e167c63
commit 46be886ca6
14 changed files with 74 additions and 34 deletions

View File

@@ -25,6 +25,7 @@ from esphome.const import (
KEY_NAME,
KEY_TARGET_FRAMEWORK,
KEY_TARGET_PLATFORM,
PLATFORM_ESP32,
TYPE_GIT,
TYPE_LOCAL,
__version__,
@@ -62,7 +63,7 @@ AUTO_LOAD = ["preferences"]
def set_core_data(config):
CORE.data[KEY_ESP32] = {}
CORE.data[KEY_CORE][KEY_TARGET_PLATFORM] = "esp32"
CORE.data[KEY_CORE][KEY_TARGET_PLATFORM] = PLATFORM_ESP32
conf = config[CONF_FRAMEWORK]
if conf[CONF_TYPE] == FRAMEWORK_ESP_IDF:
CORE.data[KEY_CORE][KEY_TARGET_FRAMEWORK] = "esp-idf"