mirror of
https://github.com/esphome/esphome.git
synced 2025-09-21 20:52:20 +01:00
Make compatible with python 3 (#281)
* Make compatible with python 3 * Update travis * Env * Fix typo * Fix install correct platformio * Lint * Fix build flags * Lint * Upgrade pylint * Lint
This commit is contained in:
@@ -7,6 +7,7 @@ from esphomeyaml.const import CONF_BUFFER_SIZE, CONF_DUMP, CONF_FILTER, CONF_ID,
|
||||
from esphomeyaml.cpp_generator import Pvariable, add
|
||||
from esphomeyaml.cpp_helpers import gpio_input_pin_expression, setup_component
|
||||
from esphomeyaml.cpp_types import App, Component, esphomelib_ns
|
||||
from esphomeyaml.py_compat import string_types
|
||||
|
||||
remote_ns = esphomelib_ns.namespace('remote')
|
||||
MULTI_CONF = True
|
||||
@@ -30,7 +31,7 @@ DUMPERS = {
|
||||
|
||||
|
||||
def validate_dumpers_all(value):
|
||||
if not isinstance(value, (str, unicode)):
|
||||
if not isinstance(value, string_types):
|
||||
raise vol.Invalid("Not valid dumpers")
|
||||
if value.upper() == "ALL":
|
||||
return list(sorted(list(DUMPERS)))
|
||||
|
Reference in New Issue
Block a user