esphome 2025.7.3__py3-none-any.whl → 2025.7.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of esphome might be problematic. Click here for more details.
- esphome/components/api/api_connection.h +10 -4
- esphome/components/font/__init__.py +9 -1
- esphome/components/gt911/touchscreen/gt911_touchscreen.cpp +20 -21
- esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp +46 -18
- esphome/components/i2s_audio/microphone/i2s_audio_microphone.h +2 -1
- esphome/components/ld2450/ld2450.cpp +6 -4
- esphome/components/logger/__init__.py +1 -0
- esphome/components/lvgl/widgets/tileview.py +15 -7
- esphome/components/remote_receiver/__init__.py +17 -1
- esphome/components/remote_receiver/remote_receiver_esp32.cpp +1 -2
- esphome/const.py +1 -1
- esphome/core/helpers.h +4 -1
- {esphome-2025.7.3.dist-info → esphome-2025.7.5.dist-info}/METADATA +1 -1
- {esphome-2025.7.3.dist-info → esphome-2025.7.5.dist-info}/RECORD +18 -18
- {esphome-2025.7.3.dist-info → esphome-2025.7.5.dist-info}/WHEEL +0 -0
- {esphome-2025.7.3.dist-info → esphome-2025.7.5.dist-info}/entry_points.txt +0 -0
- {esphome-2025.7.3.dist-info → esphome-2025.7.5.dist-info}/licenses/LICENSE +0 -0
- {esphome-2025.7.3.dist-info → esphome-2025.7.5.dist-info}/top_level.txt +0 -0
|
@@ -657,10 +657,16 @@ class APIConnection : public APIServerConnection {
|
|
|
657
657
|
bool send_message_smart_(EntityBase *entity, MessageCreatorPtr creator, uint8_t message_type,
|
|
658
658
|
uint8_t estimated_size) {
|
|
659
659
|
// Try to send immediately if:
|
|
660
|
-
// 1.
|
|
661
|
-
//
|
|
662
|
-
//
|
|
663
|
-
|
|
660
|
+
// 1. It's an UpdateStateResponse (always send immediately to handle cases where
|
|
661
|
+
// the main loop is blocked, e.g., during OTA updates)
|
|
662
|
+
// 2. OR: We should try to send immediately (should_try_send_immediately = true)
|
|
663
|
+
// AND Batch delay is 0 (user has opted in to immediate sending)
|
|
664
|
+
// 3. AND: Buffer has space available
|
|
665
|
+
if ((
|
|
666
|
+
#ifdef USE_UPDATE
|
|
667
|
+
message_type == UpdateStateResponse::MESSAGE_TYPE ||
|
|
668
|
+
#endif
|
|
669
|
+
(this->flags_.should_try_send_immediately && this->get_batch_delay_ms_() == 0)) &&
|
|
664
670
|
this->helper_->can_write_without_blocking()) {
|
|
665
671
|
// Now actually encode and send
|
|
666
672
|
if (creator(entity, this, MAX_BATCH_PACKET_SIZE, true) &&
|
|
@@ -15,6 +15,7 @@ from freetype import (
|
|
|
15
15
|
FT_LOAD_RENDER,
|
|
16
16
|
FT_LOAD_TARGET_MONO,
|
|
17
17
|
Face,
|
|
18
|
+
FT_Exception,
|
|
18
19
|
ft_pixel_mode_mono,
|
|
19
20
|
)
|
|
20
21
|
import requests
|
|
@@ -94,7 +95,14 @@ class FontCache(MutableMapping):
|
|
|
94
95
|
return self.store[self._keytransform(item)]
|
|
95
96
|
|
|
96
97
|
def __setitem__(self, key, value):
|
|
97
|
-
self.
|
|
98
|
+
transformed = self._keytransform(key)
|
|
99
|
+
try:
|
|
100
|
+
self.store[transformed] = Face(str(value))
|
|
101
|
+
except FT_Exception as exc:
|
|
102
|
+
file = transformed.split(":", 1)
|
|
103
|
+
raise cv.Invalid(
|
|
104
|
+
f"{file[0].capitalize()} {file[1]} is not a valid font file"
|
|
105
|
+
) from exc
|
|
98
106
|
|
|
99
107
|
|
|
100
108
|
FONT_CACHE = FontCache()
|
|
@@ -8,6 +8,8 @@ namespace gt911 {
|
|
|
8
8
|
|
|
9
9
|
static const char *const TAG = "gt911.touchscreen";
|
|
10
10
|
|
|
11
|
+
static const uint8_t PRIMARY_ADDRESS = 0x5D; // default I2C address for GT911
|
|
12
|
+
static const uint8_t SECONDARY_ADDRESS = 0x14; // secondary I2C address for GT911
|
|
11
13
|
static const uint8_t GET_TOUCH_STATE[2] = {0x81, 0x4E};
|
|
12
14
|
static const uint8_t CLEAR_TOUCH_STATE[3] = {0x81, 0x4E, 0x00};
|
|
13
15
|
static const uint8_t GET_TOUCHES[2] = {0x81, 0x4F};
|
|
@@ -18,8 +20,7 @@ static const size_t MAX_BUTTONS = 4; // max number of buttons scanned
|
|
|
18
20
|
|
|
19
21
|
#define ERROR_CHECK(err) \
|
|
20
22
|
if ((err) != i2c::ERROR_OK) { \
|
|
21
|
-
|
|
22
|
-
this->status_set_warning(); \
|
|
23
|
+
this->status_set_warning("Communication failure"); \
|
|
23
24
|
return; \
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -30,31 +31,31 @@ void GT911Touchscreen::setup() {
|
|
|
30
31
|
this->reset_pin_->setup();
|
|
31
32
|
this->reset_pin_->digital_write(false);
|
|
32
33
|
if (this->interrupt_pin_ != nullptr) {
|
|
33
|
-
//
|
|
34
|
+
// temporarily set the interrupt pin to output to control address selection
|
|
34
35
|
this->interrupt_pin_->pin_mode(gpio::FLAG_OUTPUT);
|
|
35
|
-
this->interrupt_pin_->setup();
|
|
36
36
|
this->interrupt_pin_->digital_write(false);
|
|
37
37
|
}
|
|
38
38
|
delay(2);
|
|
39
39
|
this->reset_pin_->digital_write(true);
|
|
40
40
|
delay(50); // NOLINT
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
}
|
|
42
|
+
if (this->interrupt_pin_ != nullptr) {
|
|
43
|
+
// set pre-configured input mode
|
|
44
|
+
this->interrupt_pin_->setup();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
// check the configuration of the int line.
|
|
48
48
|
uint8_t data[4];
|
|
49
|
-
err = this->write(GET_SWITCHES,
|
|
49
|
+
err = this->write(GET_SWITCHES, sizeof(GET_SWITCHES));
|
|
50
|
+
if (err != i2c::ERROR_OK && this->address_ == PRIMARY_ADDRESS) {
|
|
51
|
+
this->address_ = SECONDARY_ADDRESS;
|
|
52
|
+
err = this->write(GET_SWITCHES, sizeof(GET_SWITCHES));
|
|
53
|
+
}
|
|
50
54
|
if (err == i2c::ERROR_OK) {
|
|
51
55
|
err = this->read(data, 1);
|
|
52
56
|
if (err == i2c::ERROR_OK) {
|
|
53
|
-
ESP_LOGD(TAG, "Read from switches: 0x%02X", data[0]);
|
|
57
|
+
ESP_LOGD(TAG, "Read from switches at address 0x%02X: 0x%02X", this->address_, data[0]);
|
|
54
58
|
if (this->interrupt_pin_ != nullptr) {
|
|
55
|
-
// datasheet says NOT to use pullup/down on the int line.
|
|
56
|
-
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT);
|
|
57
|
-
this->interrupt_pin_->setup();
|
|
58
59
|
this->attach_interrupt_(this->interrupt_pin_,
|
|
59
60
|
(data[0] & 1) ? gpio::INTERRUPT_FALLING_EDGE : gpio::INTERRUPT_RISING_EDGE);
|
|
60
61
|
}
|
|
@@ -63,7 +64,7 @@ void GT911Touchscreen::setup() {
|
|
|
63
64
|
if (this->x_raw_max_ == 0 || this->y_raw_max_ == 0) {
|
|
64
65
|
// no calibration? Attempt to read the max values from the touchscreen.
|
|
65
66
|
if (err == i2c::ERROR_OK) {
|
|
66
|
-
err = this->write(GET_MAX_VALUES,
|
|
67
|
+
err = this->write(GET_MAX_VALUES, sizeof(GET_MAX_VALUES));
|
|
67
68
|
if (err == i2c::ERROR_OK) {
|
|
68
69
|
err = this->read(data, sizeof(data));
|
|
69
70
|
if (err == i2c::ERROR_OK) {
|
|
@@ -75,15 +76,12 @@ void GT911Touchscreen::setup() {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
if (err != i2c::ERROR_OK) {
|
|
78
|
-
|
|
79
|
-
this->mark_failed();
|
|
79
|
+
this->mark_failed("Failed to read calibration");
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
if (err != i2c::ERROR_OK) {
|
|
84
|
-
|
|
85
|
-
this->mark_failed();
|
|
86
|
-
return;
|
|
84
|
+
this->mark_failed("Failed to communicate");
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
ESP_LOGCONFIG(TAG, "GT911 Touchscreen setup complete");
|
|
@@ -94,7 +92,7 @@ void GT911Touchscreen::update_touches() {
|
|
|
94
92
|
uint8_t touch_state = 0;
|
|
95
93
|
uint8_t data[MAX_TOUCHES + 1][8]; // 8 bytes each for each point, plus extra space for the key byte
|
|
96
94
|
|
|
97
|
-
err = this->write(GET_TOUCH_STATE, sizeof(GET_TOUCH_STATE)
|
|
95
|
+
err = this->write(GET_TOUCH_STATE, sizeof(GET_TOUCH_STATE));
|
|
98
96
|
ERROR_CHECK(err);
|
|
99
97
|
err = this->read(&touch_state, 1);
|
|
100
98
|
ERROR_CHECK(err);
|
|
@@ -106,7 +104,7 @@ void GT911Touchscreen::update_touches() {
|
|
|
106
104
|
return;
|
|
107
105
|
}
|
|
108
106
|
|
|
109
|
-
err = this->write(GET_TOUCHES, sizeof(GET_TOUCHES)
|
|
107
|
+
err = this->write(GET_TOUCHES, sizeof(GET_TOUCHES));
|
|
110
108
|
ERROR_CHECK(err);
|
|
111
109
|
// num_of_touches is guaranteed to be 0..5. Also read the key data
|
|
112
110
|
err = this->read(data[0], sizeof(data[0]) * num_of_touches + 1);
|
|
@@ -132,6 +130,7 @@ void GT911Touchscreen::dump_config() {
|
|
|
132
130
|
ESP_LOGCONFIG(TAG, "GT911 Touchscreen:");
|
|
133
131
|
LOG_I2C_DEVICE(this);
|
|
134
132
|
LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
|
|
133
|
+
LOG_PIN(" Reset Pin: ", this->reset_pin_);
|
|
135
134
|
}
|
|
136
135
|
|
|
137
136
|
} // namespace gt911
|
|
@@ -24,9 +24,6 @@ static const uint32_t READ_DURATION_MS = 16;
|
|
|
24
24
|
static const size_t TASK_STACK_SIZE = 4096;
|
|
25
25
|
static const ssize_t TASK_PRIORITY = 23;
|
|
26
26
|
|
|
27
|
-
// Use an exponential moving average to correct a DC offset with weight factor 1/1000
|
|
28
|
-
static const int32_t DC_OFFSET_MOVING_AVERAGE_COEFFICIENT_DENOMINATOR = 1000;
|
|
29
|
-
|
|
30
27
|
static const char *const TAG = "i2s_audio.microphone";
|
|
31
28
|
|
|
32
29
|
enum MicrophoneEventGroupBits : uint32_t {
|
|
@@ -382,26 +379,57 @@ void I2SAudioMicrophone::mic_task(void *params) {
|
|
|
382
379
|
}
|
|
383
380
|
|
|
384
381
|
void I2SAudioMicrophone::fix_dc_offset_(std::vector<uint8_t> &data) {
|
|
382
|
+
/**
|
|
383
|
+
* From https://www.musicdsp.org/en/latest/Filters/135-dc-filter.html:
|
|
384
|
+
*
|
|
385
|
+
* y(n) = x(n) - x(n-1) + R * y(n-1)
|
|
386
|
+
* R = 1 - (pi * 2 * frequency / samplerate)
|
|
387
|
+
*
|
|
388
|
+
* From https://en.wikipedia.org/wiki/Hearing_range:
|
|
389
|
+
* The human range is commonly given as 20Hz up.
|
|
390
|
+
*
|
|
391
|
+
* From https://en.wikipedia.org/wiki/High-resolution_audio:
|
|
392
|
+
* A reasonable upper bound for sample rate seems to be 96kHz.
|
|
393
|
+
*
|
|
394
|
+
* Calculate R value for 20Hz on a 96kHz sample rate:
|
|
395
|
+
* R = 1 - (pi * 2 * 20 / 96000)
|
|
396
|
+
* R = 0.9986910031
|
|
397
|
+
*
|
|
398
|
+
* Transform floating point to bit-shifting approximation:
|
|
399
|
+
* output = input - prev_input + R * prev_output
|
|
400
|
+
* output = input - prev_input + (prev_output - (prev_output >> S))
|
|
401
|
+
*
|
|
402
|
+
* Approximate bit-shift value S from R:
|
|
403
|
+
* R = 1 - (1 >> S)
|
|
404
|
+
* R = 1 - (1 / 2^S)
|
|
405
|
+
* R = 1 - 2^-S
|
|
406
|
+
* 0.9986910031 = 1 - 2^-S
|
|
407
|
+
* S = 9.57732 ~= 10
|
|
408
|
+
*
|
|
409
|
+
* Actual R from S:
|
|
410
|
+
* R = 1 - 2^-10 = 0.9990234375
|
|
411
|
+
*
|
|
412
|
+
* Confirm this has effect outside human hearing on 96000kHz sample:
|
|
413
|
+
* 0.9990234375 = 1 - (pi * 2 * f / 96000)
|
|
414
|
+
* f = 14.9208Hz
|
|
415
|
+
*
|
|
416
|
+
* Confirm this has effect outside human hearing on PDM 16kHz sample:
|
|
417
|
+
* 0.9990234375 = 1 - (pi * 2 * f / 16000)
|
|
418
|
+
* f = 2.4868Hz
|
|
419
|
+
*
|
|
420
|
+
*/
|
|
421
|
+
const uint8_t dc_filter_shift = 10;
|
|
385
422
|
const size_t bytes_per_sample = this->audio_stream_info_.samples_to_bytes(1);
|
|
386
423
|
const uint32_t total_samples = this->audio_stream_info_.bytes_to_samples(data.size());
|
|
387
|
-
|
|
388
|
-
if (total_samples == 0) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
int64_t offset_accumulator = 0;
|
|
393
424
|
for (uint32_t sample_index = 0; sample_index < total_samples; ++sample_index) {
|
|
394
425
|
const uint32_t byte_index = sample_index * bytes_per_sample;
|
|
395
|
-
int32_t
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
426
|
+
int32_t input = audio::unpack_audio_sample_to_q31(&data[byte_index], bytes_per_sample);
|
|
427
|
+
int32_t output = input - this->dc_offset_prev_input_ +
|
|
428
|
+
(this->dc_offset_prev_output_ - (this->dc_offset_prev_output_ >> dc_filter_shift));
|
|
429
|
+
this->dc_offset_prev_input_ = input;
|
|
430
|
+
this->dc_offset_prev_output_ = output;
|
|
431
|
+
audio::pack_q31_as_audio_sample(output, &data[byte_index], bytes_per_sample);
|
|
399
432
|
}
|
|
400
|
-
|
|
401
|
-
const int32_t new_offset = offset_accumulator / total_samples;
|
|
402
|
-
this->dc_offset_ = new_offset / DC_OFFSET_MOVING_AVERAGE_COEFFICIENT_DENOMINATOR +
|
|
403
|
-
(DC_OFFSET_MOVING_AVERAGE_COEFFICIENT_DENOMINATOR - 1) * this->dc_offset_ /
|
|
404
|
-
DC_OFFSET_MOVING_AVERAGE_COEFFICIENT_DENOMINATOR;
|
|
405
433
|
}
|
|
406
434
|
|
|
407
435
|
size_t I2SAudioMicrophone::read_(uint8_t *buf, size_t len, TickType_t ticks_to_wait) {
|
|
@@ -82,7 +82,8 @@ class I2SAudioMicrophone : public I2SAudioIn, public microphone::Microphone, pub
|
|
|
82
82
|
|
|
83
83
|
bool correct_dc_offset_;
|
|
84
84
|
bool locked_driver_{false};
|
|
85
|
-
int32_t
|
|
85
|
+
int32_t dc_offset_prev_input_{0};
|
|
86
|
+
int32_t dc_offset_prev_output_{0};
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
} // namespace i2s_audio
|
|
@@ -477,10 +477,11 @@ void LD2450Component::handle_periodic_data_() {
|
|
|
477
477
|
// X
|
|
478
478
|
start = TARGET_X + index * 8;
|
|
479
479
|
is_moving = false;
|
|
480
|
+
// tx is used for further calculations, so always needs to be populated
|
|
481
|
+
val = ld2450::decode_coordinate(this->buffer_data_[start], this->buffer_data_[start + 1]);
|
|
482
|
+
tx = val;
|
|
480
483
|
sensor::Sensor *sx = this->move_x_sensors_[index];
|
|
481
484
|
if (sx != nullptr) {
|
|
482
|
-
val = ld2450::decode_coordinate(this->buffer_data_[start], this->buffer_data_[start + 1]);
|
|
483
|
-
tx = val;
|
|
484
485
|
if (this->cached_target_data_[index].x != val) {
|
|
485
486
|
sx->publish_state(val);
|
|
486
487
|
this->cached_target_data_[index].x = val;
|
|
@@ -488,10 +489,11 @@ void LD2450Component::handle_periodic_data_() {
|
|
|
488
489
|
}
|
|
489
490
|
// Y
|
|
490
491
|
start = TARGET_Y + index * 8;
|
|
492
|
+
// ty is used for further calculations, so always needs to be populated
|
|
493
|
+
val = ld2450::decode_coordinate(this->buffer_data_[start], this->buffer_data_[start + 1]);
|
|
494
|
+
ty = val;
|
|
491
495
|
sensor::Sensor *sy = this->move_y_sensors_[index];
|
|
492
496
|
if (sy != nullptr) {
|
|
493
|
-
val = ld2450::decode_coordinate(this->buffer_data_[start], this->buffer_data_[start + 1]);
|
|
494
|
-
ty = val;
|
|
495
497
|
if (this->cached_target_data_[index].y != val) {
|
|
496
498
|
sy->publish_state(val);
|
|
497
499
|
this->cached_target_data_[index].y = val;
|
|
@@ -400,6 +400,7 @@ CONF_LOGGER_LOG = "logger.log"
|
|
|
400
400
|
LOGGER_LOG_ACTION_SCHEMA = cv.All(
|
|
401
401
|
cv.maybe_simple_value(
|
|
402
402
|
{
|
|
403
|
+
cv.GenerateID(CONF_LOGGER_ID): cv.use_id(Logger),
|
|
403
404
|
cv.Required(CONF_FORMAT): cv.string,
|
|
404
405
|
cv.Optional(CONF_ARGS, default=list): cv.ensure_list(cv.lambda_),
|
|
405
406
|
cv.Optional(CONF_LEVEL, default="DEBUG"): cv.one_of(
|
|
@@ -15,7 +15,7 @@ from ..defines import (
|
|
|
15
15
|
TILE_DIRECTIONS,
|
|
16
16
|
literal,
|
|
17
17
|
)
|
|
18
|
-
from ..lv_validation import animated, lv_int
|
|
18
|
+
from ..lv_validation import animated, lv_int, lv_pct
|
|
19
19
|
from ..lvcode import lv, lv_assign, lv_expr, lv_obj, lv_Pvariable
|
|
20
20
|
from ..schemas import container_schema
|
|
21
21
|
from ..types import LV_EVENT, LvType, ObjUpdateAction, lv_obj_t, lv_obj_t_ptr
|
|
@@ -41,8 +41,8 @@ TILEVIEW_SCHEMA = cv.Schema(
|
|
|
41
41
|
container_schema(
|
|
42
42
|
obj_spec,
|
|
43
43
|
{
|
|
44
|
-
cv.Required(CONF_ROW):
|
|
45
|
-
cv.Required(CONF_COLUMN):
|
|
44
|
+
cv.Required(CONF_ROW): cv.positive_int,
|
|
45
|
+
cv.Required(CONF_COLUMN): cv.positive_int,
|
|
46
46
|
cv.GenerateID(): cv.declare_id(lv_tile_t),
|
|
47
47
|
cv.Optional(CONF_DIR, default="ALL"): TILE_DIRECTIONS.several_of,
|
|
48
48
|
},
|
|
@@ -63,21 +63,29 @@ class TileviewType(WidgetType):
|
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
async def to_code(self, w: Widget, config: dict):
|
|
66
|
-
|
|
66
|
+
tiles = config[CONF_TILES]
|
|
67
|
+
for tile_conf in tiles:
|
|
67
68
|
w_id = tile_conf[CONF_ID]
|
|
68
69
|
tile_obj = lv_Pvariable(lv_obj_t, w_id)
|
|
69
70
|
tile = Widget.create(w_id, tile_obj, tile_spec, tile_conf)
|
|
70
71
|
dirs = tile_conf[CONF_DIR]
|
|
71
72
|
if isinstance(dirs, list):
|
|
72
73
|
dirs = "|".join(dirs)
|
|
74
|
+
row_pos = tile_conf[CONF_ROW]
|
|
75
|
+
col_pos = tile_conf[CONF_COLUMN]
|
|
73
76
|
lv_assign(
|
|
74
77
|
tile_obj,
|
|
75
|
-
lv_expr.tileview_add_tile(
|
|
76
|
-
w.obj, tile_conf[CONF_COLUMN], tile_conf[CONF_ROW], literal(dirs)
|
|
77
|
-
),
|
|
78
|
+
lv_expr.tileview_add_tile(w.obj, col_pos, row_pos, literal(dirs)),
|
|
78
79
|
)
|
|
80
|
+
# Bugfix for LVGL 8.x
|
|
81
|
+
lv_obj.set_pos(tile_obj, lv_pct(col_pos * 100), lv_pct(row_pos * 100))
|
|
79
82
|
await set_obj_properties(tile, tile_conf)
|
|
80
83
|
await add_widgets(tile, tile_conf)
|
|
84
|
+
if tiles:
|
|
85
|
+
# Set the first tile as active
|
|
86
|
+
lv_obj.set_tile_id(
|
|
87
|
+
w.obj, tiles[0][CONF_COLUMN], tiles[0][CONF_ROW], literal("LV_ANIM_OFF")
|
|
88
|
+
)
|
|
81
89
|
|
|
82
90
|
|
|
83
91
|
tileview_spec = TileviewType()
|
|
@@ -60,6 +60,20 @@ RemoteReceiverComponent = remote_receiver_ns.class_(
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
def validate_config(config):
|
|
64
|
+
if CORE.is_esp32:
|
|
65
|
+
variant = esp32.get_esp32_variant()
|
|
66
|
+
if variant in (esp32.const.VARIANT_ESP32, esp32.const.VARIANT_ESP32S2):
|
|
67
|
+
max_idle = 65535
|
|
68
|
+
else:
|
|
69
|
+
max_idle = 32767
|
|
70
|
+
if CONF_CLOCK_RESOLUTION in config:
|
|
71
|
+
max_idle = int(max_idle * 1000000 / config[CONF_CLOCK_RESOLUTION])
|
|
72
|
+
if config[CONF_IDLE].total_microseconds > max_idle:
|
|
73
|
+
raise cv.Invalid(f"config 'idle' exceeds the maximum value of {max_idle}us")
|
|
74
|
+
return config
|
|
75
|
+
|
|
76
|
+
|
|
63
77
|
def validate_tolerance(value):
|
|
64
78
|
if isinstance(value, dict):
|
|
65
79
|
return TOLERANCE_SCHEMA(value)
|
|
@@ -136,7 +150,9 @@ CONFIG_SCHEMA = remote_base.validate_triggers(
|
|
|
136
150
|
cv.boolean,
|
|
137
151
|
),
|
|
138
152
|
}
|
|
139
|
-
)
|
|
153
|
+
)
|
|
154
|
+
.extend(cv.COMPONENT_SCHEMA)
|
|
155
|
+
.add_extra(validate_config)
|
|
140
156
|
)
|
|
141
157
|
|
|
142
158
|
|
|
@@ -86,10 +86,9 @@ void RemoteReceiverComponent::setup() {
|
|
|
86
86
|
|
|
87
87
|
uint32_t event_size = sizeof(rmt_rx_done_event_data_t);
|
|
88
88
|
uint32_t max_filter_ns = 255u * 1000 / (RMT_CLK_FREQ / 1000000);
|
|
89
|
-
uint32_t max_idle_ns = 65535u * 1000;
|
|
90
89
|
memset(&this->store_.config, 0, sizeof(this->store_.config));
|
|
91
90
|
this->store_.config.signal_range_min_ns = std::min(this->filter_us_ * 1000, max_filter_ns);
|
|
92
|
-
this->store_.config.signal_range_max_ns =
|
|
91
|
+
this->store_.config.signal_range_max_ns = this->idle_us_ * 1000;
|
|
93
92
|
this->store_.filter_symbols = this->filter_symbols_;
|
|
94
93
|
this->store_.receive_size = this->receive_symbols_ * sizeof(rmt_symbol_word_t);
|
|
95
94
|
this->store_.buffer_size = std::max((event_size + this->store_.receive_size) * 2, this->buffer_size_);
|
esphome/const.py
CHANGED
esphome/core/helpers.h
CHANGED
|
@@ -67,7 +67,10 @@ To bit_cast(const From &src) {
|
|
|
67
67
|
return dst;
|
|
68
68
|
}
|
|
69
69
|
#endif
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
// clang-format off
|
|
72
|
+
inline float lerp(float completion, float start, float end) = delete; // Please use std::lerp. Notice that it has different order on arguments!
|
|
73
|
+
// clang-format on
|
|
71
74
|
|
|
72
75
|
// std::byteswap from C++23
|
|
73
76
|
template<typename T> constexpr T byteswap(T n) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: esphome
|
|
3
|
-
Version: 2025.7.
|
|
3
|
+
Version: 2025.7.5
|
|
4
4
|
Summary: ESPHome is a system to configure your microcontrollers by simple yet powerful configuration files and control them remotely through Home Automation systems.
|
|
5
5
|
Author-email: The ESPHome Authors <esphome@openhomefoundation.org>
|
|
6
6
|
License: MIT
|
|
@@ -5,7 +5,7 @@ esphome/codegen.py,sha256=H_WB4rj0uEowvlhEb31EjJQwutLQ5CQkJIsNgDK-wx8,1917
|
|
|
5
5
|
esphome/config.py,sha256=b-Gh-DEx_pax0ZKqHTKb5gmMIvaQA71bJvE-15AI0JI,42211
|
|
6
6
|
esphome/config_helpers.py,sha256=BpyuWRxj5edJGIW7VP4S59i4I8g8baSlWpNyu6nB_uM,5413
|
|
7
7
|
esphome/config_validation.py,sha256=QUNpomRbIhqTaSrZZXNFcTQdPibGPbYDNSo5sTIzqCI,64924
|
|
8
|
-
esphome/const.py,sha256=
|
|
8
|
+
esphome/const.py,sha256=KfTHIfnS2AZHANmoUCkRFP-zGx-VO-YLQyFopyQtiOI,43367
|
|
9
9
|
esphome/coroutine.py,sha256=HNBqqhaTbpvsOI19bTXltxJCMVtoeqZPe4qTf4CKkAc,9309
|
|
10
10
|
esphome/cpp_generator.py,sha256=khmyuRIOc-ST9zIZjX7uOWLy9sSJhk4C2KexoBv51uk,31946
|
|
11
11
|
esphome/cpp_helpers.py,sha256=P9FVGpid75_UcKxIf-sj7GbhWGQNRcBm_2XVF3r7NtU,3998
|
|
@@ -184,7 +184,7 @@ esphome/components/apds9960/binary_sensor.py,sha256=MvCYb6pTgOU48TMm_YhN6uHKkoFK
|
|
|
184
184
|
esphome/components/apds9960/sensor.py,sha256=vUPm5H_IFROftGlMJWfgqSzm0IeLpYh5DvtA_DL1Amk,872
|
|
185
185
|
esphome/components/api/__init__.py,sha256=c6z0YUDVDmGpZiiNAsiqiuheib4qv8cw1NfCL9OvVcA,12311
|
|
186
186
|
esphome/components/api/api_connection.cpp,sha256=O-1osGKN7dqC6X179V28lZfp0ipfDW-9FyEDrFai1n8,80703
|
|
187
|
-
esphome/components/api/api_connection.h,sha256=
|
|
187
|
+
esphome/components/api/api_connection.h,sha256=IM_cz7AQCkTI_-DZaTJz6yPjZZBD9af3HwIkDE0vQcY,30808
|
|
188
188
|
esphome/components/api/api_frame_helper.cpp,sha256=fAt3UqdHCJSSggcJm1dqBz46PTbJS6lLrhwgXE-pZvw,38065
|
|
189
189
|
esphome/components/api/api_frame_helper.h,sha256=p6af-nRWvSLG4Vimtjzw2BKZJiCts9mknurSYZTeNsM,10293
|
|
190
190
|
esphome/components/api/api_noise_context.h,sha256=y_3hWMKXtKxyCwZ8cKQjn3gQqenaAX5DhcCFQ6kBiPc,606
|
|
@@ -999,7 +999,7 @@ esphome/components/fingerprint_grow/binary_sensor.py,sha256=rD-DJ5lZzX94WKH7XrkM
|
|
|
999
999
|
esphome/components/fingerprint_grow/fingerprint_grow.cpp,sha256=oUcj5GDrIQ59gv5yKhBmxJVjsLFLyTimn_skKuamxhU,18668
|
|
1000
1000
|
esphome/components/fingerprint_grow/fingerprint_grow.h,sha256=UEkLR4Cqas_XYlTLAwscXCAMRoprWeQZEZ_3vTsI-BM,11206
|
|
1001
1001
|
esphome/components/fingerprint_grow/sensor.py,sha256=IZbpSTae6AkEuba4SR8UUcDdiz7P5NriXO9TYoLxYFE,2245
|
|
1002
|
-
esphome/components/font/__init__.py,sha256=
|
|
1002
|
+
esphome/components/font/__init__.py,sha256=QCs1jfEQo-qGj4dlxQmlfcr57a34TRBWnHVaQYq-d4s,19566
|
|
1003
1003
|
esphome/components/font/font.cpp,sha256=7ttSZHCLEi-wtJUe9CLbYWPv4eKYAyrcFChcbVOOhuY,5557
|
|
1004
1004
|
esphome/components/font/font.h,sha256=nqSOZsAP4M7cZYIY8cIPpyA4I2SgFId9iU_G-vo_CFg,2834
|
|
1005
1005
|
esphome/components/fs3000/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -1090,7 +1090,7 @@ esphome/components/gt911/binary_sensor/__init__.py,sha256=iLJRYUsSFiY0BeJMH0RQ1A
|
|
|
1090
1090
|
esphome/components/gt911/binary_sensor/gt911_button.cpp,sha256=KACuxHcVbk3TZdSPy-8kO4j0LZZZmdAy4VWMicnaoLY,586
|
|
1091
1091
|
esphome/components/gt911/binary_sensor/gt911_button.h,sha256=3QCm3g8Ca9VtsKKjWgc_Bre4Dc3RhXgaLt1Mq3iEKd8,714
|
|
1092
1092
|
esphome/components/gt911/touchscreen/__init__.py,sha256=Hx69_ljCE1F-dP5BzEoQ7vIcOTy9_AsnDBb9FH3pCpU,1155
|
|
1093
|
-
esphome/components/gt911/touchscreen/gt911_touchscreen.cpp,sha256=
|
|
1093
|
+
esphome/components/gt911/touchscreen/gt911_touchscreen.cpp,sha256=AIfOlB5kudlaw-NIEsQOb_MDBzTOadf0q3kSNajtByI,4770
|
|
1094
1094
|
esphome/components/gt911/touchscreen/gt911_touchscreen.h,sha256=q-ZvP6OEGk8TU9eNfWI5-Bj5lVz-DXkxEGEiSzYr2L0,1026
|
|
1095
1095
|
esphome/components/haier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1096
1096
|
esphome/components/haier/automation.h,sha256=xHnMbqHWFwtibKxgqLraPeNlKLWv2_AT7VX0aMVYtr8,3688
|
|
@@ -1283,8 +1283,8 @@ esphome/components/i2s_audio/media_player/__init__.py,sha256=OrkYG35UbKj04hQF1Wt
|
|
|
1283
1283
|
esphome/components/i2s_audio/media_player/i2s_audio_media_player.cpp,sha256=CiO08AVUZG-egAIOs9OSgYttC1d3xQT871wJoq4718o,7563
|
|
1284
1284
|
esphome/components/i2s_audio/media_player/i2s_audio_media_player.h,sha256=gmG6n9YU2Mz85CFa3fO7Na2KBdt9fOrGbDg0-C7jwjI,2078
|
|
1285
1285
|
esphome/components/i2s_audio/microphone/__init__.py,sha256=m62jL72XwxBavk9cDULs2cdcbHHkM96JF5RPiPBHGcg,4281
|
|
1286
|
-
esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp,sha256=
|
|
1287
|
-
esphome/components/i2s_audio/microphone/i2s_audio_microphone.h,sha256=
|
|
1286
|
+
esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp,sha256=DhfnMf-janbfaW_Df_0VzyS9-yb_DWAb2sZsq7Ifl6I,17889
|
|
1287
|
+
esphome/components/i2s_audio/microphone/i2s_audio_microphone.h,sha256=IVF1iJgzro5NT0mWsrogUZxveExKg9_Q8zCEklFNzIw,2457
|
|
1288
1288
|
esphome/components/i2s_audio/speaker/__init__.py,sha256=GqE7dlAd6cbn0Es_ZRWpLZhMG0UQrPmwABPfkdF1I_g,6149
|
|
1289
1289
|
esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp,sha256=WWsZ72wenICP37UHodPgT7_ui_SHKLsBKAff4RuCu2M,27353
|
|
1290
1290
|
esphome/components/i2s_audio/speaker/i2s_audio_speaker.h,sha256=JZLm5X2Anpx4R34eXONlHvzypJvLI8N-MQiZkFhx7B4,6697
|
|
@@ -1455,7 +1455,7 @@ esphome/components/ld2420/text_sensor/text_sensor.cpp,sha256=6rvT1dp3u9Fpmpm-3kH
|
|
|
1455
1455
|
esphome/components/ld2420/text_sensor/text_sensor.h,sha256=aK91ri0NvHth3ya0zN1OeX81v1nqveoiJcOfqCpaAJI,672
|
|
1456
1456
|
esphome/components/ld2450/__init__.py,sha256=n6KvEkMsoaR3DUix1a1MGq-ZyjAAIAKDZ0lYN7iKSpQ,1267
|
|
1457
1457
|
esphome/components/ld2450/binary_sensor.py,sha256=SyIw9c-4JqNm8JKuzSKA9rVWaVCGsYAslV0VbhqJnoM,1755
|
|
1458
|
-
esphome/components/ld2450/ld2450.cpp,sha256=
|
|
1458
|
+
esphome/components/ld2450/ld2450.cpp,sha256=YpWKOjueeC0dXrh4gJemnbnXBpIUv-UjLMx2uvGp70w,35639
|
|
1459
1459
|
esphome/components/ld2450/ld2450.h,sha256=azHWHt9CdUL2R80km7_ahTjEc7OUgsIzDWq9apVrtCg,8292
|
|
1460
1460
|
esphome/components/ld2450/sensor.py,sha256=91vupem8yF0nfMaLLkjaRsaarWxxNxKXLvT6WiaimDo,6568
|
|
1461
1461
|
esphome/components/ld2450/text_sensor.py,sha256=msgqwIFvkSrewI7MP_KPKMWdMOEpPFOj0hhsfudUfho,2009
|
|
@@ -1550,7 +1550,7 @@ esphome/components/lock/__init__.py,sha256=z2ykcnNNmzRbri8sqwqQmbX0WtEkBV_Tazr1R
|
|
|
1550
1550
|
esphome/components/lock/automation.h,sha256=7MU5AuJizydt7mKTr_uFsNleFI2jeBf7B_dNp3e8Fks,1771
|
|
1551
1551
|
esphome/components/lock/lock.cpp,sha256=IyEt5xShAxMpmcn_GAPFv2lRCS-kr4MjjfExxfXuK-Q,3212
|
|
1552
1552
|
esphome/components/lock/lock.h,sha256=p_t5cG-75MNGVM8zEyfKJlziSjeUiIbpYan3tlZG6W8,6042
|
|
1553
|
-
esphome/components/logger/__init__.py,sha256=
|
|
1553
|
+
esphome/components/logger/__init__.py,sha256=3T2mSo2rmK87MINepmYAW6nF6kloLvLueb_dIPyXCJM,16265
|
|
1554
1554
|
esphome/components/logger/logger.cpp,sha256=aIra5ZZ5OEAPuqDgxZd3zkyAf46Jchht6mx-mcv380U,11704
|
|
1555
1555
|
esphome/components/logger/logger.h,sha256=Tkdz9qoSTiyx6Ebp9jBUnGMXyxG1iH6LTJoJfguTOaA,14460
|
|
1556
1556
|
esphome/components/logger/logger_esp32.cpp,sha256=NJddudDpsMP1fdV0mel8zXd7VNgMxqRIfarLp3uJPe0,6220
|
|
@@ -1640,7 +1640,7 @@ esphome/components/lvgl/widgets/spinner.py,sha256=TpO-rTS4UuBWbEg1O4wuejgVGx6bfD
|
|
|
1640
1640
|
esphome/components/lvgl/widgets/switch.py,sha256=qgFVOF16f6dY8O2ZxqB2L3MXi30DCK5VKWtixl-wBOo,433
|
|
1641
1641
|
esphome/components/lvgl/widgets/tabview.py,sha256=R3upkoqT8pLT0ua4md0JvaBc8MR_kS54HrGeClpyMF4,4198
|
|
1642
1642
|
esphome/components/lvgl/widgets/textarea.py,sha256=XxQ4VLHY8NCZTIaKkUjMdI17avutBI7VoxzndpJIpJc,1866
|
|
1643
|
-
esphome/components/lvgl/widgets/tileview.py,sha256=
|
|
1643
|
+
esphome/components/lvgl/widgets/tileview.py,sha256=ZlO2i1GfJLkdW5aVdtZoqnIoY7aqKwsobNfqgatAVEs,4270
|
|
1644
1644
|
esphome/components/m5stack_8angle/__init__.py,sha256=deBGpm0St5AydlmnDNclX_O6uEI3baT9XxjuSQzlSUA,793
|
|
1645
1645
|
esphome/components/m5stack_8angle/m5stack_8angle.cpp,sha256=mt8yIqcFXoRFXJ3lJYomdQ9cEODSne8uQCA0yD_UBtg,2033
|
|
1646
1646
|
esphome/components/m5stack_8angle/m5stack_8angle.h,sha256=0EG4iGQSWhXGHjxynZmOrgM1kn3IcWpUlF7CioKXeto,997
|
|
@@ -2464,10 +2464,10 @@ esphome/components/remote_base/toshiba_ac_protocol.cpp,sha256=CQNONh4-M91jPDecR_
|
|
|
2464
2464
|
esphome/components/remote_base/toshiba_ac_protocol.h,sha256=xkpVmBNtQ_uEbMHzwaJOle2KXBxa34Q-ABZfuCsMouA,1092
|
|
2465
2465
|
esphome/components/remote_base/toto_protocol.cpp,sha256=GxWkvuGXo3ThBQ3Q7ogNRrMYWHxjxcmeWRZj0JxZ1eM,2601
|
|
2466
2466
|
esphome/components/remote_base/toto_protocol.h,sha256=ZN4X6heapkxFeA0k5acAgRpGjzaB8SiKs2ABEvaDfns,1275
|
|
2467
|
-
esphome/components/remote_receiver/__init__.py,sha256=
|
|
2467
|
+
esphome/components/remote_receiver/__init__.py,sha256=0d8i1tuM-VQkJ8S6XMDHBuPqcgmdrUzxOOo37bk7SVA,6696
|
|
2468
2468
|
esphome/components/remote_receiver/binary_sensor.py,sha256=AybkaXQkJpcxpJhDkbgupO9zIiVhBFYpxvjUHBQbs_w,291
|
|
2469
2469
|
esphome/components/remote_receiver/remote_receiver.h,sha256=Rl2MH_ZclRL889h5Tiig15Yf_EX6KbsKcezuLSiKQlQ,2885
|
|
2470
|
-
esphome/components/remote_receiver/remote_receiver_esp32.cpp,sha256=
|
|
2470
|
+
esphome/components/remote_receiver/remote_receiver_esp32.cpp,sha256=tZlNUOJ24yoywp-ZDF4WptKp-RK6B6-b-0N2CLPvUS0,9024
|
|
2471
2471
|
esphome/components/remote_receiver/remote_receiver_esp8266.cpp,sha256=CDLSICGZ360ewhn1rgVDaKzwR-TOFqqRGjYusElNT0g,4535
|
|
2472
2472
|
esphome/components/remote_receiver/remote_receiver_libretiny.cpp,sha256=742G1k3RNETru9kbFHn5Ax3NE_OVt6EqeWWVDUNKj9Y,4490
|
|
2473
2473
|
esphome/components/remote_transmitter/__init__.py,sha256=wE9ogHpnVTbBPLn9pZH5qhyYi_mYzRHd5pKJ96uvuUc,3867
|
|
@@ -3618,7 +3618,7 @@ esphome/core/event_pool.h,sha256=X8_-72rODgpG9P_dSjezkJjFaaFvXy0cV42o6X-Vv1Q,240
|
|
|
3618
3618
|
esphome/core/gpio.h,sha256=kLkCnPxu4_1CsLR4BI_Baj1lDGoRIh8uubbwsIkJPIA,2575
|
|
3619
3619
|
esphome/core/hal.h,sha256=Le0-vtdDylYCaE9i4yvrv5-Y5PB5xoL3PM2FfMJsIeA,970
|
|
3620
3620
|
esphome/core/helpers.cpp,sha256=eyOYJWmMEcdX8dJ3RoIcl6MeOmc0C3cTPafZDTzQ4OM,20961
|
|
3621
|
-
esphome/core/helpers.h,sha256=
|
|
3621
|
+
esphome/core/helpers.h,sha256=TX-xJuk8__wi4mGJPjNr8B9JngJMRju8MmAVhfg6xn0,34129
|
|
3622
3622
|
esphome/core/lock_free_queue.h,sha256=j3wSEyxqkjBDnCwEQd4ARHDubjSrLPxMAzZvqdNN2co,4953
|
|
3623
3623
|
esphome/core/log.cpp,sha256=cc6JIMRlIEk7lCQa6JFrL6bTBZ89xWNLwf26AFNzKC0,1625
|
|
3624
3624
|
esphome/core/log.h,sha256=Fb0_ORK0q-WV0i49gzb8i9_C38RUe8VILIdbu1Bel5M,6627
|
|
@@ -3655,9 +3655,9 @@ esphome/dashboard/util/itertools.py,sha256=8eLrWEWmICLtXNxkKdYPQV0c_N4GEz8m9Npnb
|
|
|
3655
3655
|
esphome/dashboard/util/password.py,sha256=cQz3b9B-ijTe7zS6BeCW0hc3pWv6JjC78jmnycYYAh8,321
|
|
3656
3656
|
esphome/dashboard/util/subprocess.py,sha256=T8EW6dbU4LPd2DG1dRrdh8li71tt6J1isn411poMhkk,1022
|
|
3657
3657
|
esphome/dashboard/util/text.py,sha256=wwFtORlvHjsYkqb68IT-772LHAhWxT4OtnkIcPICQB0,317
|
|
3658
|
-
esphome-2025.7.
|
|
3659
|
-
esphome-2025.7.
|
|
3660
|
-
esphome-2025.7.
|
|
3661
|
-
esphome-2025.7.
|
|
3662
|
-
esphome-2025.7.
|
|
3663
|
-
esphome-2025.7.
|
|
3658
|
+
esphome-2025.7.5.dist-info/licenses/LICENSE,sha256=HzEjkBInJe44L4WvAOPfhPJJDNj6YbnqFyvGWRzArGM,36664
|
|
3659
|
+
esphome-2025.7.5.dist-info/METADATA,sha256=LRzKuaeJjsW7R3qKsOPqy0YTsiPcr58r_0hJ9089avg,3705
|
|
3660
|
+
esphome-2025.7.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
3661
|
+
esphome-2025.7.5.dist-info/entry_points.txt,sha256=mIxVNuWtbYzeEcaWCl-AQ-97aBOWbnYBAK8nbF6P4M0,50
|
|
3662
|
+
esphome-2025.7.5.dist-info/top_level.txt,sha256=0GSXEW3cnITpgG3qnsSMz0qoqJHAFyfw7Y8MVtEf1Yk,8
|
|
3663
|
+
esphome-2025.7.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|