This commit is contained in:
Otto Winter 2018-11-25 20:21:51 +01:00
parent e375c2fb40
commit 795dd716c9
No known key found for this signature in database
GPG key ID: DB66C0BE6013F97E
5 changed files with 9 additions and 17 deletions

1
.gitignore vendored
View file

@ -105,3 +105,4 @@ venv.bak/
config/
tests/build/
tests/.esphomeyaml/

View file

@ -1,4 +1,3 @@
import codecs
import logging
import os
import re
@ -233,6 +232,7 @@ def lib_deps(config):
def includes(config):
ret = []
for include in config.get(CONF_INCLUDES, []):
with codecs.open(CORE.relative_path(include), 'r', encoding='utf-8') as f_handle:
ret.append(f_handle.read())
path = CORE.relative_path(include)
res = os.path.relpath(path, CORE.relative_build_path('src', 'main.cpp'))
ret.append(res)
return ret

View file

@ -6,7 +6,6 @@ import unicodedata
import voluptuous as vol
from esphomeyaml.components import mqtt
import esphomeyaml.config_validation as cv
from esphomeyaml.const import ESP_PLATFORMS, ESP_PLATFORM_ESP32, ESP_PLATFORM_ESP8266
from esphomeyaml.helpers import color
@ -264,17 +263,7 @@ def wizard(path):
safe_print("Please enter the " + color('green', 'address') + " of your MQTT broker.")
safe_print()
safe_print("For example \"{}\".".format(color('bold_white', '192.168.178.84')))
while True:
broker = raw_input(color('bold_white', "(broker): "))
try:
broker = mqtt.validate_broker(broker)
break
except vol.Invalid as err:
safe_print(color('red', u"The broker address \"{}\" seems to be invalid: {} :("
u"".format(broker, err)))
safe_print("Please try again.")
safe_print()
sleep(1)
broker = raw_input(color('bold_white', "(broker): "))
safe_print("Thanks! Now enter the " + color('green', 'username') + " and " +
color('green', 'password') +

View file

@ -3,7 +3,8 @@ esphomeyaml:
platform: ESP32
board: nodemcu-32s
# Use latest upstream esphomelib git version.
esphomelib_version: dev
esphomelib_version:
branch: custom-sensor-platform
# Use this for testing while developing:
# esphomelib_version:
# local: ~/path/to/esphomelib

View file

@ -3,7 +3,8 @@ esphomeyaml:
platform: ESP32
board: nodemcu-32s
# Use latest upstream esphomelib git version.
esphomelib_version: dev
esphomelib_version:
branch: custom-sensor-platform
# Use this for testing while developing:
# esphomelib_version:
# local: ~/path/to/esphomelib