mirror of
https://github.com/esphome/esphome.git
synced 2025-09-14 17:22:20 +01:00
Update dependencies (#653)
* Update pio dependencies * Platformio 4 * Fixes * Update platformio_api.py * Lint
This commit is contained in:
@@ -3,6 +3,7 @@ import esphome.config_validation as cv
|
||||
from esphome import automation
|
||||
from esphome.components import time
|
||||
from esphome.const import CONF_TIME_ID, CONF_ID, CONF_TRIGGER_ID
|
||||
from esphome.py_compat import string_types
|
||||
|
||||
sun_ns = cg.esphome_ns.namespace('sun')
|
||||
|
||||
@@ -31,9 +32,9 @@ ELEVATION_MAP = {
|
||||
|
||||
|
||||
def elevation(value):
|
||||
if isinstance(value, str):
|
||||
if isinstance(value, string_types):
|
||||
try:
|
||||
value = ELEVATION_MAP[cv.one_of(*ELEVATION_MAP, lower=True, space='_')]
|
||||
value = ELEVATION_MAP[cv.one_of(*ELEVATION_MAP, lower=True, space='_')(value)]
|
||||
except cv.Invalid:
|
||||
pass
|
||||
value = cv.angle(value)
|
||||
|
Reference in New Issue
Block a user