mirror of
https://github.com/esphome/esphome.git
synced 2025-11-08 11:01:50 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d014a95674 | ||
|
|
b6dce21154 | ||
|
|
865157afba | ||
|
|
7edf458898 | ||
|
|
d9873e24a7 | ||
|
|
645bd490ba | ||
|
|
27f6d00e7a | ||
|
|
f9d668eeca | ||
|
|
6b930595e2 |
@@ -274,8 +274,10 @@ SUPPORTED_PLATFORMIO_ESP_IDF_5X = [
|
|||||||
# pioarduino versions that don't require a release number
|
# pioarduino versions that don't require a release number
|
||||||
# List based on https://github.com/pioarduino/esp-idf/releases
|
# List based on https://github.com/pioarduino/esp-idf/releases
|
||||||
SUPPORTED_PIOARDUINO_ESP_IDF_5X = [
|
SUPPORTED_PIOARDUINO_ESP_IDF_5X = [
|
||||||
|
cv.Version(5, 5, 0),
|
||||||
cv.Version(5, 4, 1),
|
cv.Version(5, 4, 1),
|
||||||
cv.Version(5, 4, 0),
|
cv.Version(5, 4, 0),
|
||||||
|
cv.Version(5, 3, 3),
|
||||||
cv.Version(5, 3, 2),
|
cv.Version(5, 3, 2),
|
||||||
cv.Version(5, 3, 1),
|
cv.Version(5, 3, 1),
|
||||||
cv.Version(5, 3, 0),
|
cv.Version(5, 3, 0),
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ float LD2420Component::get_setup_priority() const { return setup_priority::BUS;
|
|||||||
void LD2420Component::dump_config() {
|
void LD2420Component::dump_config() {
|
||||||
ESP_LOGCONFIG(TAG, "LD2420:");
|
ESP_LOGCONFIG(TAG, "LD2420:");
|
||||||
ESP_LOGCONFIG(TAG, " Firmware Version : %7s", this->ld2420_firmware_ver_);
|
ESP_LOGCONFIG(TAG, " Firmware Version : %7s", this->ld2420_firmware_ver_);
|
||||||
ESP_LOGCONFIG(TAG, "LD2420 Number:");
|
|
||||||
#ifdef USE_NUMBER
|
#ifdef USE_NUMBER
|
||||||
|
ESP_LOGCONFIG(TAG, "LD2420 Number:");
|
||||||
LOG_NUMBER(TAG, " Gate Timeout:", this->gate_timeout_number_);
|
LOG_NUMBER(TAG, " Gate Timeout:", this->gate_timeout_number_);
|
||||||
LOG_NUMBER(TAG, " Gate Max Distance:", this->max_gate_distance_number_);
|
LOG_NUMBER(TAG, " Gate Max Distance:", this->max_gate_distance_number_);
|
||||||
LOG_NUMBER(TAG, " Gate Min Distance:", this->min_gate_distance_number_);
|
LOG_NUMBER(TAG, " Gate Min Distance:", this->min_gate_distance_number_);
|
||||||
@@ -84,8 +84,10 @@ void LD2420Component::dump_config() {
|
|||||||
LOG_BUTTON(TAG, " Factory Reset:", this->factory_reset_button_);
|
LOG_BUTTON(TAG, " Factory Reset:", this->factory_reset_button_);
|
||||||
LOG_BUTTON(TAG, " Restart Module:", this->restart_module_button_);
|
LOG_BUTTON(TAG, " Restart Module:", this->restart_module_button_);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef USE_SELECT
|
||||||
ESP_LOGCONFIG(TAG, "LD2420 Select:");
|
ESP_LOGCONFIG(TAG, "LD2420 Select:");
|
||||||
LOG_SELECT(TAG, " Operating Mode", this->operating_selector_);
|
LOG_SELECT(TAG, " Operating Mode", this->operating_selector_);
|
||||||
|
#endif
|
||||||
if (this->get_firmware_int_(ld2420_firmware_ver_) < CALIBRATE_VERSION_MIN) {
|
if (this->get_firmware_int_(ld2420_firmware_ver_) < CALIBRATE_VERSION_MIN) {
|
||||||
ESP_LOGW(TAG, "LD2420 Firmware Version %s and older are only supported in Simple Mode", ld2420_firmware_ver_);
|
ESP_LOGW(TAG, "LD2420 Firmware Version %s and older are only supported in Simple Mode", ld2420_firmware_ver_);
|
||||||
}
|
}
|
||||||
@@ -137,12 +139,18 @@ void LD2420Component::setup() {
|
|||||||
memcpy(&this->new_config, &this->current_config, sizeof(this->current_config));
|
memcpy(&this->new_config, &this->current_config, sizeof(this->current_config));
|
||||||
if (get_firmware_int_(ld2420_firmware_ver_) < CALIBRATE_VERSION_MIN) {
|
if (get_firmware_int_(ld2420_firmware_ver_) < CALIBRATE_VERSION_MIN) {
|
||||||
this->set_operating_mode(OP_SIMPLE_MODE_STRING);
|
this->set_operating_mode(OP_SIMPLE_MODE_STRING);
|
||||||
this->operating_selector_->publish_state(OP_SIMPLE_MODE_STRING);
|
#ifdef USE_SELECT
|
||||||
|
if (this->operating_selector_ != nullptr)
|
||||||
|
this->operating_selector_->publish_state(OP_SIMPLE_MODE_STRING);
|
||||||
|
#endif
|
||||||
this->set_mode_(CMD_SYSTEM_MODE_SIMPLE);
|
this->set_mode_(CMD_SYSTEM_MODE_SIMPLE);
|
||||||
ESP_LOGW(TAG, "LD2420 Frimware Version %s and older are only supported in Simple Mode", ld2420_firmware_ver_);
|
ESP_LOGW(TAG, "LD2420 Frimware Version %s and older are only supported in Simple Mode", ld2420_firmware_ver_);
|
||||||
} else {
|
} else {
|
||||||
this->set_mode_(CMD_SYSTEM_MODE_ENERGY);
|
this->set_mode_(CMD_SYSTEM_MODE_ENERGY);
|
||||||
this->operating_selector_->publish_state(OP_NORMAL_MODE_STRING);
|
#ifdef USE_SELECT
|
||||||
|
if (this->operating_selector_ != nullptr)
|
||||||
|
this->operating_selector_->publish_state(OP_NORMAL_MODE_STRING);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef USE_NUMBER
|
#ifdef USE_NUMBER
|
||||||
this->init_gate_config_numbers();
|
this->init_gate_config_numbers();
|
||||||
@@ -293,7 +301,10 @@ void LD2420Component::set_operating_mode(const std::string &state) {
|
|||||||
if (get_firmware_int_(ld2420_firmware_ver_) >= CALIBRATE_VERSION_MIN) {
|
if (get_firmware_int_(ld2420_firmware_ver_) >= CALIBRATE_VERSION_MIN) {
|
||||||
this->current_operating_mode = OP_MODE_TO_UINT.at(state);
|
this->current_operating_mode = OP_MODE_TO_UINT.at(state);
|
||||||
// Entering Auto Calibrate we need to clear the privoiuos data collection
|
// Entering Auto Calibrate we need to clear the privoiuos data collection
|
||||||
this->operating_selector_->publish_state(state);
|
#ifdef USE_SELECT
|
||||||
|
if (this->operating_selector_ != nullptr)
|
||||||
|
this->operating_selector_->publish_state(state);
|
||||||
|
#endif
|
||||||
if (current_operating_mode == OP_CALIBRATE_MODE) {
|
if (current_operating_mode == OP_CALIBRATE_MODE) {
|
||||||
this->set_calibration_(true);
|
this->set_calibration_(true);
|
||||||
for (uint8_t gate = 0; gate < LD2420_TOTAL_GATES; gate++) {
|
for (uint8_t gate = 0; gate < LD2420_TOTAL_GATES; gate++) {
|
||||||
@@ -312,7 +323,10 @@ void LD2420Component::set_operating_mode(const std::string &state) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this->current_operating_mode = OP_SIMPLE_MODE;
|
this->current_operating_mode = OP_SIMPLE_MODE;
|
||||||
this->operating_selector_->publish_state(OP_SIMPLE_MODE_STRING);
|
#ifdef USE_SELECT
|
||||||
|
if (this->operating_selector_ != nullptr)
|
||||||
|
this->operating_selector_->publish_state(OP_SIMPLE_MODE_STRING);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,10 +63,12 @@ inline void lv_disp_set_bg_image(lv_disp_t *disp, esphome::image::Image *image)
|
|||||||
inline void lv_obj_set_style_bg_img_src(lv_obj_t *obj, esphome::image::Image *image, lv_style_selector_t selector) {
|
inline void lv_obj_set_style_bg_img_src(lv_obj_t *obj, esphome::image::Image *image, lv_style_selector_t selector) {
|
||||||
lv_obj_set_style_bg_img_src(obj, image->get_lv_img_dsc(), selector);
|
lv_obj_set_style_bg_img_src(obj, image->get_lv_img_dsc(), selector);
|
||||||
}
|
}
|
||||||
|
#ifdef USE_LVGL_CANVAS
|
||||||
inline void lv_canvas_draw_img(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, image::Image *image,
|
inline void lv_canvas_draw_img(lv_obj_t *canvas, lv_coord_t x, lv_coord_t y, image::Image *image,
|
||||||
lv_draw_img_dsc_t *dsc) {
|
lv_draw_img_dsc_t *dsc) {
|
||||||
lv_canvas_draw_img(canvas, x, y, image->get_lv_img_dsc(), dsc);
|
lv_canvas_draw_img(canvas, x, y, image->get_lv_img_dsc(), dsc);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_LVGL_METER
|
#ifdef USE_LVGL_METER
|
||||||
inline lv_meter_indicator_t *lv_meter_add_needle_img(lv_obj_t *obj, lv_meter_scale_t *scale, esphome::image::Image *src,
|
inline lv_meter_indicator_t *lv_meter_add_needle_img(lv_obj_t *obj, lv_meter_scale_t *scale, esphome::image::Image *src,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"""Constants used by esphome."""
|
"""Constants used by esphome."""
|
||||||
|
|
||||||
__version__ = "2025.4.0b1"
|
__version__ = "2025.5.0-dev"
|
||||||
|
|
||||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
pylint==3.3.6
|
pylint==3.3.6
|
||||||
flake8==7.2.0 # also change in .pre-commit-config.yaml when updating
|
flake8==7.2.0 # also change in .pre-commit-config.yaml when updating
|
||||||
ruff==0.11.2 # also change in .pre-commit-config.yaml when updating
|
ruff==0.11.4 # also change in .pre-commit-config.yaml when updating
|
||||||
pyupgrade==3.19.1 # also change in .pre-commit-config.yaml when updating
|
pyupgrade==3.19.1 # also change in .pre-commit-config.yaml when updating
|
||||||
pre-commit
|
pre-commit
|
||||||
|
|
||||||
# Unit tests
|
# Unit tests
|
||||||
pytest==8.3.5
|
pytest==8.3.5
|
||||||
pytest-cov==6.0.0
|
pytest-cov==6.1.1
|
||||||
pytest-mock==3.14.0
|
pytest-mock==3.14.0
|
||||||
pytest-asyncio==0.26.0
|
pytest-asyncio==0.26.0
|
||||||
asyncmock==0.4.2
|
asyncmock==0.4.2
|
||||||
|
|||||||
Reference in New Issue
Block a user