mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Add get_board function to esp32 module (#5184)
This commit is contained in:
parent
e02aaedc42
commit
581cb642ff
1 changed files with 4 additions and 0 deletions
|
@ -81,6 +81,10 @@ def get_esp32_variant(core_obj=None):
|
|||
return (core_obj or CORE).data[KEY_ESP32][KEY_VARIANT]
|
||||
|
||||
|
||||
def get_board(core_obj=None):
|
||||
return (core_obj or CORE).data[KEY_ESP32][KEY_BOARD]
|
||||
|
||||
|
||||
def only_on_variant(*, supported=None, unsupported=None):
|
||||
"""Config validator for features only available on some ESP32 variants."""
|
||||
if supported is not None and not isinstance(supported, list):
|
||||
|
|
Loading…
Reference in a new issue