mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Lint
This commit is contained in:
parent
e375c2fb40
commit
795dd716c9
5 changed files with 9 additions and 17 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -105,3 +105,4 @@ venv.bak/
|
|||
|
||||
config/
|
||||
tests/build/
|
||||
tests/.esphomeyaml/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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') +
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue