mirror of
https://github.com/esphome/esphome.git
synced 2025-08-11 04:39:30 +00:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5ab995d8ca | ||
![]() |
4248741b11 | ||
![]() |
4b8ecc7634 | ||
![]() |
25d04c759c | ||
![]() |
b4ec84030e | ||
![]() |
29e8761373 | ||
![]() |
a04299c59e | ||
![]() |
d7bf3c51d9 | ||
![]() |
ac0b095941 | ||
![]() |
cda9bad233 | ||
![]() |
41db8a1264 | ||
![]() |
e7e785fd60 | ||
![]() |
300d3a1f46 | ||
![]() |
356554c08d | ||
![]() |
ced28ad006 |
@@ -25,4 +25,4 @@ def to_code(config):
|
||||
|
||||
wwhite = yield cg.get_variable(config[CONF_WARM_WHITE])
|
||||
cg.add(var.set_warm_white(wwhite))
|
||||
cg.add(var.set_warm_white_temperature(config[CONF_COLD_WHITE_COLOR_TEMPERATURE]))
|
||||
cg.add(var.set_warm_white_temperature(config[CONF_WARM_WHITE_COLOR_TEMPERATURE]))
|
||||
|
@@ -103,7 +103,7 @@ class SunTrigger : public Trigger<>, public PollingComponent, public Parented<Su
|
||||
crossed = this->last_elevation_ >= this->elevation_ && this->elevation_ > current;
|
||||
}
|
||||
|
||||
if (crossed) {
|
||||
if (crossed && !isnan(this->last_elevation_)) {
|
||||
this->trigger();
|
||||
}
|
||||
this->last_elevation_ = current;
|
||||
@@ -111,7 +111,7 @@ class SunTrigger : public Trigger<>, public PollingComponent, public Parented<Su
|
||||
|
||||
protected:
|
||||
bool sunrise_;
|
||||
double last_elevation_;
|
||||
double last_elevation_{NAN};
|
||||
double elevation_;
|
||||
};
|
||||
|
||||
|
@@ -24,7 +24,7 @@ MODELS = {
|
||||
'2.90in': ('a', WaveshareEPaperTypeAModel.WAVESHARE_EPAPER_2_9_IN),
|
||||
'2.70in': ('b', WaveshareEPaper2P7In),
|
||||
'4.20in': ('b', WaveshareEPaper4P2In),
|
||||
'7.50in': ('b', WaveshareEPaperTypeBModel),
|
||||
'7.50in': ('b', WaveshareEPaper7P5In),
|
||||
}
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
MAJOR_VERSION = 1
|
||||
MINOR_VERSION = 13
|
||||
PATCH_VERSION = '0b7'
|
||||
PATCH_VERSION = '1'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
|
||||
|
@@ -5,12 +5,13 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
M.AutoInit(document.body);
|
||||
});
|
||||
let wsProtocol = "ws:";
|
||||
if (window.location.protocol === "https:") {
|
||||
wsProtocol = 'wss:';
|
||||
const loc = window.location;
|
||||
const wsLoc = new URL("./",`${loc.protocol}//${loc.host}${loc.pathname}`);
|
||||
wsLoc.protocol = 'ws:';
|
||||
if (loc.protocol === "https:") {
|
||||
wsLoc.protocol = 'wss:';
|
||||
}
|
||||
const wsUrl = `${wsProtocol}//${window.location.host}${window.location.pathname}`;
|
||||
|
||||
const wsUrl = wsLoc.href;
|
||||
|
||||
// ============================= Color Log Parsing =============================
|
||||
const initializeColorState = () => {
|
||||
|
@@ -469,7 +469,7 @@
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
© 2019 Copyright Otto Winter, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
||||
© 2019 Copyright ESPHome, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
||||
<a class="grey-text text-lighten-4 right" href="{{ docs_link }}" target="_blank" rel="noreferrer">ESPHome {{ version }} Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
© 2019 Copyright Otto Winter, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
||||
© 2019 Copyright ESPHome, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
||||
<a class="grey-text text-lighten-4 right" href="{{ docs_link }}"
|
||||
target="_blank">ESPHome {{ version }} Documentation</a>
|
||||
</div>
|
||||
|
@@ -7,6 +7,7 @@ import re
|
||||
import subprocess
|
||||
|
||||
from esphome.core import CORE
|
||||
from esphome.py_compat import IS_PY2
|
||||
from esphome.util import run_external_command, run_external_process
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -17,12 +18,10 @@ def patch_structhash():
|
||||
# removed/added. This might have unintended consequences, but this improves compile
|
||||
# times greatly when adding/removing components and a simple clean build solves
|
||||
# all issues
|
||||
# pylint: disable=no-member,no-name-in-module
|
||||
from platformio.commands import run
|
||||
from platformio import util
|
||||
try:
|
||||
from platformio.util import get_project_dir
|
||||
except ImportError:
|
||||
from platformio.project.helpers import get_project_dir
|
||||
from platformio.util import get_project_dir
|
||||
from os.path import join, isdir, getmtime, isfile
|
||||
from os import makedirs
|
||||
|
||||
@@ -69,7 +68,8 @@ def run_platformio_cli(*args, **kwargs):
|
||||
if os.environ.get('ESPHOME_USE_SUBPROCESS') is None:
|
||||
import platformio.__main__
|
||||
try:
|
||||
patch_structhash()
|
||||
if IS_PY2:
|
||||
patch_structhash()
|
||||
except Exception: # pylint: disable=broad-except
|
||||
# Ignore when patch fails
|
||||
pass
|
||||
|
@@ -78,8 +78,12 @@ def indexbytes(buf, i):
|
||||
if IS_PY2:
|
||||
def decode_text(data, encoding='utf-8', errors='strict'):
|
||||
# type: (str, str, str) -> unicode
|
||||
if isinstance(data, unicode):
|
||||
return data
|
||||
return unicode(data, encoding=encoding, errors=errors)
|
||||
else:
|
||||
def decode_text(data, encoding='utf-8', errors='strict'):
|
||||
# type: (bytes, str, str) -> str
|
||||
if isinstance(data, str):
|
||||
return data
|
||||
return data.decode(encoding=encoding, errors=errors)
|
||||
|
Reference in New Issue
Block a user