Merge pull request #5465 from esphome/bump-2023.9.2

2023.9.2
This commit is contained in:
Jesse Hills 2023-10-02 21:24:01 +13:00 committed by GitHub
commit 40523e6823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 8 deletions

View file

@ -270,7 +270,7 @@ esphome/components/sn74hc165/* @jesserockz
esphome/components/socket/* @esphome/core esphome/components/socket/* @esphome/core
esphome/components/sonoff_d1/* @anatoly-savchenkov esphome/components/sonoff_d1/* @anatoly-savchenkov
esphome/components/speaker/* @jesserockz esphome/components/speaker/* @jesserockz
esphome/components/spi/* @esphome/core esphome/components/spi/* @clydebarrow @esphome/core
esphome/components/spi_device/* @clydebarrow esphome/components/spi_device/* @clydebarrow
esphome/components/spi_led_strip/* @clydebarrow esphome/components/spi_led_strip/* @clydebarrow
esphome/components/sprinkler/* @kbx81 esphome/components/sprinkler/* @kbx81

View file

@ -41,6 +41,8 @@ fi
mkdir -p "${pio_cache_base}" mkdir -p "${pio_cache_base}"
mkdir -p /config/esphome
if bashio::fs.directory_exists '/config/esphome/.esphome'; then if bashio::fs.directory_exists '/config/esphome/.esphome'; then
bashio::log.info "Migrating old .esphome directory..." bashio::log.info "Migrating old .esphome directory..."
if bashio::fs.file_exists '/config/esphome/.esphome/esphome.json'; then if bashio::fs.file_exists '/config/esphome/.esphome/esphome.json'; then

View file

@ -217,10 +217,7 @@ uint8_t MAX7219Component::printf(const char *format, ...) {
return 0; return 0;
} }
void MAX7219Component::set_writer(max7219_writer_t &&writer) { this->writer_ = writer; } void MAX7219Component::set_writer(max7219_writer_t &&writer) { this->writer_ = writer; }
void MAX7219Component::set_intensity(uint8_t intensity) { void MAX7219Component::set_intensity(uint8_t intensity) { this->intensity_ = intensity; }
this->intensity_ = intensity;
this->send_to_all_(MAX7219_REGISTER_INTENSITY, this->intensity_);
}
void MAX7219Component::set_num_chips(uint8_t num_chips) { this->num_chips_ = num_chips; } void MAX7219Component::set_num_chips(uint8_t num_chips) { this->num_chips_ = num_chips; }
uint8_t MAX7219Component::strftime(uint8_t pos, const char *format, ESPTime time) { uint8_t MAX7219Component::strftime(uint8_t pos, const char *format, ESPTime time) {

View file

@ -28,7 +28,7 @@ from esphome.const import (
) )
from esphome.core import coroutine_with_priority, CORE from esphome.core import coroutine_with_priority, CORE
CODEOWNERS = ["@esphome/core"] CODEOWNERS = ["@esphome/core", "@clydebarrow"]
spi_ns = cg.esphome_ns.namespace("spi") spi_ns = cg.esphome_ns.namespace("spi")
SPIComponent = spi_ns.class_("SPIComponent", cg.Component) SPIComponent = spi_ns.class_("SPIComponent", cg.Component)
SPIDevice = spi_ns.class_("SPIDevice") SPIDevice = spi_ns.class_("SPIDevice")
@ -187,7 +187,7 @@ def get_spi_interface(index):
# Following code can't apply to C2, H2 or 8266 since they have only one SPI # Following code can't apply to C2, H2 or 8266 since they have only one SPI
if get_target_variant() in (VARIANT_ESP32S3, VARIANT_ESP32S2): if get_target_variant() in (VARIANT_ESP32S3, VARIANT_ESP32S2):
return "new SPIClass(FSPI)" return "new SPIClass(FSPI)"
return "return new SPIClass(HSPI)" return "new SPIClass(HSPI)"
SPI_SCHEMA = cv.All( SPI_SCHEMA = cv.All(

View file

@ -248,6 +248,7 @@ class SPIDelegateDummy : public SPIDelegate {
SPIDelegateDummy() = default; SPIDelegateDummy() = default;
uint8_t transfer(uint8_t data) override { return 0; } uint8_t transfer(uint8_t data) override { return 0; }
void end_transaction() override{};
void begin_transaction() override; void begin_transaction() override;
}; };

View file

@ -33,6 +33,7 @@ const uint8_t WHIRLPOOL_SWING_MASK = 128;
const uint8_t WHIRLPOOL_POWER = 0x04; const uint8_t WHIRLPOOL_POWER = 0x04;
void WhirlpoolClimate::transmit_state() { void WhirlpoolClimate::transmit_state() {
this->last_transmit_time_ = millis(); // setting the time of the last transmission.
uint8_t remote_state[WHIRLPOOL_STATE_LENGTH] = {0}; uint8_t remote_state[WHIRLPOOL_STATE_LENGTH] = {0};
remote_state[0] = 0x83; remote_state[0] = 0x83;
remote_state[1] = 0x06; remote_state[1] = 0x06;
@ -149,6 +150,12 @@ void WhirlpoolClimate::transmit_state() {
} }
bool WhirlpoolClimate::on_receive(remote_base::RemoteReceiveData data) { bool WhirlpoolClimate::on_receive(remote_base::RemoteReceiveData data) {
// Check if the esp isn't currently transmitting.
if (millis() - this->last_transmit_time_ < 500) {
ESP_LOGV(TAG, "Blocked receive because of current trasmittion");
return false;
}
// Validate header // Validate header
if (!data.expect_item(WHIRLPOOL_HEADER_MARK, WHIRLPOOL_HEADER_SPACE)) { if (!data.expect_item(WHIRLPOOL_HEADER_MARK, WHIRLPOOL_HEADER_SPACE)) {
ESP_LOGV(TAG, "Header fail"); ESP_LOGV(TAG, "Header fail");

View file

@ -47,6 +47,8 @@ class WhirlpoolClimate : public climate_ir::ClimateIR {
void transmit_state() override; void transmit_state() override;
/// Handle received IR Buffer /// Handle received IR Buffer
bool on_receive(remote_base::RemoteReceiveData data) override; bool on_receive(remote_base::RemoteReceiveData data) override;
/// Set the time of the last transmission.
int32_t last_transmit_time_{};
bool send_swing_cmd_{false}; bool send_swing_cmd_{false};
Model model_; Model model_;

View file

@ -1,6 +1,6 @@
"""Constants used by esphome.""" """Constants used by esphome."""
__version__ = "2023.9.1" __version__ = "2023.9.2"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
VALID_SUBSTITUTIONS_CHARACTERS = ( VALID_SUBSTITUTIONS_CHARACTERS = (