mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 08:28:12 +01:00
Add build_path option. Fixes#49
This commit is contained in:
parent
6aa449115f
commit
6ae8e3495f
3 changed files with 5 additions and 4 deletions
|
@ -11,7 +11,7 @@ from esphomeyaml import const, core, mqtt, wizard, writer, yaml_util
|
||||||
from esphomeyaml.config import core_to_code, get_component, iter_components, read_config
|
from esphomeyaml.config import core_to_code, get_component, iter_components, read_config
|
||||||
from esphomeyaml.const import CONF_BAUD_RATE, CONF_DOMAIN, CONF_ESPHOMEYAML, CONF_HOSTNAME, \
|
from esphomeyaml.const import CONF_BAUD_RATE, CONF_DOMAIN, CONF_ESPHOMEYAML, CONF_HOSTNAME, \
|
||||||
CONF_LOGGER, CONF_MANUAL_IP, CONF_NAME, CONF_STATIC_IP, CONF_WIFI, ESP_PLATFORM_ESP8266, \
|
CONF_LOGGER, CONF_MANUAL_IP, CONF_NAME, CONF_STATIC_IP, CONF_WIFI, ESP_PLATFORM_ESP8266, \
|
||||||
CONF_NETWORKS
|
CONF_NETWORKS, CONF_BUILD_PATH
|
||||||
from esphomeyaml.core import ESPHomeYAMLError
|
from esphomeyaml.core import ESPHomeYAMLError
|
||||||
from esphomeyaml.helpers import AssignmentExpression, Expression, RawStatement, _EXPRESSIONS, add, \
|
from esphomeyaml.helpers import AssignmentExpression, Expression, RawStatement, _EXPRESSIONS, add, \
|
||||||
add_job, color, flush_tasks, indent, quote, statement
|
add_job, color, flush_tasks, indent, quote, statement
|
||||||
|
@ -26,7 +26,8 @@ def get_name(config):
|
||||||
|
|
||||||
|
|
||||||
def get_base_path(config):
|
def get_base_path(config):
|
||||||
return os.path.join(os.path.dirname(core.CONFIG_PATH), get_name(config))
|
build_path = config[CONF_ESPHOMEYAML].get(CONF_BUILD_PATH, get_name(config))
|
||||||
|
return os.path.join(os.path.dirname(core.CONFIG_PATH), build_path)
|
||||||
|
|
||||||
|
|
||||||
def get_serial_ports():
|
def get_serial_ports():
|
||||||
|
|
|
@ -6,8 +6,7 @@ from esphomeyaml.components.remote_transmitter import RemoteTransmitterComponent
|
||||||
from esphomeyaml.const import CONF_ADDRESS, CONF_CARRIER_FREQUENCY, CONF_COMMAND, CONF_DATA, \
|
from esphomeyaml.const import CONF_ADDRESS, CONF_CARRIER_FREQUENCY, CONF_COMMAND, CONF_DATA, \
|
||||||
CONF_INVERTED, CONF_LG, CONF_NAME, CONF_NBITS, CONF_NEC, \
|
CONF_INVERTED, CONF_LG, CONF_NAME, CONF_NBITS, CONF_NEC, \
|
||||||
CONF_PANASONIC, CONF_RAW, CONF_REPEAT, CONF_SONY, CONF_TIMES, CONF_WAIT_TIME
|
CONF_PANASONIC, CONF_RAW, CONF_REPEAT, CONF_SONY, CONF_TIMES, CONF_WAIT_TIME
|
||||||
from esphomeyaml.core import ESPHomeYAMLError
|
from esphomeyaml.helpers import App, ArrayInitializer, Pvariable, add, get_variable
|
||||||
from esphomeyaml.helpers import App, ArrayInitializer, HexIntLiteral, get_variable, Pvariable, add
|
|
||||||
|
|
||||||
DEPENDENCIES = ['remote_transmitter']
|
DEPENDENCIES = ['remote_transmitter']
|
||||||
|
|
||||||
|
|
|
@ -240,6 +240,7 @@ CONF_FILTER = 'filter'
|
||||||
CONF_IDLE = 'idle'
|
CONF_IDLE = 'idle'
|
||||||
CONF_NETWORKS = 'networks'
|
CONF_NETWORKS = 'networks'
|
||||||
CONF_INTERNAL = 'internal'
|
CONF_INTERNAL = 'internal'
|
||||||
|
CONF_BUILD_PATH = 'build_path'
|
||||||
|
|
||||||
ESP32_BOARDS = [
|
ESP32_BOARDS = [
|
||||||
'featheresp32', 'node32s', 'espea32', 'firebeetle32', 'esp32doit-devkit-v1',
|
'featheresp32', 'node32s', 'espea32', 'firebeetle32', 'esp32doit-devkit-v1',
|
||||||
|
|
Loading…
Reference in a new issue