mirror of
https://github.com/esphome/esphome.git
synced 2025-01-12 07:33:19 +01:00
add target platform
This commit is contained in:
parent
027855efaf
commit
9db5872dd4
9 changed files with 44 additions and 10 deletions
|
@ -15,10 +15,11 @@ from esphome.components.libretiny.const import (
|
||||||
)
|
)
|
||||||
from esphome.core import CORE
|
from esphome.core import CORE
|
||||||
|
|
||||||
from .boards import BK72XX_BOARDS, BK72XX_BOARD_PINS
|
from .boards import BK72XX_BOARD_PINS, BK72XX_BOARDS
|
||||||
|
|
||||||
CODEOWNERS = ["@kuba2k2"]
|
CODEOWNERS = ["@kuba2k2"]
|
||||||
AUTO_LOAD = ["libretiny"]
|
AUTO_LOAD = ["libretiny"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
COMPONENT_DATA = LibreTinyComponent(
|
COMPONENT_DATA = LibreTinyComponent(
|
||||||
name=COMPONENT_BK72XX,
|
name=COMPONENT_BK72XX,
|
||||||
|
|
|
@ -64,6 +64,7 @@ from .gpio import esp32_pin_to_code # noqa
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
CODEOWNERS = ["@esphome/core"]
|
CODEOWNERS = ["@esphome/core"]
|
||||||
AUTO_LOAD = ["preferences"]
|
AUTO_LOAD = ["preferences"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
|
|
||||||
def set_core_data(config):
|
def set_core_data(config):
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import esphome.codegen as cg
|
||||||
|
import esphome.config_validation as cv
|
||||||
from esphome.const import (
|
from esphome.const import (
|
||||||
CONF_BOARD,
|
CONF_BOARD,
|
||||||
CONF_BOARD_FLASH_MODE,
|
CONF_BOARD_FLASH_MODE,
|
||||||
CONF_FRAMEWORK,
|
CONF_FRAMEWORK,
|
||||||
|
CONF_PLATFORM_VERSION,
|
||||||
CONF_SOURCE,
|
CONF_SOURCE,
|
||||||
CONF_VERSION,
|
CONF_VERSION,
|
||||||
KEY_CORE,
|
KEY_CORE,
|
||||||
|
@ -12,30 +15,26 @@ from esphome.const import (
|
||||||
KEY_TARGET_FRAMEWORK,
|
KEY_TARGET_FRAMEWORK,
|
||||||
KEY_TARGET_PLATFORM,
|
KEY_TARGET_PLATFORM,
|
||||||
PLATFORM_ESP8266,
|
PLATFORM_ESP8266,
|
||||||
CONF_PLATFORM_VERSION,
|
|
||||||
)
|
)
|
||||||
from esphome.core import CORE, coroutine_with_priority
|
from esphome.core import CORE, coroutine_with_priority
|
||||||
import esphome.config_validation as cv
|
|
||||||
import esphome.codegen as cg
|
|
||||||
from esphome.helpers import copy_file_if_changed
|
from esphome.helpers import copy_file_if_changed
|
||||||
|
|
||||||
|
from .boards import BOARDS, ESP8266_LD_SCRIPTS
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_RESTORE_FROM_FLASH,
|
|
||||||
CONF_EARLY_PIN_INIT,
|
CONF_EARLY_PIN_INIT,
|
||||||
|
CONF_RESTORE_FROM_FLASH,
|
||||||
KEY_BOARD,
|
KEY_BOARD,
|
||||||
KEY_ESP8266,
|
KEY_ESP8266,
|
||||||
KEY_FLASH_SIZE,
|
KEY_FLASH_SIZE,
|
||||||
KEY_PIN_INITIAL_STATES,
|
KEY_PIN_INITIAL_STATES,
|
||||||
esp8266_ns,
|
esp8266_ns,
|
||||||
)
|
)
|
||||||
from .boards import BOARDS, ESP8266_LD_SCRIPTS
|
|
||||||
|
|
||||||
from .gpio import PinInitialState, add_pin_initial_states_array
|
from .gpio import PinInitialState, add_pin_initial_states_array
|
||||||
|
|
||||||
|
|
||||||
CODEOWNERS = ["@esphome/core"]
|
CODEOWNERS = ["@esphome/core"]
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
AUTO_LOAD = ["preferences"]
|
AUTO_LOAD = ["preferences"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
|
|
||||||
def set_core_data(config):
|
def set_core_data(config):
|
||||||
|
|
|
@ -17,6 +17,7 @@ from .gpio import host_pin_to_code # noqa
|
||||||
|
|
||||||
CODEOWNERS = ["@esphome/core", "@clydebarrow"]
|
CODEOWNERS = ["@esphome/core", "@clydebarrow"]
|
||||||
AUTO_LOAD = ["network", "preferences"]
|
AUTO_LOAD = ["network", "preferences"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
|
|
||||||
def set_core_data(config):
|
def set_core_data(config):
|
||||||
|
|
|
@ -47,6 +47,7 @@ from .const import (
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
CODEOWNERS = ["@kuba2k2"]
|
CODEOWNERS = ["@kuba2k2"]
|
||||||
AUTO_LOAD = ["preferences"]
|
AUTO_LOAD = ["preferences"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
|
|
||||||
def _detect_variant(value):
|
def _detect_variant(value):
|
||||||
|
|
|
@ -17,7 +17,7 @@ from esphome.const import (
|
||||||
PLATFORM_RP2040,
|
PLATFORM_RP2040,
|
||||||
)
|
)
|
||||||
from esphome.core import CORE, EsphomeError, coroutine_with_priority
|
from esphome.core import CORE, EsphomeError, coroutine_with_priority
|
||||||
from esphome.helpers import copy_file_if_changed, mkdir_p, write_file, read_file
|
from esphome.helpers import copy_file_if_changed, mkdir_p, read_file, write_file
|
||||||
|
|
||||||
from .const import KEY_BOARD, KEY_PIO_FILES, KEY_RP2040, rp2040_ns
|
from .const import KEY_BOARD, KEY_PIO_FILES, KEY_RP2040, rp2040_ns
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ from .gpio import rp2040_pin_to_code # noqa
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
CODEOWNERS = ["@jesserockz"]
|
CODEOWNERS = ["@jesserockz"]
|
||||||
AUTO_LOAD = ["preferences"]
|
AUTO_LOAD = ["preferences"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
|
|
||||||
def set_core_data(config):
|
def set_core_data(config):
|
||||||
|
|
|
@ -15,10 +15,12 @@ from esphome.components.libretiny.const import (
|
||||||
)
|
)
|
||||||
from esphome.core import CORE
|
from esphome.core import CORE
|
||||||
|
|
||||||
from .boards import RTL87XX_BOARDS, RTL87XX_BOARD_PINS
|
from .boards import RTL87XX_BOARD_PINS, RTL87XX_BOARDS
|
||||||
|
|
||||||
CODEOWNERS = ["@kuba2k2"]
|
CODEOWNERS = ["@kuba2k2"]
|
||||||
AUTO_LOAD = ["libretiny"]
|
AUTO_LOAD = ["libretiny"]
|
||||||
|
IS_TARGET_PLATFORM = True
|
||||||
|
|
||||||
|
|
||||||
COMPONENT_DATA = LibreTinyComponent(
|
COMPONENT_DATA = LibreTinyComponent(
|
||||||
name=COMPONENT_RTL87XX,
|
name=COMPONENT_RTL87XX,
|
||||||
|
|
14
tests/components/gpio/test.esp32-oldstyle.yaml
Normal file
14
tests/components/gpio/test.esp32-oldstyle.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
pin: 12
|
||||||
|
id: gpio_binary_sensor
|
||||||
|
|
||||||
|
output:
|
||||||
|
- platform: gpio
|
||||||
|
pin: 13
|
||||||
|
id: gpio_output
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: gpio
|
||||||
|
pin: 14
|
||||||
|
id: gpio_switch
|
|
@ -0,0 +1,14 @@
|
||||||
|
esphome:
|
||||||
|
name: componenttestesp32oldstyle
|
||||||
|
friendly_name: $component_name
|
||||||
|
platform: esp32
|
||||||
|
board: nodemcu-32s
|
||||||
|
|
||||||
|
logger:
|
||||||
|
level: VERY_VERBOSE
|
||||||
|
|
||||||
|
packages:
|
||||||
|
component_under_test: !include
|
||||||
|
file: $component_test_file
|
||||||
|
vars:
|
||||||
|
component_test_file: $component_test_file
|
Loading…
Reference in a new issue