mirror of
https://github.com/esphome/esphome.git
synced 2025-08-11 04:39:30 +00:00
Compare commits
29 Commits
2022.2.0b1
...
2022.2.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
81b2fd78f5 | ||
![]() |
69002fb1e6 | ||
![]() |
75332a752d | ||
![]() |
b528f48417 | ||
![]() |
ec7a79049a | ||
![]() |
6ddad6b299 | ||
![]() |
16dc7762f9 | ||
![]() |
dc0ed8857f | ||
![]() |
bb6b77bd98 | ||
![]() |
dcc80f9032 | ||
![]() |
dd554bcdf4 | ||
![]() |
f376a39e55 | ||
![]() |
8dcc9d6b66 | ||
![]() |
09ed1aed93 | ||
![]() |
53d3718028 | ||
![]() |
2b5dce5232 | ||
![]() |
9ad84150aa | ||
![]() |
c0523590b4 | ||
![]() |
c7f091ab10 | ||
![]() |
7479e0aada | ||
![]() |
5bbee1a1fe | ||
![]() |
bdb9546ca3 | ||
![]() |
46af4cad6e | ||
![]() |
76a238912b | ||
![]() |
909a526967 | ||
![]() |
cd6f4fb93f | ||
![]() |
c19458696e | ||
![]() |
318b930e9f | ||
![]() |
9296a078a7 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -143,7 +143,7 @@ jobs:
|
||||
needs: [deploy-docker]
|
||||
steps:
|
||||
- env:
|
||||
TOKEN: ${{ secrets.DEPLOY_HASSIO_TOKEN }}
|
||||
TOKEN: ${{ secrets.DEPLOY_HA_ADDON_REPO_TOKEN }}
|
||||
run: |
|
||||
TAG="${GITHUB_REF#refs/tags/}"
|
||||
curl \
|
||||
|
@@ -1,13 +1,16 @@
|
||||
# Source https://github.com/letscontrolit/ESPEasy/pull/3845#issuecomment-1005864664
|
||||
|
||||
import esptool
|
||||
from SCons.Script import ARGUMENTS
|
||||
|
||||
# pylint: disable=E0602
|
||||
Import("env") # noqa
|
||||
|
||||
|
||||
def esp32_create_combined_bin(source, target, env):
|
||||
print("Generating combined binary for serial flashing")
|
||||
verbose = bool(int(ARGUMENTS.get("PIOVERBOSE", "0")))
|
||||
if verbose:
|
||||
print("Generating combined binary for serial flashing")
|
||||
app_offset = 0x10000
|
||||
|
||||
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}-factory.bin")
|
||||
@@ -24,18 +27,21 @@ def esp32_create_combined_bin(source, target, env):
|
||||
"--flash_size",
|
||||
flash_size,
|
||||
]
|
||||
print(" Offset | File")
|
||||
if verbose:
|
||||
print(" Offset | File")
|
||||
for section in sections:
|
||||
sect_adr, sect_file = section.split(" ", 1)
|
||||
print(f" - {sect_adr} | {sect_file}")
|
||||
if verbose:
|
||||
print(f" - {sect_adr} | {sect_file}")
|
||||
cmd += [sect_adr, sect_file]
|
||||
|
||||
print(f" - {hex(app_offset)} | {firmware_name}")
|
||||
cmd += [hex(app_offset), firmware_name]
|
||||
|
||||
print()
|
||||
print(f"Using esptool.py arguments: {' '.join(cmd)}")
|
||||
print()
|
||||
if verbose:
|
||||
print(f" - {hex(app_offset)} | {firmware_name}")
|
||||
print()
|
||||
print(f"Using esptool.py arguments: {' '.join(cmd)}")
|
||||
print()
|
||||
esptool.main(cmd)
|
||||
|
||||
|
||||
|
@@ -49,7 +49,12 @@ CONFIG_SCHEMA = cv.All(
|
||||
}
|
||||
),
|
||||
_validate,
|
||||
cv.only_with_arduino,
|
||||
cv.require_framework_version(
|
||||
esp8266_arduino=cv.Version(2, 7, 4),
|
||||
esp32_arduino=cv.Version(99, 0, 0),
|
||||
max_version=True,
|
||||
extra_message="Please see note on documentation for FastLED",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@@ -33,7 +33,12 @@ CONFIG_SCHEMA = cv.All(
|
||||
cv.Optional(CONF_DATA_RATE): cv.frequency,
|
||||
}
|
||||
),
|
||||
cv.only_with_arduino,
|
||||
cv.require_framework_version(
|
||||
esp8266_arduino=cv.Version(2, 7, 4),
|
||||
esp32_arduino=cv.Version(99, 0, 0),
|
||||
max_version=True,
|
||||
extra_message="Please see note on documentation for FastLED",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@@ -138,6 +138,8 @@ void RotaryEncoderSensor::setup() {
|
||||
initial_value = 0;
|
||||
break;
|
||||
}
|
||||
initial_value = clamp(initial_value, this->store_.min_value, this->store_.max_value);
|
||||
|
||||
this->store_.counter = initial_value;
|
||||
this->store_.last_read = initial_value;
|
||||
|
||||
|
@@ -161,8 +161,8 @@ bool WiFiComponent::wifi_sta_connect_(const WiFiAP &ap) {
|
||||
// https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#_CPPv417wifi_sta_config_t
|
||||
wifi_config_t conf;
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
strlcpy(reinterpret_cast<char *>(conf.sta.ssid), ap.get_ssid().c_str(), sizeof(conf.sta.ssid));
|
||||
strlcpy(reinterpret_cast<char *>(conf.sta.password), ap.get_password().c_str(), sizeof(conf.sta.password));
|
||||
strncpy(reinterpret_cast<char *>(conf.sta.ssid), ap.get_ssid().c_str(), sizeof(conf.sta.ssid));
|
||||
strncpy(reinterpret_cast<char *>(conf.sta.password), ap.get_password().c_str(), sizeof(conf.sta.password));
|
||||
|
||||
// The weakest authmode to accept in the fast scan mode
|
||||
if (ap.get_password().empty()) {
|
||||
@@ -709,7 +709,7 @@ bool WiFiComponent::wifi_start_ap_(const WiFiAP &ap) {
|
||||
|
||||
wifi_config_t conf;
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
strlcpy(reinterpret_cast<char *>(conf.ap.ssid), ap.get_ssid().c_str(), sizeof(conf.ap.ssid));
|
||||
strncpy(reinterpret_cast<char *>(conf.ap.ssid), ap.get_ssid().c_str(), sizeof(conf.ap.ssid));
|
||||
conf.ap.channel = ap.get_channel().value_or(1);
|
||||
conf.ap.ssid_hidden = ap.get_ssid().size();
|
||||
conf.ap.max_connection = 5;
|
||||
@@ -720,7 +720,7 @@ bool WiFiComponent::wifi_start_ap_(const WiFiAP &ap) {
|
||||
*conf.ap.password = 0;
|
||||
} else {
|
||||
conf.ap.authmode = WIFI_AUTH_WPA2_PSK;
|
||||
strlcpy(reinterpret_cast<char *>(conf.ap.password), ap.get_password().c_str(), sizeof(conf.ap.ssid));
|
||||
strncpy(reinterpret_cast<char *>(conf.ap.password), ap.get_password().c_str(), sizeof(conf.ap.ssid));
|
||||
}
|
||||
|
||||
#if ESP_IDF_VERSION_MAJOR >= 4
|
||||
|
@@ -1713,30 +1713,49 @@ def require_framework_version(
|
||||
esp_idf=None,
|
||||
esp32_arduino=None,
|
||||
esp8266_arduino=None,
|
||||
max_version=False,
|
||||
extra_message=None,
|
||||
):
|
||||
def validator(value):
|
||||
core_data = CORE.data[KEY_CORE]
|
||||
framework = core_data[KEY_TARGET_FRAMEWORK]
|
||||
if framework == "esp-idf":
|
||||
if esp_idf is None:
|
||||
raise Invalid("This feature is incompatible with esp-idf")
|
||||
msg = "This feature is incompatible with esp-idf"
|
||||
if extra_message:
|
||||
msg += f". {extra_message}"
|
||||
raise Invalid(msg)
|
||||
required = esp_idf
|
||||
elif CORE.is_esp32 and framework == "arduino":
|
||||
if esp32_arduino is None:
|
||||
raise Invalid(
|
||||
"This feature is incompatible with ESP32 using arduino framework"
|
||||
)
|
||||
msg = "This feature is incompatible with ESP32 using arduino framework"
|
||||
if extra_message:
|
||||
msg += f". {extra_message}"
|
||||
raise Invalid(msg)
|
||||
required = esp32_arduino
|
||||
elif CORE.is_esp8266 and framework == "arduino":
|
||||
if esp8266_arduino is None:
|
||||
raise Invalid("This feature is incompatible with ESP8266")
|
||||
msg = "This feature is incompatible with ESP8266"
|
||||
if extra_message:
|
||||
msg += f". {extra_message}"
|
||||
raise Invalid(msg)
|
||||
required = esp8266_arduino
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
if max_version:
|
||||
if core_data[KEY_FRAMEWORK_VERSION] > required:
|
||||
msg = f"This feature requires framework version {required} or lower"
|
||||
if extra_message:
|
||||
msg += f". {extra_message}"
|
||||
raise Invalid(msg)
|
||||
return value
|
||||
|
||||
if core_data[KEY_FRAMEWORK_VERSION] < required:
|
||||
raise Invalid(
|
||||
f"This feature requires at least framework version {required}"
|
||||
)
|
||||
msg = f"This feature requires at least framework version {required}"
|
||||
if extra_message:
|
||||
msg += f". {extra_message}"
|
||||
raise Invalid(msg)
|
||||
return value
|
||||
|
||||
return validator
|
||||
|
@@ -1,6 +1,6 @@
|
||||
"""Constants used by esphome."""
|
||||
|
||||
__version__ = "2022.2.0b1"
|
||||
__version__ = "2022.2.0"
|
||||
|
||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||
|
||||
|
@@ -10,7 +10,7 @@ platformio==5.2.4 # When updating platformio, also update Dockerfile
|
||||
esptool==3.2
|
||||
click==8.0.3
|
||||
esphome-dashboard==20220209.0
|
||||
aioesphomeapi==10.8.1
|
||||
aioesphomeapi==10.8.2
|
||||
zeroconf==0.37.0
|
||||
|
||||
# esp-idf requires this, but doesn't bundle it by default
|
||||
|
Reference in New Issue
Block a user