From df77978f905bc591459fafdb558b38b7d4400ac4 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 22 Jan 2019 20:43:45 +0100 Subject: [PATCH 01/12] Enable aarch64 The repo just mirrors armhf, thanks @Frenck ! --- esphomeyaml-beta/config.json | 3 ++- esphomeyaml/config.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/esphomeyaml-beta/config.json b/esphomeyaml-beta/config.json index 4fee3ca7c1..42792bc61e 100644 --- a/esphomeyaml-beta/config.json +++ b/esphomeyaml-beta/config.json @@ -9,7 +9,8 @@ "arch": [ "amd64", "armhf", - "i386" + "i386", + "aarch64" ], "hassio_api": true, "auth_api": true, diff --git a/esphomeyaml/config.json b/esphomeyaml/config.json index 472fdbbe5a..704985e106 100644 --- a/esphomeyaml/config.json +++ b/esphomeyaml/config.json @@ -9,7 +9,8 @@ "arch": [ "amd64", "armhf", - "i386" + "i386", + "aarch64" ], "hassio_api": true, "auth_api": true, From 5b77daa6b8352dfb1113ec2e9770ff52be69c149 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Sun, 17 Feb 2019 20:23:20 +0100 Subject: [PATCH 02/12] Bump version to v1.11.0b1 --- esphome/const.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/const.py b/esphome/const.py index 7b79733f20..aead5fa79e 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -2,10 +2,10 @@ MAJOR_VERSION = 1 MINOR_VERSION = 11 -PATCH_VERSION = '0-dev' +PATCH_VERSION = '0b1' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) -ESPHOME_CORE_VERSION = 'dev' +ESPHOME_CORE_VERSION = '1.11.0b1' ESP_PLATFORM_ESP32 = 'ESP32' ESP_PLATFORM_ESP8266 = 'ESP8266' From 80b2b645b1665f33f5e1384d6a95ed645b0251ca Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Mon, 18 Feb 2019 14:59:35 +0100 Subject: [PATCH 03/12] Fix custom components not registered (#441) --- esphome/components/binary_sensor/custom.py | 8 ++++---- esphome/components/sensor/custom.py | 8 ++++---- esphome/components/switch/custom.py | 8 ++++---- esphome/components/text_sensor/custom.py | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/esphome/components/binary_sensor/custom.py b/esphome/components/binary_sensor/custom.py index 497aa7fc7d..a2b907aaed 100644 --- a/esphome/components/binary_sensor/custom.py +++ b/esphome/components/binary_sensor/custom.py @@ -3,7 +3,7 @@ import voluptuous as vol from esphome.components import binary_sensor import esphome.config_validation as cv from esphome.const import CONF_BINARY_SENSORS, CONF_ID, CONF_LAMBDA, CONF_NAME -from esphome.cpp_generator import Pvariable, add, process_lambda, variable +from esphome.cpp_generator import add, process_lambda, variable from esphome.cpp_types import std_vector CustomBinarySensorConstructor = binary_sensor.binary_sensor_ns.class_( @@ -27,9 +27,9 @@ def to_code(config): rhs = CustomBinarySensorConstructor(template_) custom = variable(config[CONF_ID], rhs) for i, conf in enumerate(config[CONF_BINARY_SENSORS]): - var = Pvariable(conf[CONF_ID], custom.get_binary_sensor(i)) - add(var.set_name(conf[CONF_NAME])) - binary_sensor.setup_binary_sensor(var, conf) + rhs = custom.Pget_binary_sensor(i) + add(rhs.set_name(conf[CONF_NAME])) + binary_sensor.register_binary_sensor(rhs, conf) BUILD_FLAGS = '-DUSE_CUSTOM_BINARY_SENSOR' diff --git a/esphome/components/sensor/custom.py b/esphome/components/sensor/custom.py index 314dbe51e8..3e73ef3581 100644 --- a/esphome/components/sensor/custom.py +++ b/esphome/components/sensor/custom.py @@ -3,7 +3,7 @@ import voluptuous as vol from esphome.components import sensor import esphome.config_validation as cv from esphome.const import CONF_ID, CONF_LAMBDA, CONF_NAME, CONF_SENSORS -from esphome.cpp_generator import Pvariable, add, process_lambda, variable +from esphome.cpp_generator import add, process_lambda, variable from esphome.cpp_types import std_vector CustomSensorConstructor = sensor.sensor_ns.class_('CustomSensorConstructor') @@ -25,9 +25,9 @@ def to_code(config): rhs = CustomSensorConstructor(template_) custom = variable(config[CONF_ID], rhs) for i, conf in enumerate(config[CONF_SENSORS]): - var = Pvariable(conf[CONF_ID], custom.get_sensor(i)) - add(var.set_name(conf[CONF_NAME])) - sensor.setup_sensor(var, conf) + rhs = custom.Pget_sensor(i) + add(rhs.set_name(conf[CONF_NAME])) + sensor.register_sensor(rhs, conf) BUILD_FLAGS = '-DUSE_CUSTOM_SENSOR' diff --git a/esphome/components/switch/custom.py b/esphome/components/switch/custom.py index 5b2fc9e6cc..1b165f2b18 100644 --- a/esphome/components/switch/custom.py +++ b/esphome/components/switch/custom.py @@ -3,7 +3,7 @@ import voluptuous as vol from esphome.components import switch import esphome.config_validation as cv from esphome.const import CONF_ID, CONF_LAMBDA, CONF_NAME, CONF_SWITCHES -from esphome.cpp_generator import Pvariable, add, process_lambda, variable +from esphome.cpp_generator import add, process_lambda, variable from esphome.cpp_types import std_vector CustomSwitchConstructor = switch.switch_ns.class_('CustomSwitchConstructor') @@ -26,9 +26,9 @@ def to_code(config): rhs = CustomSwitchConstructor(template_) custom = variable(config[CONF_ID], rhs) for i, conf in enumerate(config[CONF_SWITCHES]): - var = Pvariable(conf[CONF_ID], custom.get_switch(i)) - add(var.set_name(conf[CONF_NAME])) - switch.setup_switch(var, conf) + rhs = custom.Pget_switch(i) + add(rhs.set_name(conf[CONF_NAME])) + switch.register_switch(rhs, conf) BUILD_FLAGS = '-DUSE_CUSTOM_SWITCH' diff --git a/esphome/components/text_sensor/custom.py b/esphome/components/text_sensor/custom.py index 1fe2a889a9..342c08d8fb 100644 --- a/esphome/components/text_sensor/custom.py +++ b/esphome/components/text_sensor/custom.py @@ -3,7 +3,7 @@ import voluptuous as vol from esphome.components import text_sensor import esphome.config_validation as cv from esphome.const import CONF_ID, CONF_LAMBDA, CONF_NAME, CONF_TEXT_SENSORS -from esphome.cpp_generator import Pvariable, add, process_lambda, variable +from esphome.cpp_generator import add, process_lambda, variable from esphome.cpp_types import std_vector CustomTextSensorConstructor = text_sensor.text_sensor_ns.class_('CustomTextSensorConstructor') @@ -26,9 +26,9 @@ def to_code(config): rhs = CustomTextSensorConstructor(template_) custom = variable(config[CONF_ID], rhs) for i, conf in enumerate(config[CONF_TEXT_SENSORS]): - var = Pvariable(conf[CONF_ID], custom.get_text_sensor(i)) - add(var.set_name(conf[CONF_NAME])) - text_sensor.setup_text_sensor(var, conf) + rhs = custom.Pget_text_sensor(i) + add(rhs.set_name(conf[CONF_NAME])) + text_sensor.register_text_sensor(rhs, conf) BUILD_FLAGS = '-DUSE_CUSTOM_TEXT_SENSOR' From 386dd5c94809c33d3b2f5ad69a133068c84208ab Mon Sep 17 00:00:00 2001 From: Florian Gareis Date: Tue, 19 Feb 2019 20:30:12 +0100 Subject: [PATCH 04/12] Remove duplicate scrollbar & move scrollbar (#443) * Remove duplicate scrollbar * Move scrolling from modal-content to log-container * Replace css autoscroll with stable js autoscroll --- esphome/dashboard/static/esphome.css | 18 ++++------ esphome/dashboard/static/esphome.js | 12 +++++++ esphome/dashboard/templates/index.html | 48 ++++++++------------------ 3 files changed, 32 insertions(+), 46 deletions(-) diff --git a/esphome/dashboard/static/esphome.css b/esphome/dashboard/static/esphome.css index baf92e42b1..c0cf46ecf4 100644 --- a/esphome/dashboard/static/esphome.css +++ b/esphome/dashboard/static/esphome.css @@ -46,17 +46,8 @@ i.very-large { font-family: "SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace; } -.autoscroll { - display: flex; - flex-direction: column-reverse; - flex-basis: auto; -} - -.autoscroll div { - flex-basis: 100%; -} - .log { + max-height: calc(100% - 56px); background-color: #1c1c1c; margin-top: 0; margin-bottom: 0; @@ -161,6 +152,10 @@ ul.stepper:not(.horizontal) .step.active::before, ul.stepper:not(.horizontal) .s height: auto !important; } +.tap-target-wrapper { + position: fixed !important; +} + /* https://github.com/tnhu/status-indicator/blob/master/styles.css */ .status-indicator .status-indicator-icon { display: inline-block; @@ -223,9 +218,8 @@ ul.stepper:not(.horizontal) .step.active::before, ul.stepper:not(.horizontal) .s #editor { margin-top: 0; margin-bottom: 0; - padding: 16px; border-radius: 3px; - height: 100% + height: calc(100% - 56px); } .update-available i { diff --git a/esphome/dashboard/static/esphome.js b/esphome/dashboard/static/esphome.js index efc81354ff..ca33231a06 100644 --- a/esphome/dashboard/static/esphome.js +++ b/esphome/dashboard/static/esphome.js @@ -168,6 +168,7 @@ const colorReplace = (pre, state, text) => { } } addSpan(text.substring(i)); + scrollToBottomOfElement(pre); }; const removeUpdateAvailable = (filename) => { @@ -700,4 +701,15 @@ const startWizard = () => { }); }; +const scrollToBottomOfElement = (element) => { + var atBottom = false; + if (element.scrollTop + 30 >= (element.scrollHeight - element.offsetHeight)) { + atBottom = true; + } + + if (atBottom) { + element.scrollTop = element.scrollHeight; + } +} + setupWizardStart.addEventListener('click', startWizard); \ No newline at end of file diff --git a/esphome/dashboard/templates/index.html b/esphome/dashboard/templates/index.html index d5ecce17d6..dfabd278d2 100644 --- a/esphome/dashboard/templates/index.html +++ b/esphome/dashboard/templates/index.html @@ -93,15 +93,9 @@