mirror of
https://github.com/esphome/esphome.git
synced 2025-03-13 22:28:14 +00:00
Merge branch 'dev' into climate
This commit is contained in:
commit
de00e7ea4b
@ -41,11 +41,11 @@ stages:
|
||||
|
||||
- |
|
||||
if [[ "${IS_HASSIO}" == "YES" ]]; then
|
||||
BUILD_FROM=esphome/esphome-hassio-base-${BUILD_ARCH}:1.4.1
|
||||
BUILD_FROM=esphome/esphome-hassio-base-${BUILD_ARCH}:1.4.3
|
||||
BUILD_TO=esphome/esphome-hassio-${BUILD_ARCH}
|
||||
DOCKERFILE=docker/Dockerfile.hassio
|
||||
else
|
||||
BUILD_FROM=esphome/esphome-base-${BUILD_ARCH}:1.4.1
|
||||
BUILD_FROM=esphome/esphome-base-${BUILD_ARCH}:1.4.3
|
||||
if [[ "${BUILD_ARCH}" == "amd64" ]]; then
|
||||
BUILD_TO=esphome/esphome
|
||||
else
|
||||
|
@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=esphome/esphome-base-amd64:1.4.1
|
||||
ARG BUILD_FROM=esphome/esphome-base-amd64:1.4.3
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
COPY . .
|
||||
|
@ -1,4 +1,4 @@
|
||||
ARG BUILD_FROM=esphome/esphome-hassio-base-amd64:1.4.1
|
||||
ARG BUILD_FROM=esphome/esphome-hassio-base-amd64:1.4.3
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Copy root filesystem
|
||||
|
@ -16,11 +16,11 @@ echo "PWD: $PWD"
|
||||
|
||||
if [[ ${IS_HASSIO} = "YES" ]]; then
|
||||
docker build \
|
||||
--build-arg "BUILD_FROM=esphome/esphome-hassio-base-${BUILD_ARCH}:1.4.1" \
|
||||
--build-arg "BUILD_FROM=esphome/esphome-hassio-base-${BUILD_ARCH}:1.4.3" \
|
||||
--build-arg "BUILD_VERSION=${CACHE_TAG}" \
|
||||
-t "${IMAGE_NAME}" -f ../docker/Dockerfile.hassio ..
|
||||
else
|
||||
docker build \
|
||||
--build-arg "BUILD_FROM=esphome/esphome-base-${BUILD_ARCH}:1.4.1" \
|
||||
--build-arg "BUILD_FROM=esphome/esphome-base-${BUILD_ARCH}:1.4.3" \
|
||||
-t "${IMAGE_NAME}" -f ../docker/Dockerfile ..
|
||||
fi
|
||||
|
@ -86,7 +86,7 @@ def lib_deps(config):
|
||||
if CORE.is_esp32:
|
||||
return 'AsyncTCP@1.0.3'
|
||||
if CORE.is_esp8266:
|
||||
return 'ESPAsyncTCP@1.1.3'
|
||||
return 'ESPAsyncTCP@1.2.0'
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@ def setup_text_sensor_core_(text_sensor_var, config):
|
||||
trigger = Pvariable(conf[CONF_TRIGGER_ID], rhs)
|
||||
automation.build_automations(trigger, [(std_string, 'x')], conf)
|
||||
|
||||
setup_mqtt_component(text_sensor_var.get_mqtt(), config)
|
||||
setup_mqtt_component(text_sensor_var.Pget_mqtt(), config)
|
||||
|
||||
|
||||
def setup_text_sensor(text_sensor_obj, config):
|
||||
|
@ -28,7 +28,7 @@ import tornado.websocket
|
||||
from esphome import const
|
||||
from esphome.__main__ import get_serial_ports
|
||||
from esphome.helpers import mkdir_p, get_bool_env, run_system_command
|
||||
from esphome.py_compat import IS_PY2
|
||||
from esphome.py_compat import IS_PY2, decode_text
|
||||
from esphome.storage_json import EsphomeStorageJSON, StorageJSON, \
|
||||
esphome_storage_path, ext_storage_path, trash_storage_path
|
||||
from esphome.util import shlex_quote
|
||||
@ -223,8 +223,8 @@ class WizardRequestHandler(BaseHandler):
|
||||
def post(self):
|
||||
from esphome import wizard
|
||||
|
||||
kwargs = {k: ''.join(v) for k, v in self.request.arguments.items()}
|
||||
destination = os.path.join(CONFIG_DIR, kwargs['name'] + '.yaml')
|
||||
kwargs = {k: u''.join(decode_text(x) for x in v) for k, v in self.request.arguments.items()}
|
||||
destination = os.path.join(CONFIG_DIR, kwargs['name'] + u'.yaml')
|
||||
wizard.wizard_write(path=destination, **kwargs)
|
||||
self.redirect('/?begin=True')
|
||||
|
||||
|
@ -195,7 +195,7 @@ def perform_ota(sock, password, file_handle, filename):
|
||||
send_check(sock, cnonce, 'auth cnonce')
|
||||
|
||||
result_md5 = hashlib.md5()
|
||||
result_md5.update(password.encode())
|
||||
result_md5.update(password.encode('utf-8'))
|
||||
result_md5.update(nonce.encode())
|
||||
result_md5.update(cnonce.encode())
|
||||
result = result_md5.hexdigest()
|
||||
|
@ -69,3 +69,13 @@ def indexbytes(buf, i):
|
||||
return buf[i]
|
||||
else:
|
||||
return ord(buf[i])
|
||||
|
||||
|
||||
if IS_PY2:
|
||||
def decode_text(data, encoding='utf-8', errors='strict'):
|
||||
# type: (str, str, str) -> unicode
|
||||
return unicode(data, encoding='utf-8', errors=errors)
|
||||
else:
|
||||
def decode_text(data, encoding='utf-8', errors='strict'):
|
||||
# type: (bytes, str, str) -> str
|
||||
return data.decode(encoding='utf-8', errors=errors)
|
||||
|
@ -79,7 +79,7 @@ def wizard_write(path, **kwargs):
|
||||
kwargs['platform'] = 'ESP8266' if board in ESP8266_BOARD_PINS else 'ESP32'
|
||||
platform = kwargs['platform']
|
||||
|
||||
with codecs.open(path, 'w') as f_handle:
|
||||
with codecs.open(path, 'w', 'utf-8') as f_handle:
|
||||
f_handle.write(wizard_file(**kwargs))
|
||||
storage = StorageJSON.from_wizard(name, name + '.local', platform, board)
|
||||
storage_path = ext_storage_path(os.path.dirname(path), os.path.basename(path))
|
||||
|
@ -290,7 +290,7 @@ def gather_lib_deps():
|
||||
lib_deps.add('AsyncTCP@1.0.1')
|
||||
lib_deps.add('ESPmDNS')
|
||||
elif CORE.is_esp8266:
|
||||
lib_deps.add('ESPAsyncTCP@1.1.3')
|
||||
lib_deps.add('ESPAsyncTCP@1.2.0')
|
||||
lib_deps.add('ESP8266mDNS')
|
||||
|
||||
# avoid changing build flags order
|
||||
|
Loading…
x
Reference in New Issue
Block a user