1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-28 21:53:48 +00: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

@@ -11,6 +11,7 @@ from esphome.const import (
KEY_FRAMEWORK_VERSION,
KEY_TARGET_FRAMEWORK,
KEY_TARGET_PLATFORM,
PLATFORM_ESP8266,
)
from esphome.core import CORE, coroutine_with_priority
import esphome.config_validation as cv
@@ -38,7 +39,7 @@ AUTO_LOAD = ["preferences"]
def set_core_data(config):
CORE.data[KEY_ESP8266] = {}
CORE.data[KEY_CORE][KEY_TARGET_PLATFORM] = "esp8266"
CORE.data[KEY_CORE][KEY_TARGET_PLATFORM] = PLATFORM_ESP8266
CORE.data[KEY_CORE][KEY_TARGET_FRAMEWORK] = "arduino"
CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION] = cv.Version.parse(
config[CONF_FRAMEWORK][CONF_VERSION]