esphome 2024.11.2__py3-none-any.whl → 2024.11.3__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.
- esphome/__main__.py +1 -1
- esphome/components/datetime/datetime_entity.cpp +1 -3
- esphome/components/esp32/__init__.py +6 -10
- esphome/components/lvgl/defines.py +1 -1
- esphome/components/lvgl/lvgl_esphome.h +3 -0
- esphome/components/lvgl/widgets/line.py +6 -0
- esphome/components/lvgl/widgets/msgbox.py +2 -1
- esphome/components/online_image/png_image.cpp +4 -0
- esphome/components/opentherm/hub.cpp +6 -7
- esphome/components/opentherm/opentherm.cpp +15 -31
- esphome/components/opentherm/opentherm.h +3 -4
- esphome/components/st7920/st7920.cpp +2 -3
- esphome/const.py +1 -1
- esphome/core/helpers.cpp +12 -0
- esphome/core/helpers.h +8 -0
- esphome/core/time.cpp +19 -15
- esphome/core/time.h +1 -3
- {esphome-2024.11.2.dist-info → esphome-2024.11.3.dist-info}/METADATA +1 -1
- {esphome-2024.11.2.dist-info → esphome-2024.11.3.dist-info}/RECORD +23 -23
- {esphome-2024.11.2.dist-info → esphome-2024.11.3.dist-info}/LICENSE +0 -0
- {esphome-2024.11.2.dist-info → esphome-2024.11.3.dist-info}/WHEEL +0 -0
- {esphome-2024.11.2.dist-info → esphome-2024.11.3.dist-info}/entry_points.txt +0 -0
- {esphome-2024.11.2.dist-info → esphome-2024.11.3.dist-info}/top_level.txt +0 -0
esphome/__main__.py
CHANGED
@@ -60,9 +60,7 @@ ESPTime DateTimeEntity::state_as_esptime() const {
|
|
60
60
|
obj.hour = this->hour_;
|
61
61
|
obj.minute = this->minute_;
|
62
62
|
obj.second = this->second_;
|
63
|
-
obj.
|
64
|
-
obj.day_of_year = 1; // Required to be valid for recalc_timestamp_local but not used.
|
65
|
-
obj.recalc_timestamp_local(false);
|
63
|
+
obj.recalc_timestamp_local();
|
66
64
|
return obj;
|
67
65
|
}
|
68
66
|
|
@@ -355,24 +355,20 @@ def _detect_variant(value):
|
|
355
355
|
|
356
356
|
|
357
357
|
def final_validate(config):
|
358
|
-
if
|
358
|
+
if not (
|
359
|
+
pio_options := fv.full_config.get()[CONF_ESPHOME].get(CONF_PLATFORMIO_OPTIONS)
|
360
|
+
):
|
361
|
+
# Not specified or empty
|
359
362
|
return config
|
360
363
|
|
361
364
|
pio_flash_size_key = "board_upload.flash_size"
|
362
365
|
pio_partitions_key = "board_build.partitions"
|
363
|
-
if
|
364
|
-
CONF_PARTITIONS in config
|
365
|
-
and pio_partitions_key
|
366
|
-
in fv.full_config.get()[CONF_ESPHOME][CONF_PLATFORMIO_OPTIONS]
|
367
|
-
):
|
366
|
+
if CONF_PARTITIONS in config and pio_partitions_key in pio_options:
|
368
367
|
raise cv.Invalid(
|
369
368
|
f"Do not specify '{pio_partitions_key}' in '{CONF_PLATFORMIO_OPTIONS}' with '{CONF_PARTITIONS}' in esp32"
|
370
369
|
)
|
371
370
|
|
372
|
-
if
|
373
|
-
pio_flash_size_key
|
374
|
-
in fv.full_config.get()[CONF_ESPHOME][CONF_PLATFORMIO_OPTIONS]
|
375
|
-
):
|
371
|
+
if pio_flash_size_key in pio_options:
|
376
372
|
raise cv.Invalid(
|
377
373
|
f"Please specify {CONF_FLASH_SIZE} within esp32 configuration only"
|
378
374
|
)
|
@@ -56,6 +56,9 @@ static const display::ColorBitness LV_BITNESS = display::ColorBitness::COLOR_BIT
|
|
56
56
|
inline void lv_img_set_src(lv_obj_t *obj, esphome::image::Image *image) {
|
57
57
|
lv_img_set_src(obj, image->get_lv_img_dsc());
|
58
58
|
}
|
59
|
+
inline void lv_disp_set_bg_image(lv_disp_t *disp, esphome::image::Image *image) {
|
60
|
+
lv_disp_set_bg_image(disp, image->get_lv_img_dsc());
|
61
|
+
}
|
59
62
|
#endif // USE_LVGL_IMAGE
|
60
63
|
|
61
64
|
// Parent class for things that wrap an LVGL object
|
@@ -35,6 +35,11 @@ LINE_SCHEMA = {
|
|
35
35
|
cv.GenerateID(CONF_POINT_LIST_ID): cv.declare_id(lv_point_t),
|
36
36
|
}
|
37
37
|
|
38
|
+
LINE_MODIFY_SCHEMA = {
|
39
|
+
cv.Optional(CONF_POINTS): cv_point_list,
|
40
|
+
cv.GenerateID(CONF_POINT_LIST_ID): cv.declare_id(lv_point_t),
|
41
|
+
}
|
42
|
+
|
38
43
|
|
39
44
|
class LineType(WidgetType):
|
40
45
|
def __init__(self):
|
@@ -43,6 +48,7 @@ class LineType(WidgetType):
|
|
43
48
|
LvType("lv_line_t"),
|
44
49
|
(CONF_MAIN,),
|
45
50
|
LINE_SCHEMA,
|
51
|
+
modify_schema=LINE_MODIFY_SCHEMA,
|
46
52
|
)
|
47
53
|
|
48
54
|
async def to_code(self, w: Widget, config):
|
@@ -29,7 +29,7 @@ from ..lvcode import (
|
|
29
29
|
)
|
30
30
|
from ..schemas import STYLE_SCHEMA, STYLED_TEXT_SCHEMA, container_schema, part_schema
|
31
31
|
from ..types import LV_EVENT, char_ptr, lv_obj_t
|
32
|
-
from . import Widget, set_obj_properties
|
32
|
+
from . import Widget, add_widgets, set_obj_properties
|
33
33
|
from .button import button_spec
|
34
34
|
from .buttonmatrix import (
|
35
35
|
BUTTONMATRIX_BUTTON_SCHEMA,
|
@@ -119,6 +119,7 @@ async def msgbox_to_code(top_layer, conf):
|
|
119
119
|
button_style = {CONF_ITEMS: button_style}
|
120
120
|
await set_obj_properties(buttonmatrix_widget, button_style)
|
121
121
|
await set_obj_properties(msgbox_widget, conf)
|
122
|
+
await add_widgets(msgbox_widget, conf)
|
122
123
|
async with LambdaContext(EVENT_ARG, where=messagebox_id) as close_action:
|
123
124
|
outer_widget.add_flag("LV_OBJ_FLAG_HIDDEN")
|
124
125
|
if close_button:
|
@@ -49,6 +49,10 @@ void PngDecoder::prepare(uint32_t download_size) {
|
|
49
49
|
}
|
50
50
|
|
51
51
|
int HOT PngDecoder::decode(uint8_t *buffer, size_t size) {
|
52
|
+
if (!this->pngle_) {
|
53
|
+
ESP_LOGE(TAG, "PNG decoder engine not initialized!");
|
54
|
+
return -1;
|
55
|
+
}
|
52
56
|
if (size < 256 && size < this->download_size_ - this->decoded_bytes_) {
|
53
57
|
ESP_LOGD(TAG, "Waiting for data");
|
54
58
|
return 0;
|
@@ -138,7 +138,7 @@ OpenthermHub::OpenthermHub() : Component(), in_pin_{}, out_pin_{} {}
|
|
138
138
|
void OpenthermHub::process_response(OpenthermData &data) {
|
139
139
|
ESP_LOGD(TAG, "Received OpenTherm response with id %d (%s)", data.id,
|
140
140
|
this->opentherm_->message_id_to_str((MessageId) data.id));
|
141
|
-
|
141
|
+
this->opentherm_->debug_data(data);
|
142
142
|
|
143
143
|
switch (data.id) {
|
144
144
|
OPENTHERM_SENSOR_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_RESPONSE_MESSAGE, OPENTHERM_MESSAGE_RESPONSE_ENTITY, ,
|
@@ -315,7 +315,7 @@ void OpenthermHub::start_conversation_() {
|
|
315
315
|
|
316
316
|
ESP_LOGD(TAG, "Sending request with id %d (%s)", request.id,
|
317
317
|
this->opentherm_->message_id_to_str((MessageId) request.id));
|
318
|
-
|
318
|
+
this->opentherm_->debug_data(request);
|
319
319
|
// Send the request
|
320
320
|
this->last_conversation_start_ = millis();
|
321
321
|
this->opentherm_->send(request);
|
@@ -340,19 +340,18 @@ void OpenthermHub::stop_opentherm_() {
|
|
340
340
|
this->opentherm_->stop();
|
341
341
|
this->last_conversation_end_ = millis();
|
342
342
|
}
|
343
|
-
|
344
343
|
void OpenthermHub::handle_protocol_write_error_() {
|
345
344
|
ESP_LOGW(TAG, "Error while sending request: %s",
|
346
345
|
this->opentherm_->operation_mode_to_str(this->opentherm_->get_mode()));
|
347
|
-
|
346
|
+
this->opentherm_->debug_data(this->last_request_);
|
348
347
|
}
|
349
|
-
|
350
348
|
void OpenthermHub::handle_protocol_read_error_() {
|
351
349
|
OpenThermError error;
|
352
350
|
this->opentherm_->get_protocol_error(error);
|
353
|
-
ESP_LOGW(TAG, "Protocol error occured while receiving response: %s",
|
351
|
+
ESP_LOGW(TAG, "Protocol error occured while receiving response: %s",
|
352
|
+
this->opentherm_->protocol_error_to_to_str(error.error_type));
|
353
|
+
this->opentherm_->debug_error(error);
|
354
354
|
}
|
355
|
-
|
356
355
|
void OpenthermHub::handle_timeout_error_() {
|
357
356
|
ESP_LOGW(TAG, "Receive response timed out at a protocol level");
|
358
357
|
this->stop_opentherm_();
|
@@ -15,15 +15,11 @@
|
|
15
15
|
#include "Arduino.h"
|
16
16
|
#endif
|
17
17
|
#include <string>
|
18
|
-
#include <sstream>
|
19
|
-
#include <bitset>
|
20
18
|
|
21
19
|
namespace esphome {
|
22
20
|
namespace opentherm {
|
23
21
|
|
24
22
|
using std::string;
|
25
|
-
using std::bitset;
|
26
|
-
using std::stringstream;
|
27
23
|
using std::to_string;
|
28
24
|
|
29
25
|
static const char *const TAG = "opentherm";
|
@@ -224,7 +220,7 @@ void IRAM_ATTR OpenTherm::bit_read_(uint8_t value) {
|
|
224
220
|
this->bit_pos_++;
|
225
221
|
}
|
226
222
|
|
227
|
-
ProtocolErrorType OpenTherm::verify_stop_bit_(uint8_t value) {
|
223
|
+
ProtocolErrorType IRAM_ATTR OpenTherm::verify_stop_bit_(uint8_t value) {
|
228
224
|
if (value) { // stop bit detected
|
229
225
|
return check_parity_(this->data_) ? ProtocolErrorType::NO_ERROR : ProtocolErrorType::PARITY_ERROR;
|
230
226
|
} else { // no stop bit detected, error
|
@@ -369,7 +365,7 @@ void IRAM_ATTR OpenTherm::stop_timer_() {
|
|
369
365
|
|
370
366
|
#ifdef ESP8266
|
371
367
|
// 5 kHz timer_
|
372
|
-
void OpenTherm::start_read_timer_() {
|
368
|
+
void IRAM_ATTR OpenTherm::start_read_timer_() {
|
373
369
|
InterruptLock const lock;
|
374
370
|
timer1_attachInterrupt(OpenTherm::esp8266_timer_isr);
|
375
371
|
timer1_enable(TIM_DIV16, TIM_EDGE, TIM_LOOP); // 5MHz (5 ticks/us - 1677721.4 us max)
|
@@ -377,14 +373,14 @@ void OpenTherm::start_read_timer_() {
|
|
377
373
|
}
|
378
374
|
|
379
375
|
// 2 kHz timer_
|
380
|
-
void OpenTherm::start_write_timer_() {
|
376
|
+
void IRAM_ATTR OpenTherm::start_write_timer_() {
|
381
377
|
InterruptLock const lock;
|
382
378
|
timer1_attachInterrupt(OpenTherm::esp8266_timer_isr);
|
383
379
|
timer1_enable(TIM_DIV16, TIM_EDGE, TIM_LOOP); // 5MHz (5 ticks/us - 1677721.4 us max)
|
384
380
|
timer1_write(2500); // 2kHz
|
385
381
|
}
|
386
382
|
|
387
|
-
void OpenTherm::stop_timer_() {
|
383
|
+
void IRAM_ATTR OpenTherm::stop_timer_() {
|
388
384
|
InterruptLock const lock;
|
389
385
|
timer1_disable();
|
390
386
|
timer1_detachInterrupt();
|
@@ -393,7 +389,7 @@ void OpenTherm::stop_timer_() {
|
|
393
389
|
#endif // END ESP8266
|
394
390
|
|
395
391
|
// https://stackoverflow.com/questions/21617970/how-to-check-if-value-has-even-parity-of-bits-or-odd
|
396
|
-
bool OpenTherm::check_parity_(uint32_t val) {
|
392
|
+
bool IRAM_ATTR OpenTherm::check_parity_(uint32_t val) {
|
397
393
|
val ^= val >> 16;
|
398
394
|
val ^= val >> 8;
|
399
395
|
val ^= val >> 4;
|
@@ -545,29 +541,17 @@ const char *OpenTherm::message_id_to_str(MessageId id) {
|
|
545
541
|
}
|
546
542
|
}
|
547
543
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
result << "LB: " << to_string(data.valueLB) << "; ";
|
556
|
-
result << "uint_16: " << to_string(data.u16()) << "; ";
|
557
|
-
result << "float: " << to_string(data.f88());
|
558
|
-
|
559
|
-
return result.str();
|
544
|
+
void OpenTherm::debug_data(OpenthermData &data) {
|
545
|
+
ESP_LOGD(TAG, "%s %s %s %s", format_bin(data.type).c_str(), format_bin(data.id).c_str(),
|
546
|
+
format_bin(data.valueHB).c_str(), format_bin(data.valueLB).c_str());
|
547
|
+
ESP_LOGD(TAG, "type: %s; id: %s; HB: %s; LB: %s; uint_16: %s; float: %s",
|
548
|
+
this->message_type_to_str((MessageType) data.type), to_string(data.id).c_str(),
|
549
|
+
to_string(data.valueHB).c_str(), to_string(data.valueLB).c_str(), to_string(data.u16()).c_str(),
|
550
|
+
to_string(data.f88()).c_str());
|
560
551
|
}
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
result << "data: ";
|
565
|
-
result << format_hex(error.data);
|
566
|
-
result << "; clock: " << to_string(clock_);
|
567
|
-
result << "; capture: " << bitset<32>(error.capture);
|
568
|
-
result << "; bit_pos: " << to_string(error.bit_pos);
|
569
|
-
|
570
|
-
return result.str();
|
552
|
+
void OpenTherm::debug_error(OpenThermError &error) const {
|
553
|
+
ESP_LOGD(TAG, "data: %s; clock: %s; capture: %s; bit_pos: %s", format_hex(error.data).c_str(),
|
554
|
+
to_string(clock_).c_str(), format_bin(error.capture).c_str(), to_string(error.bit_pos).c_str());
|
571
555
|
}
|
572
556
|
|
573
557
|
float OpenthermData::f88() { return ((float) this->s16()) / 256.0; }
|
@@ -8,10 +8,9 @@
|
|
8
8
|
#pragma once
|
9
9
|
|
10
10
|
#include <string>
|
11
|
-
#include <sstream>
|
12
|
-
#include <iomanip>
|
13
11
|
#include "esphome/core/hal.h"
|
14
12
|
#include "esphome/core/log.h"
|
13
|
+
#include "esphome/core/helpers.h"
|
15
14
|
|
16
15
|
#if defined(ESP32) || defined(USE_ESP_IDF)
|
17
16
|
#include "driver/timer.h"
|
@@ -318,8 +317,8 @@ class OpenTherm {
|
|
318
317
|
|
319
318
|
OperationMode get_mode() { return mode_; }
|
320
319
|
|
321
|
-
|
322
|
-
|
320
|
+
void debug_data(OpenthermData &data);
|
321
|
+
void debug_error(OpenThermError &error) const;
|
323
322
|
|
324
323
|
const char *protocol_error_to_to_str(ProtocolErrorType error_type);
|
325
324
|
const char *message_type_to_str(MessageType message_type);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#include "st7920.h"
|
2
|
-
#include "esphome/core/log.h"
|
3
|
-
#include "esphome/core/application.h"
|
4
2
|
#include "esphome/components/display/display_buffer.h"
|
3
|
+
#include "esphome/core/application.h"
|
4
|
+
#include "esphome/core/log.h"
|
5
5
|
|
6
6
|
namespace esphome {
|
7
7
|
namespace st7920 {
|
@@ -118,7 +118,6 @@ size_t ST7920::get_buffer_length_() {
|
|
118
118
|
|
119
119
|
void HOT ST7920::draw_absolute_pixel_internal(int x, int y, Color color) {
|
120
120
|
if (x >= this->get_width_internal() || x < 0 || y >= this->get_height_internal() || y < 0) {
|
121
|
-
ESP_LOGW(TAG, "Position out of area: %dx%d", x, y);
|
122
121
|
return;
|
123
122
|
}
|
124
123
|
int width = this->get_width_internal() / 8u;
|
esphome/const.py
CHANGED
esphome/core/helpers.cpp
CHANGED
@@ -397,6 +397,18 @@ std::string format_hex_pretty(const uint16_t *data, size_t length) {
|
|
397
397
|
}
|
398
398
|
std::string format_hex_pretty(const std::vector<uint16_t> &data) { return format_hex_pretty(data.data(), data.size()); }
|
399
399
|
|
400
|
+
std::string format_bin(const uint8_t *data, size_t length) {
|
401
|
+
std::string result;
|
402
|
+
result.resize(length * 8);
|
403
|
+
for (size_t byte_idx = 0; byte_idx < length; byte_idx++) {
|
404
|
+
for (size_t bit_idx = 0; bit_idx < 8; bit_idx++) {
|
405
|
+
result[byte_idx * 8 + bit_idx] = ((data[byte_idx] >> (7 - bit_idx)) & 1) + '0';
|
406
|
+
}
|
407
|
+
}
|
408
|
+
|
409
|
+
return result;
|
410
|
+
}
|
411
|
+
|
400
412
|
ParseOnOffState parse_on_off(const char *str, const char *on, const char *off) {
|
401
413
|
if (on == nullptr && strcasecmp(str, "on") == 0)
|
402
414
|
return PARSE_ON;
|
esphome/core/helpers.h
CHANGED
@@ -420,6 +420,14 @@ template<typename T, enable_if_t<std::is_unsigned<T>::value, int> = 0> std::stri
|
|
420
420
|
return format_hex_pretty(reinterpret_cast<uint8_t *>(&val), sizeof(T));
|
421
421
|
}
|
422
422
|
|
423
|
+
/// Format the byte array \p data of length \p len in binary.
|
424
|
+
std::string format_bin(const uint8_t *data, size_t length);
|
425
|
+
/// Format an unsigned integer in binary, starting with the most significant byte.
|
426
|
+
template<typename T, enable_if_t<std::is_unsigned<T>::value, int> = 0> std::string format_bin(T val) {
|
427
|
+
val = convert_big_endian(val);
|
428
|
+
return format_bin(reinterpret_cast<uint8_t *>(&val), sizeof(T));
|
429
|
+
}
|
430
|
+
|
423
431
|
/// Return values for parse_on_off().
|
424
432
|
enum ParseOnOffState {
|
425
433
|
PARSE_NONE = 0,
|
esphome/core/time.cpp
CHANGED
@@ -5,20 +5,18 @@
|
|
5
5
|
|
6
6
|
namespace esphome {
|
7
7
|
|
8
|
-
bool is_leap_year(uint32_t year) { return (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0); }
|
9
|
-
|
10
8
|
uint8_t days_in_month(uint8_t month, uint16_t year) {
|
11
9
|
static const uint8_t DAYS_IN_MONTH[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
12
|
-
|
13
|
-
if (month == 2 && is_leap_year(year))
|
10
|
+
if (month == 2 && (year % 4 == 0))
|
14
11
|
return 29;
|
15
|
-
return
|
12
|
+
return DAYS_IN_MONTH[month];
|
16
13
|
}
|
17
14
|
|
18
15
|
size_t ESPTime::strftime(char *buffer, size_t buffer_len, const char *format) {
|
19
16
|
struct tm c_tm = this->to_c_tm();
|
20
17
|
return ::strftime(buffer, buffer_len, format, &c_tm);
|
21
18
|
}
|
19
|
+
|
22
20
|
ESPTime ESPTime::from_c_tm(struct tm *c_tm, time_t c_time) {
|
23
21
|
ESPTime res{};
|
24
22
|
res.second = uint8_t(c_tm->tm_sec);
|
@@ -33,6 +31,7 @@ ESPTime ESPTime::from_c_tm(struct tm *c_tm, time_t c_time) {
|
|
33
31
|
res.timestamp = c_time;
|
34
32
|
return res;
|
35
33
|
}
|
34
|
+
|
36
35
|
struct tm ESPTime::to_c_tm() {
|
37
36
|
struct tm c_tm {};
|
38
37
|
c_tm.tm_sec = this->second;
|
@@ -46,6 +45,7 @@ struct tm ESPTime::to_c_tm() {
|
|
46
45
|
c_tm.tm_isdst = this->is_dst;
|
47
46
|
return c_tm;
|
48
47
|
}
|
48
|
+
|
49
49
|
std::string ESPTime::strftime(const std::string &format) {
|
50
50
|
std::string timestr;
|
51
51
|
timestr.resize(format.size() * 4);
|
@@ -142,6 +142,7 @@ void ESPTime::increment_second() {
|
|
142
142
|
this->year++;
|
143
143
|
}
|
144
144
|
}
|
145
|
+
|
145
146
|
void ESPTime::increment_day() {
|
146
147
|
this->timestamp += 86400;
|
147
148
|
|
@@ -159,23 +160,22 @@ void ESPTime::increment_day() {
|
|
159
160
|
this->year++;
|
160
161
|
}
|
161
162
|
}
|
163
|
+
|
162
164
|
void ESPTime::recalc_timestamp_utc(bool use_day_of_year) {
|
163
165
|
time_t res = 0;
|
164
|
-
|
165
166
|
if (!this->fields_in_range()) {
|
166
167
|
this->timestamp = -1;
|
167
168
|
return;
|
168
169
|
}
|
169
170
|
|
170
171
|
for (int i = 1970; i < this->year; i++)
|
171
|
-
res +=
|
172
|
+
res += (i % 4 == 0) ? 366 : 365;
|
172
173
|
|
173
174
|
if (use_day_of_year) {
|
174
175
|
res += this->day_of_year - 1;
|
175
176
|
} else {
|
176
177
|
for (int i = 1; i < this->month; i++)
|
177
178
|
res += days_in_month(i, this->year);
|
178
|
-
|
179
179
|
res += this->day_of_month - 1;
|
180
180
|
}
|
181
181
|
|
@@ -188,13 +188,17 @@ void ESPTime::recalc_timestamp_utc(bool use_day_of_year) {
|
|
188
188
|
this->timestamp = res;
|
189
189
|
}
|
190
190
|
|
191
|
-
void ESPTime::recalc_timestamp_local(
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
191
|
+
void ESPTime::recalc_timestamp_local() {
|
192
|
+
struct tm tm;
|
193
|
+
|
194
|
+
tm.tm_year = this->year - 1900;
|
195
|
+
tm.tm_mon = this->month - 1;
|
196
|
+
tm.tm_mday = this->day_of_month;
|
197
|
+
tm.tm_hour = this->hour;
|
198
|
+
tm.tm_min = this->minute;
|
199
|
+
tm.tm_sec = this->second;
|
200
|
+
|
201
|
+
this->timestamp = mktime(&tm);
|
198
202
|
}
|
199
203
|
|
200
204
|
int32_t ESPTime::timezone_offset() {
|
esphome/core/time.h
CHANGED
@@ -9,8 +9,6 @@ namespace esphome {
|
|
9
9
|
|
10
10
|
template<typename T> bool increment_time_value(T ¤t, uint16_t begin, uint16_t end);
|
11
11
|
|
12
|
-
bool is_leap_year(uint32_t year);
|
13
|
-
|
14
12
|
uint8_t days_in_month(uint8_t month, uint16_t year);
|
15
13
|
|
16
14
|
/// A more user-friendly version of struct tm from time.h
|
@@ -100,7 +98,7 @@ struct ESPTime {
|
|
100
98
|
void recalc_timestamp_utc(bool use_day_of_year = true);
|
101
99
|
|
102
100
|
/// Recalculate the timestamp field from the other fields of this ESPTime instance assuming local fields.
|
103
|
-
void recalc_timestamp_local(
|
101
|
+
void recalc_timestamp_local();
|
104
102
|
|
105
103
|
/// Convert this ESPTime instance back to a tm struct.
|
106
104
|
struct tm to_c_tm();
|
@@ -1,11 +1,11 @@
|
|
1
1
|
esphome/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
esphome/__main__.py,sha256=
|
2
|
+
esphome/__main__.py,sha256=3Z8bUb-vZ-UD2mr88yLxMD4PSboeqMPtGcxq58xTCUw,31133
|
3
3
|
esphome/automation.py,sha256=9xmW3AmWDd2oKB7zF-UITYIiSci8ys8qiylK-rcU7Rg,15689
|
4
4
|
esphome/codegen.py,sha256=GePHUM7xdXb_Pil59SHVsXg2F4VBPgkH-Fz2PDX8Z54,1873
|
5
5
|
esphome/config.py,sha256=nOiXPZv8wHtmytkNlGcewp0uuJd9G5rRjkqevYXtjzo,39618
|
6
6
|
esphome/config_helpers.py,sha256=MKf_wzO35nn41FvigXE0iYKDslPgL2ruf8R-EPtTT2I,3256
|
7
7
|
esphome/config_validation.py,sha256=RaF7hC9-VwtWA8C6vYaKVzyz4XqeoOOajr3EJDnaBaI,66311
|
8
|
-
esphome/const.py,sha256=
|
8
|
+
esphome/const.py,sha256=6lL20ACCfaDhvLkJ5Pd2nLGL_x7xh5s2pLlf631e5go,40259
|
9
9
|
esphome/coroutine.py,sha256=j_14z8dIIzIBeuNO30D4c1RJvMMt1xZFZ58Evd-EvJA,9344
|
10
10
|
esphome/cpp_generator.py,sha256=lXPXHYUsFIvBSAoZ93mXYlGcXYg5L18nTtYGHE4_rr8,31203
|
11
11
|
esphome/cpp_helpers.py,sha256=6C2vNbOIhZKi43xRVlk5hp9GfshfBn-rc5D_ZFUEYaE,4801
|
@@ -625,7 +625,7 @@ esphome/components/datetime/__init__.py,sha256=H0BIMfaUhbNlh6HglQf9w5noYQBBX_ZAv
|
|
625
625
|
esphome/components/datetime/date_entity.cpp,sha256=UieYXahuBlffSwaMz2n1ce_bZvrXi14dIjhmsxkRcrY,3690
|
626
626
|
esphome/components/datetime/date_entity.h,sha256=72vM34Ap7iUPoOtGMpudEQ_4489zY13UHhX3tzZopiY,2584
|
627
627
|
esphome/components/datetime/datetime_base.h,sha256=TnyfE4Av_Tz0O_H2MHc_TCIqlRJ1YYyleBJbeTIkrxg,1197
|
628
|
-
esphome/components/datetime/datetime_entity.cpp,sha256=
|
628
|
+
esphome/components/datetime/datetime_entity.cpp,sha256=LBwEFGBgnxaHcr87sBuW0Edt6ABvEE3SKtN5eGHGzXU,7742
|
629
629
|
esphome/components/datetime/datetime_entity.h,sha256=qN4CuohdTVq5g0VKrl8whUE1FjFFvIqlxTCOzzDNfws,3742
|
630
630
|
esphome/components/datetime/time_entity.cpp,sha256=k9ZEtOs4SIO3GCwc-SmKExwYiiyDDqra5Lxw6b7fW2M,4403
|
631
631
|
esphome/components/datetime/time_entity.h,sha256=rNN9V8UH4ervs03lsuvR233dD13LYceAy597vXbURcY,2915
|
@@ -767,7 +767,7 @@ esphome/components/es8311/audio_dac.py,sha256=aGpvvL4ftBaYMACjvL9RbGXi9iwEvuv97e
|
|
767
767
|
esphome/components/es8311/es8311.cpp,sha256=ueFDZsNbpY9w9us6MBa7nldqRFXc969wzGpjFIk7NyY,7029
|
768
768
|
esphome/components/es8311/es8311.h,sha256=XM3joN7HWuFu7Q1EGl7abfknRCyjpIs_KffM_oRM6eY,4680
|
769
769
|
esphome/components/es8311/es8311_const.h,sha256=bUBF4DJ28DcLPHznvh30Guewi65mSqQbqNPK0NiM8fI,12566
|
770
|
-
esphome/components/esp32/__init__.py,sha256=
|
770
|
+
esphome/components/esp32/__init__.py,sha256=qe85wyWtu0Ho0GXUkZ3_kOk3QpeHTmMRsukdWl3dC8s,27569
|
771
771
|
esphome/components/esp32/boards.py,sha256=hfVvFE8LwjrzJlQX9b0yZ53xv9XaF24wctAOE6SYDXY,46903
|
772
772
|
esphome/components/esp32/const.py,sha256=2yxLQg3p2-S3nRL6-zsF_dICrP_6waUfY5k8EFsoyVM,966
|
773
773
|
esphome/components/esp32/core.cpp,sha256=GfidaExP8kU7ODM1S_VI9c3tQtmG2TaKwLJ-zzeSqd4,2413
|
@@ -1459,7 +1459,7 @@ esphome/components/ltr_als_ps/ltr_definitions.h,sha256=yaIvnLQBIBnPuQBvHDD9Q_16U
|
|
1459
1459
|
esphome/components/ltr_als_ps/sensor.py,sha256=0HSnG34wHnaj9s-qRO7tYn5p0rSBlGmVXaVDSG520sg,9980
|
1460
1460
|
esphome/components/lvgl/__init__.py,sha256=6MAh-NMXgsoYxKaURc3KMrk0WQxwa14njGY1Ni24yZM,17415
|
1461
1461
|
esphome/components/lvgl/automation.py,sha256=xFlt6T-qL1WYEFMQ5loHqCjtm2wC_Ml4VPDa1GAxikg,10204
|
1462
|
-
esphome/components/lvgl/defines.py,sha256=
|
1462
|
+
esphome/components/lvgl/defines.py,sha256=lZd-GHPf3-BPm0CIAXqsgbQXplVzdRP588unlshk-I8,13422
|
1463
1463
|
esphome/components/lvgl/encoders.py,sha256=l296tfKdDzhRNPmU1chvAosNRrmBhITlB43OtNVBrRw,3189
|
1464
1464
|
esphome/components/lvgl/font.cpp,sha256=l9dPIw7LdOdtg_3QZErTLLevMc6A66Wfm-1s-6qcBmM,2712
|
1465
1465
|
esphome/components/lvgl/gradient.py,sha256=K60e7b52N8i7aQjkLIsij7OOXmVhBnJnxj4J3zPme4w,1989
|
@@ -1469,7 +1469,7 @@ esphome/components/lvgl/keypads.py,sha256=jtQjAG4vbTzI5Pr1IBfrEEPzV_0k4wkKfCMfse
|
|
1469
1469
|
esphome/components/lvgl/lv_validation.py,sha256=fss9CHNO4JsWf3VYk9bxPYz0Z2ulx8kzilF4XjNv0bk,13581
|
1470
1470
|
esphome/components/lvgl/lvcode.py,sha256=IkvCq59dR0RYJ-wKeO95zJEX-vNBWUkHEX5tJJfvv-Q,10018
|
1471
1471
|
esphome/components/lvgl/lvgl_esphome.cpp,sha256=6-qhT-eqKkJt1R_xfZUWaVN2Ko5h5zuxB7ewcb3r9_0,19102
|
1472
|
-
esphome/components/lvgl/lvgl_esphome.h,sha256=
|
1472
|
+
esphome/components/lvgl/lvgl_esphome.h,sha256=wl_4lghlBPbbCm8IMC-ujn9gBEMjKrq49XQoWx1gg8s,12055
|
1473
1473
|
esphome/components/lvgl/lvgl_hal.h,sha256=aZqWpSmKKAB-ZfNxxgxjgASTtLpAZjXJKuoTiPB0qqU,431
|
1474
1474
|
esphome/components/lvgl/lvgl_proxy.h,sha256=JPmVBVh5zD5nraJCN7PqXVmQQlc4CPJe_X9tA6IAtXQ,547
|
1475
1475
|
esphome/components/lvgl/schemas.py,sha256=t_tWtSSPwJWnPS8xNVDupo3HOLfkL8PihDatdJWIQOE,14271
|
@@ -1501,10 +1501,10 @@ esphome/components/lvgl/widgets/img.py,sha256=UE8X_RQhirIgJploL1VNHNuzdhlnhpZz41
|
|
1501
1501
|
esphome/components/lvgl/widgets/keyboard.py,sha256=1WBm_nfeFpWvzYts68FN_arqovOwMFs47TQAPCKour8,1543
|
1502
1502
|
esphome/components/lvgl/widgets/label.py,sha256=5xl1a6apdJgGKmkpL8m7RDASjaeKzjKTllhY26Gbfag,1139
|
1503
1503
|
esphome/components/lvgl/widgets/led.py,sha256=qoe_kvZpoRkwbxz25Z66KQ__KLC2tfhAukChp1jdlDc,888
|
1504
|
-
esphome/components/lvgl/widgets/line.py,sha256=
|
1504
|
+
esphome/components/lvgl/widgets/line.py,sha256=DmW8IL7PRC_aXqFgHigQ_w-7vZ2eNemP4d1z-TmnTsA,1594
|
1505
1505
|
esphome/components/lvgl/widgets/lv_bar.py,sha256=DbiUvhKdh9bsRMTU-rJYYA5KCjBUxDsW-7tvx8-CIRM,1670
|
1506
1506
|
esphome/components/lvgl/widgets/meter.py,sha256=pqSwtQWoyluLKmTSUR1gnsueUDi3lPm4lat8jV3Pi8Q,10985
|
1507
|
-
esphome/components/lvgl/widgets/msgbox.py,sha256=
|
1507
|
+
esphome/components/lvgl/widgets/msgbox.py,sha256=sTU5RreSucFoow1hMojuf2qAWL_IAlAl57I4FfDbAds,5329
|
1508
1508
|
esphome/components/lvgl/widgets/obj.py,sha256=1axn8eUzZFHlDrwmgZyeE5tBChHI9JymfNjBAiFmig0,818
|
1509
1509
|
esphome/components/lvgl/widgets/page.py,sha256=nV9LaXtHPdno2nfOvI6i2yPR5COsJdh7azqg8U5tElA,4957
|
1510
1510
|
esphome/components/lvgl/widgets/qrcode.py,sha256=ZA81FZFRAHu2PZ7MrL-QepQoEmEHL6v2ZjBv-m7PWws,1697
|
@@ -1952,17 +1952,17 @@ esphome/components/online_image/image_decoder.cpp,sha256=dStR78DZj-Hq8qwB1iQj1Qn
|
|
1952
1952
|
esphome/components/online_image/image_decoder.h,sha256=lMuliobeyV4svC-1i97WR8x1nyjPWZxqIdIxDXW1DcA,3601
|
1953
1953
|
esphome/components/online_image/online_image.cpp,sha256=CXoVZaVPI0cH7vIeA_LU5GVHfldM41tcjuQOQDdpRrA,8246
|
1954
1954
|
esphome/components/online_image/online_image.h,sha256=R4zz_LDYSDvPv8nyli0tv4kdKzPjsz2UfDO57cf8oPI,6146
|
1955
|
-
esphome/components/online_image/png_image.cpp,sha256=
|
1955
|
+
esphome/components/online_image/png_image.cpp,sha256=1UbsB3NSmTBCSQW1isA6GvY-o-ZSJovDoQgmqeiXwS4,2313
|
1956
1956
|
esphome/components/online_image/png_image.h,sha256=7xHJ3y0oPr9Vn9lswq1HDf1ymZhNGUXFRWSph1evN4w,752
|
1957
1957
|
esphome/components/opentherm/__init__.py,sha256=Y-yowfGAC-GTqThaO6w-LlEcUap8xKGoOuNSSadGJWc,2942
|
1958
1958
|
esphome/components/opentherm/const.py,sha256=Ycg4vJVqUBwSrd0xl9rsl7eDHhNsYzMiuC9b2YO9Yn0,224
|
1959
1959
|
esphome/components/opentherm/generate.py,sha256=6qFmOHNbqhWjefP5gS3osZZ2Ms1QmMqCpicqqONMuHk,5185
|
1960
|
-
esphome/components/opentherm/hub.cpp,sha256=
|
1960
|
+
esphome/components/opentherm/hub.cpp,sha256=pvPTOzE4ha3JcpJwSerDupaXd2IAbqOKsfvetnheGB4,16573
|
1961
1961
|
esphome/components/opentherm/hub.h,sha256=AO0ibAIvh9f1AzFkPfgLqng7lH6QeQDLAyg2LQAkDbc,5642
|
1962
1962
|
esphome/components/opentherm/input.h,sha256=Ln8Sx1mMonhk64RrYTzAeLEJxEgIYtBTRpHgK7pNm1U,482
|
1963
1963
|
esphome/components/opentherm/input.py,sha256=VhzCj5IX2UBpLmmCXxNIRmB6tXdA10tjHfqInydTZ_o,1758
|
1964
|
-
esphome/components/opentherm/opentherm.cpp,sha256=
|
1965
|
-
esphome/components/opentherm/opentherm.h,sha256=
|
1964
|
+
esphome/components/opentherm/opentherm.cpp,sha256=ha6EGKelFMrz4RGHwn9n1b66oi7Kh9eNdFf5wBBf1zk,18425
|
1965
|
+
esphome/components/opentherm/opentherm.h,sha256=NNYwkSuV_FQLmtQC8zBt1a-d42JEqR1uhtAvwu-VwhI,11015
|
1966
1966
|
esphome/components/opentherm/opentherm_macros.h,sha256=krT4qqOKnPeuELRadTjxiKrOaIpXFBG0e2ifNukSbP4,5914
|
1967
1967
|
esphome/components/opentherm/schema.py,sha256=Wb_kvZPcLNSeT2FGU3ntA8skdOLJV-NRSZnS_4qXYNY,26580
|
1968
1968
|
esphome/components/opentherm/validate.py,sha256=UWXgoEzGVTt0dHIOiwSWFsM92ZeEtRLWAsnAwIjLzhk,908
|
@@ -2688,7 +2688,7 @@ esphome/components/st7789v/st7789v.cpp,sha256=fr_ZnpTHbj_Dje78kKCQ4e3WZax3hUB1JV
|
|
2688
2688
|
esphome/components/st7789v/st7789v.h,sha256=cYoLFeohRe-PoISfffZyXS7IcZ7JhAzjlx4QHEQbVXo,9059
|
2689
2689
|
esphome/components/st7920/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2690
2690
|
esphome/components/st7920/display.py,sha256=3rFVK-Oyx-XJ4G4t4LP9qKIFZwE6Skpl6Skbg_-3qj0,1222
|
2691
|
-
esphome/components/st7920/st7920.cpp,sha256=
|
2691
|
+
esphome/components/st7920/st7920.cpp,sha256=cgY6hA6NePx-5MrtUmkO36kp2ICKA9XpUArfj8N34zI,4287
|
2692
2692
|
esphome/components/st7920/st7920.h,sha256=kB1JFbO1zhBazPF-pGKfD3FeKeiwl_OaOw1oEM6ffyw,1630
|
2693
2693
|
esphome/components/statsd/__init__.py,sha256=l8GtFsbqmF4uWjc8bQ6JugaP4XomCB1SqCXQmdG-Zww,1936
|
2694
2694
|
esphome/components/statsd/statsd.cpp,sha256=L4BgLvEvU_esYz6M1lLUr012D2E-QXsNV9wRJLepZZU,4016
|
@@ -3318,8 +3318,8 @@ esphome/core/entity_base.h,sha256=y9pPjHUxtiadpSzUroBp8-YomztwZnzPVS6GF33YI3U,28
|
|
3318
3318
|
esphome/core/entity_helpers.py,sha256=s5lYCG5hu_1SROtSWgzI0T6802l5-I8udGy1_6HNSdc,2337
|
3319
3319
|
esphome/core/gpio.h,sha256=hy9jEWuCG6Q_AU74viToIab-p5ZnGik4pM4E3AieK8k,2407
|
3320
3320
|
esphome/core/hal.h,sha256=e3qFkax3jfncEusf3kwXCts0Ai7D4XspJgh-VqVDcK4,844
|
3321
|
-
esphome/core/helpers.cpp,sha256=
|
3322
|
-
esphome/core/helpers.h,sha256
|
3321
|
+
esphome/core/helpers.cpp,sha256=2bE18LUT1oXnYvVqYcM21KmboK03Rulg1IiOjVOfhXE,24659
|
3322
|
+
esphome/core/helpers.h,sha256=Mfjc0D5Qkx7D0H2YoOZKTb1JSjJdXYqiD102NcuQCJY,28009
|
3323
3323
|
esphome/core/log.cpp,sha256=MDCx87ytW6Fz6basxYUpagkubFzUKO1ysvU5RXbXoII,1581
|
3324
3324
|
esphome/core/log.h,sha256=sMwmrs64vOG0G9jIibKJWv_C-COl175T8JymmBVRHWI,6369
|
3325
3325
|
esphome/core/macros.h,sha256=YRip3XYzXw2pg3AFpBFA0Js-Y5GMtPkuCp2km2g5uhc,196
|
@@ -3331,8 +3331,8 @@ esphome/core/scheduler.cpp,sha256=fH2E-e0jQ0nd90lojK5voee1lBY7rYzLWWjWZj6rbHA,12
|
|
3331
3331
|
esphome/core/scheduler.h,sha256=OZaBsLlo2R2nJvYcq7LyUGPXLzLAJdMEmtBewWF_9Ps,2455
|
3332
3332
|
esphome/core/string_ref.cpp,sha256=of1TYMY6t3t4HjjPLSiItuPSa62AMG0lK_CU2HS1RvM,242
|
3333
3333
|
esphome/core/string_ref.h,sha256=uPLS1v13VMOltkXO3bL3owdX9P3s9CMnhVtkaphTdDQ,5208
|
3334
|
-
esphome/core/time.cpp,sha256=
|
3335
|
-
esphome/core/time.h,sha256=
|
3334
|
+
esphome/core/time.cpp,sha256=dlJ1rXxBESGehrcxlHLA_il9hWdPBD-sTga_PS1eBOQ,7582
|
3335
|
+
esphome/core/time.h,sha256=aQd7M_tO2X5ErvjTxpB6LmvdwJQjGlEfaqYe8rMkYWY,4347
|
3336
3336
|
esphome/core/util.cpp,sha256=gbTBqOdLxWIxv9h8HFrLPZ96HZI6PBY-WBB_gdiqEts,774
|
3337
3337
|
esphome/core/util.h,sha256=UeGZvUEvEaOMxLqJOA7GE178z5U37681RtFk6Ho1KCw,407
|
3338
3338
|
esphome/core/version.h,sha256=HkOTdiyOMRgIuYAAXpsN_8_IKye3rMK0LbtpcjZVXqY,431
|
@@ -3355,9 +3355,9 @@ esphome/dashboard/util/itertools.py,sha256=8eLrWEWmICLtXNxkKdYPQV0c_N4GEz8m9Npnb
|
|
3355
3355
|
esphome/dashboard/util/password.py,sha256=cQz3b9B-ijTe7zS6BeCW0hc3pWv6JjC78jmnycYYAh8,321
|
3356
3356
|
esphome/dashboard/util/subprocess.py,sha256=T8EW6dbU4LPd2DG1dRrdh8li71tt6J1isn411poMhkk,1022
|
3357
3357
|
esphome/dashboard/util/text.py,sha256=ENDnfN4O0NdA3CKVJjQYabFbwbrsIhVKrAMQe53qYu4,534
|
3358
|
-
esphome-2024.11.
|
3359
|
-
esphome-2024.11.
|
3360
|
-
esphome-2024.11.
|
3361
|
-
esphome-2024.11.
|
3362
|
-
esphome-2024.11.
|
3363
|
-
esphome-2024.11.
|
3358
|
+
esphome-2024.11.3.dist-info/LICENSE,sha256=HzEjkBInJe44L4WvAOPfhPJJDNj6YbnqFyvGWRzArGM,36664
|
3359
|
+
esphome-2024.11.3.dist-info/METADATA,sha256=tbyLM_ZenDrRkub95xIGYX_JfL1vMTCv1Oy-kH1g__0,3453
|
3360
|
+
esphome-2024.11.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
3361
|
+
esphome-2024.11.3.dist-info/entry_points.txt,sha256=mIxVNuWtbYzeEcaWCl-AQ-97aBOWbnYBAK8nbF6P4M0,50
|
3362
|
+
esphome-2024.11.3.dist-info/top_level.txt,sha256=0GSXEW3cnITpgG3qnsSMz0qoqJHAFyfw7Y8MVtEf1Yk,8
|
3363
|
+
esphome-2024.11.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|