mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
Merge pull request #7798 from esphome/bump-2024.11.1
Some checks failed
YAML lint / yamllint (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Check black (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / list-components (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run pytest (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Component test (push) Has been cancelled
CI / Split components for testing into 20 groups maximum (push) Has been cancelled
CI / Test split components (push) Has been cancelled
CI / CI Status (push) Has been cancelled
Some checks failed
YAML lint / yamllint (push) Has been cancelled
CI / Create common environment (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / Check black (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / list-components (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run pytest (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
CI / Component test (push) Has been cancelled
CI / Split components for testing into 20 groups maximum (push) Has been cancelled
CI / Test split components (push) Has been cancelled
CI / CI Status (push) Has been cancelled
2024.11.1
This commit is contained in:
commit
ee3cfb2b76
11 changed files with 25 additions and 16 deletions
|
@ -1,10 +1,9 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
from esphome.components.ota import BASE_OTA_SCHEMA, OTAComponent, ota_to_code
|
||||||
import esphome.final_validate as fv
|
|
||||||
from esphome.components.ota import BASE_OTA_SCHEMA, ota_to_code, OTAComponent
|
|
||||||
from esphome.config_helpers import merge_config
|
from esphome.config_helpers import merge_config
|
||||||
|
import esphome.config_validation as cv
|
||||||
from esphome.const import (
|
from esphome.const import (
|
||||||
CONF_ESPHOME,
|
CONF_ESPHOME,
|
||||||
CONF_ID,
|
CONF_ID,
|
||||||
|
@ -18,6 +17,7 @@ from esphome.const import (
|
||||||
CONF_VERSION,
|
CONF_VERSION,
|
||||||
)
|
)
|
||||||
from esphome.core import coroutine_with_priority
|
from esphome.core import coroutine_with_priority
|
||||||
|
import esphome.final_validate as fv
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ FINAL_VALIDATE_SCHEMA = ota_esphome_final_validate
|
||||||
@coroutine_with_priority(52.0)
|
@coroutine_with_priority(52.0)
|
||||||
async def to_code(config):
|
async def to_code(config):
|
||||||
var = cg.new_Pvariable(config[CONF_ID])
|
var = cg.new_Pvariable(config[CONF_ID])
|
||||||
await ota_to_code(var, config)
|
|
||||||
cg.add(var.set_port(config[CONF_PORT]))
|
cg.add(var.set_port(config[CONF_PORT]))
|
||||||
if CONF_PASSWORD in config:
|
if CONF_PASSWORD in config:
|
||||||
cg.add(var.set_auth_password(config[CONF_PASSWORD]))
|
cg.add(var.set_auth_password(config[CONF_PASSWORD]))
|
||||||
|
@ -132,3 +131,4 @@ async def to_code(config):
|
||||||
cg.add_define("USE_OTA_VERSION", config[CONF_VERSION])
|
cg.add_define("USE_OTA_VERSION", config[CONF_VERSION])
|
||||||
|
|
||||||
await cg.register_component(var, config)
|
await cg.register_component(var, config)
|
||||||
|
await ota_to_code(var, config)
|
||||||
|
|
|
@ -189,7 +189,7 @@ template<typename... Ts> class HttpRequestSendAction : public Action<Ts...> {
|
||||||
|
|
||||||
if (container == nullptr) {
|
if (container == nullptr) {
|
||||||
for (auto *trigger : this->error_triggers_)
|
for (auto *trigger : this->error_triggers_)
|
||||||
trigger->trigger(x...);
|
trigger->trigger();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,7 @@ async def to_code(config):
|
||||||
|
|
||||||
|
|
||||||
async def ota_to_code(var, config):
|
async def ota_to_code(var, config):
|
||||||
|
await cg.past_safe_mode()
|
||||||
use_state_callback = False
|
use_state_callback = False
|
||||||
for conf in config.get(CONF_ON_STATE_CHANGE, []):
|
for conf in config.get(CONF_ON_STATE_CHANGE, []):
|
||||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||||
|
|
|
@ -55,6 +55,7 @@ chip.cmd(PAGESEL, 0x00)
|
||||||
chip.cmd(0xC2, 0x00)
|
chip.cmd(0xC2, 0x00)
|
||||||
chip.delay(10)
|
chip.delay(10)
|
||||||
chip.cmd(TEON, 0x00)
|
chip.cmd(TEON, 0x00)
|
||||||
|
chip.cmd(PIXFMT, 0x55)
|
||||||
|
|
||||||
chip = DriverChip("AXS15231")
|
chip = DriverChip("AXS15231")
|
||||||
chip.cmd(0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5)
|
chip.cmd(0xBB, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xA5)
|
||||||
|
|
|
@ -40,13 +40,7 @@ class Rtttl : public Component {
|
||||||
void set_speaker(speaker::Speaker *speaker) { this->speaker_ = speaker; }
|
void set_speaker(speaker::Speaker *speaker) { this->speaker_ = speaker; }
|
||||||
#endif
|
#endif
|
||||||
float get_gain() { return gain_; }
|
float get_gain() { return gain_; }
|
||||||
void set_gain(float gain) {
|
void set_gain(float gain) { this->gain_ = clamp(gain, 0.0f, 1.0f); }
|
||||||
if (gain < 0.1f)
|
|
||||||
gain = 0.1f;
|
|
||||||
if (gain > 1.0f)
|
|
||||||
gain = 1.0f;
|
|
||||||
this->gain_ = gain;
|
|
||||||
}
|
|
||||||
void play(std::string rtttl);
|
void play(std::string rtttl);
|
||||||
void stop();
|
void stop();
|
||||||
void dump_config() override;
|
void dump_config() override;
|
||||||
|
|
|
@ -7,6 +7,7 @@ from esphome.const import CONF_DATA, CONF_ID, CONF_VOLUME
|
||||||
from esphome.core import CORE
|
from esphome.core import CORE
|
||||||
from esphome.coroutine import coroutine_with_priority
|
from esphome.coroutine import coroutine_with_priority
|
||||||
|
|
||||||
|
AUTO_LOAD = ["audio"]
|
||||||
CODEOWNERS = ["@jesserockz", "@kahrendt"]
|
CODEOWNERS = ["@jesserockz", "@kahrendt"]
|
||||||
|
|
||||||
IS_PLATFORM_COMPONENT = True
|
IS_PLATFORM_COMPONENT = True
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Constants used by esphome."""
|
"""Constants used by esphome."""
|
||||||
|
|
||||||
__version__ = "2024.11.0"
|
__version__ = "2024.11.1"
|
||||||
|
|
||||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||||
|
|
|
@ -184,6 +184,9 @@ PRELOAD_CONFIG_SCHEMA = cv.Schema(
|
||||||
cv.Optional(CONF_ESP8266_RESTORE_FROM_FLASH): cv.valid,
|
cv.Optional(CONF_ESP8266_RESTORE_FROM_FLASH): cv.valid,
|
||||||
cv.Optional(CONF_BOARD_FLASH_MODE): cv.valid,
|
cv.Optional(CONF_BOARD_FLASH_MODE): cv.valid,
|
||||||
cv.Optional(CONF_ARDUINO_VERSION): cv.valid,
|
cv.Optional(CONF_ARDUINO_VERSION): cv.valid,
|
||||||
|
cv.Optional(CONF_MIN_VERSION, default=ESPHOME_VERSION): cv.All(
|
||||||
|
cv.version_number, cv.validate_esphome_version
|
||||||
|
),
|
||||||
},
|
},
|
||||||
extra=cv.ALLOW_EXTRA,
|
extra=cv.ALLOW_EXTRA,
|
||||||
)
|
)
|
||||||
|
|
|
@ -103,7 +103,7 @@ class ESPHomeDashboard:
|
||||||
self.loop = asyncio.get_running_loop()
|
self.loop = asyncio.get_running_loop()
|
||||||
self.ping_request = asyncio.Event()
|
self.ping_request = asyncio.Event()
|
||||||
self.entries = DashboardEntries(self)
|
self.entries = DashboardEntries(self)
|
||||||
self.load_ignored_devices()
|
await self.loop.run_in_executor(None, self.load_ignored_devices)
|
||||||
|
|
||||||
def load_ignored_devices(self) -> None:
|
def load_ignored_devices(self) -> None:
|
||||||
storage_path = Path(ignored_devices_storage_path())
|
storage_path = Path(ignored_devices_storage_path())
|
||||||
|
|
|
@ -544,7 +544,7 @@ class ImportRequestHandler(BaseHandler):
|
||||||
|
|
||||||
class IgnoreDeviceRequestHandler(BaseHandler):
|
class IgnoreDeviceRequestHandler(BaseHandler):
|
||||||
@authenticated
|
@authenticated
|
||||||
def post(self) -> None:
|
async def post(self) -> None:
|
||||||
dashboard = DASHBOARD
|
dashboard = DASHBOARD
|
||||||
try:
|
try:
|
||||||
args = json.loads(self.request.body.decode())
|
args = json.loads(self.request.body.decode())
|
||||||
|
@ -576,7 +576,8 @@ class IgnoreDeviceRequestHandler(BaseHandler):
|
||||||
else:
|
else:
|
||||||
dashboard.ignored_devices.discard(ignored_device.device_name)
|
dashboard.ignored_devices.discard(ignored_device.device_name)
|
||||||
|
|
||||||
dashboard.save_ignored_devices()
|
loop = asyncio.get_running_loop()
|
||||||
|
await loop.run_in_executor(None, dashboard.save_ignored_devices)
|
||||||
|
|
||||||
self.set_status(204)
|
self.set_status(204)
|
||||||
self.finish()
|
self.finish()
|
||||||
|
|
|
@ -39,6 +39,14 @@ http_request:
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
verify_ssl: ${verify_ssl}
|
verify_ssl: ${verify_ssl}
|
||||||
|
|
||||||
|
script:
|
||||||
|
- id: does_not_compile
|
||||||
|
parameters:
|
||||||
|
api_url: string
|
||||||
|
then:
|
||||||
|
- http_request.get:
|
||||||
|
url: "http://google.com"
|
||||||
|
|
||||||
ota:
|
ota:
|
||||||
- platform: http_request
|
- platform: http_request
|
||||||
on_begin:
|
on_begin:
|
||||||
|
|
Loading…
Reference in a new issue