esphome 2024.11.3__py3-none-any.whl → 2024.12.0b1__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.
Files changed (178) hide show
  1. esphome/components/adc/adc_sensor.h +7 -8
  2. esphome/components/adc/adc_sensor_common.cpp +24 -0
  3. esphome/components/adc/{adc_sensor.cpp → adc_sensor_esp32.cpp} +10 -179
  4. esphome/components/adc/adc_sensor_esp8266.cpp +58 -0
  5. esphome/components/adc/adc_sensor_rp2040.cpp +93 -0
  6. esphome/components/alarm_control_panel/alarm_control_panel_call.cpp +3 -4
  7. esphome/components/animation/__init__.py +1 -2
  8. esphome/components/apds9306/apds9306.cpp +2 -1
  9. esphome/components/audio/audio.h +1 -1
  10. esphome/components/bk72xx/__init__.py +1 -1
  11. esphome/components/cse7766/cse7766.cpp +1 -1
  12. esphome/components/deep_sleep/deep_sleep_esp32.cpp +2 -2
  13. esphome/components/dht/dht.cpp +2 -1
  14. esphome/components/display/display.cpp +10 -6
  15. esphome/components/display/display.h +14 -0
  16. esphome/components/display_menu_base/__init__.py +0 -2
  17. esphome/components/display_menu_base/display_menu_base.cpp +1 -1
  18. esphome/components/dsmr/dsmr.cpp +1 -1
  19. esphome/components/esp32/__init__.py +94 -12
  20. esphome/components/esp32/boards.py +222 -14
  21. esphome/components/esp32_ble/__init__.py +22 -2
  22. esphome/components/esp32_ble/ble.cpp +13 -5
  23. esphome/components/esp32_ble/ble.h +2 -0
  24. esphome/components/esp32_ble/ble_advertising.cpp +1 -1
  25. esphome/components/esp32_ble/ble_uuid.cpp +9 -10
  26. esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +4 -1
  27. esphome/components/esp32_camera_web_server/camera_web_server.h +1 -1
  28. esphome/components/esp32_rmt_led_strip/light.py +3 -3
  29. esphome/components/esp8266/__init__.py +5 -7
  30. esphome/components/ezo/ezo.cpp +14 -26
  31. esphome/components/font/__init__.py +5 -23
  32. esphome/components/font/font.cpp +5 -3
  33. esphome/components/graphical_display_menu/__init__.py +2 -0
  34. esphome/components/haier/hon_climate.cpp +79 -80
  35. esphome/components/hbridge/switch/__init__.py +44 -0
  36. esphome/components/hbridge/switch/hbridge_switch.cpp +95 -0
  37. esphome/components/hbridge/switch/hbridge_switch.h +50 -0
  38. esphome/components/hitachi_ac344/hitachi_ac344.cpp +4 -2
  39. esphome/components/hitachi_ac424/hitachi_ac424.cpp +4 -2
  40. esphome/components/homeassistant/number/homeassistant_number.cpp +3 -0
  41. esphome/components/hx711/hx711.cpp +1 -1
  42. esphome/components/hx711/hx711.h +1 -1
  43. esphome/components/i2c/i2c_bus_esp_idf.cpp +2 -2
  44. esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +61 -59
  45. esphome/components/i2s_audio/speaker/i2s_audio_speaker.h +8 -17
  46. esphome/components/ili9xxx/display.py +1 -2
  47. esphome/components/ili9xxx/ili9xxx_display.cpp +3 -2
  48. esphome/components/image/__init__.py +1 -2
  49. esphome/components/logger/logger.cpp +1 -1
  50. esphome/components/ltr501/ltr501.cpp +1 -1
  51. esphome/components/lvgl/defines.py +8 -1
  52. esphome/components/lvgl/lv_validation.py +8 -3
  53. esphome/components/lvgl/lvgl_esphome.cpp +1 -1
  54. esphome/components/lvgl/lvgl_esphome.h +16 -0
  55. esphome/components/lvgl/widgets/animimg.py +12 -17
  56. esphome/components/lvgl/widgets/img.py +1 -3
  57. esphome/components/matrix_keypad/__init__.py +15 -3
  58. esphome/components/matrix_keypad/matrix_keypad.cpp +4 -0
  59. esphome/components/matrix_keypad/matrix_keypad.h +5 -0
  60. esphome/components/max31865/max31865.cpp +4 -2
  61. esphome/components/modbus_controller/modbus_controller.cpp +24 -24
  62. esphome/components/modbus_controller/modbus_controller.h +22 -22
  63. esphome/components/modbus_controller/number/modbus_number.cpp +8 -8
  64. esphome/components/modbus_controller/number/modbus_number.h +4 -4
  65. esphome/components/modbus_controller/output/modbus_output.cpp +7 -6
  66. esphome/components/modbus_controller/output/modbus_output.h +5 -5
  67. esphome/components/modbus_controller/select/modbus_select.cpp +4 -3
  68. esphome/components/modbus_controller/select/modbus_select.h +4 -4
  69. esphome/components/modbus_controller/switch/modbus_switch.cpp +5 -5
  70. esphome/components/modbus_controller/switch/modbus_switch.h +2 -2
  71. esphome/components/mqtt/__init__.py +4 -0
  72. esphome/components/mqtt/mqtt_alarm_control_panel.cpp +2 -5
  73. esphome/components/mqtt/mqtt_backend_esp32.cpp +3 -3
  74. esphome/components/mqtt/mqtt_client.cpp +4 -0
  75. esphome/components/mqtt/mqtt_client.h +6 -0
  76. esphome/components/mqtt/mqtt_climate.cpp +13 -3
  77. esphome/components/mqtt/mqtt_sensor.cpp +2 -0
  78. esphome/components/network/ip_address.h +1 -1
  79. esphome/components/nextion/__init__.py +2 -0
  80. esphome/components/nextion/automation.h +76 -0
  81. esphome/components/nextion/base_component.py +1 -0
  82. esphome/components/nextion/binary_sensor/__init__.py +43 -2
  83. esphome/components/nextion/display.py +15 -0
  84. esphome/components/nextion/nextion.cpp +8 -5
  85. esphome/components/nextion/nextion.h +7 -0
  86. esphome/components/nextion/nextion_upload_idf.cpp +2 -2
  87. esphome/components/nextion/sensor/__init__.py +38 -5
  88. esphome/components/nextion/switch/__init__.py +38 -2
  89. esphome/components/nextion/text_sensor/__init__.py +37 -2
  90. esphome/components/nfc/ndef_record.cpp +3 -3
  91. esphome/components/online_image/__init__.py +1 -0
  92. esphome/components/opentherm/opentherm.cpp +3 -3
  93. esphome/components/opentherm/opentherm.h +1 -1
  94. esphome/components/ota/automation.h +1 -1
  95. esphome/components/output/float_output.cpp +1 -1
  96. esphome/components/pca6416a/pca6416a.cpp +5 -3
  97. esphome/components/pca9554/pca9554.cpp +4 -4
  98. esphome/components/pipsolar/pipsolar.cpp +2 -2
  99. esphome/components/pipsolar/switch/pipsolar_switch.cpp +2 -2
  100. esphome/components/pn532/pn532_mifare_ultralight.cpp +2 -2
  101. esphome/components/pn7150/pn7150_mifare_ultralight.cpp +2 -2
  102. esphome/components/pn7160/pn7160_mifare_ultralight.cpp +2 -2
  103. esphome/components/qmc5883l/qmc5883l.cpp +45 -19
  104. esphome/components/qmc5883l/qmc5883l.h +1 -1
  105. esphome/components/qspi_dbi/qspi_dbi.cpp +2 -1
  106. esphome/components/remote_base/raw_protocol.cpp +1 -1
  107. esphome/components/rotary_encoder/rotary_encoder.cpp +3 -1
  108. esphome/components/rp2040/__init__.py +1 -1
  109. esphome/components/rtl87xx/__init__.py +1 -1
  110. esphome/components/safe_mode/automation.h +1 -1
  111. esphome/components/seeed_mr60bha2/__init__.py +41 -0
  112. esphome/components/seeed_mr60bha2/seeed_mr60bha2.cpp +173 -0
  113. esphome/components/seeed_mr60bha2/seeed_mr60bha2.h +61 -0
  114. esphome/components/seeed_mr60bha2/sensor.py +57 -0
  115. esphome/components/seeed_mr60fda2/__init__.py +41 -0
  116. esphome/components/seeed_mr60fda2/binary_sensor.py +33 -0
  117. esphome/components/seeed_mr60fda2/button/__init__.py +45 -0
  118. esphome/components/seeed_mr60fda2/button/get_radar_parameters_button.cpp +9 -0
  119. esphome/components/seeed_mr60fda2/button/get_radar_parameters_button.h +18 -0
  120. esphome/components/seeed_mr60fda2/button/reset_radar_button.cpp +9 -0
  121. esphome/components/seeed_mr60fda2/button/reset_radar_button.h +18 -0
  122. esphome/components/seeed_mr60fda2/seeed_mr60fda2.cpp +368 -0
  123. esphome/components/seeed_mr60fda2/seeed_mr60fda2.h +101 -0
  124. esphome/components/seeed_mr60fda2/select/__init__.py +59 -0
  125. esphome/components/seeed_mr60fda2/select/height_threshold_select.cpp +15 -0
  126. esphome/components/seeed_mr60fda2/select/height_threshold_select.h +18 -0
  127. esphome/components/seeed_mr60fda2/select/install_height_select.cpp +15 -0
  128. esphome/components/seeed_mr60fda2/select/install_height_select.h +18 -0
  129. esphome/components/seeed_mr60fda2/select/sensitivity_select.cpp +15 -0
  130. esphome/components/seeed_mr60fda2/select/sensitivity_select.h +18 -0
  131. esphome/components/sen5x/sensor.py +5 -6
  132. esphome/components/shelly_dimmer/shelly_dimmer.cpp +1 -1
  133. esphome/components/sim800l/sim800l.cpp +1 -1
  134. esphome/components/sntp/sntp_component.cpp +14 -20
  135. esphome/components/sntp/sntp_component.h +6 -9
  136. esphome/components/sntp/time.py +4 -7
  137. esphome/components/sprinkler/sprinkler.cpp +2 -2
  138. esphome/components/st7735/st7735.cpp +1 -1
  139. esphome/components/st7789v/st7789v.cpp +1 -1
  140. esphome/components/stepper/stepper.h +0 -1
  141. esphome/components/sun_gtil2/sun_gtil2.cpp +1 -1
  142. esphome/components/switch/binary_sensor/__init__.py +31 -0
  143. esphome/components/switch/binary_sensor/switch_binary_sensor.cpp +17 -0
  144. esphome/components/switch/binary_sensor/switch_binary_sensor.h +22 -0
  145. esphome/components/sx1509/sx1509_gpio_pin.cpp +2 -1
  146. esphome/components/sx1509/sx1509_gpio_pin.h +5 -5
  147. esphome/components/uart/uart.h +1 -1
  148. esphome/components/udp/udp_component.cpp +32 -16
  149. esphome/components/ufire_ec/sensor.py +4 -4
  150. esphome/components/uln2003/uln2003.cpp +4 -1
  151. esphome/components/waveshare_epaper/display.py +8 -0
  152. esphome/components/waveshare_epaper/waveshare_epaper.cpp +191 -0
  153. esphome/components/waveshare_epaper/waveshare_epaper.h +56 -0
  154. esphome/components/wiegand/__init__.py +3 -4
  155. esphome/components/wifi/__init__.py +42 -0
  156. esphome/components/wifi/wifi_component.cpp +2 -2
  157. esphome/components/wifi/wifi_component.h +82 -1
  158. esphome/components/wifi/wifi_component_esp32_arduino.cpp +1 -1
  159. esphome/components/wifi/wifi_component_esp8266.cpp +1 -1
  160. esphome/components/wifi/wifi_component_esp_idf.cpp +1 -1
  161. esphome/components/wifi/wifi_component_libretiny.cpp +1 -1
  162. esphome/components/wifi/wifi_component_pico_w.cpp +1 -1
  163. esphome/components/wireguard/wireguard.cpp +2 -2
  164. esphome/components/xiaomi_ble/xiaomi_ble.cpp +1 -1
  165. esphome/config_validation.py +15 -11
  166. esphome/const.py +7 -1
  167. esphome/core/component.cpp +1 -1
  168. esphome/core/config.py +1 -2
  169. esphome/core/defines.h +3 -1
  170. esphome/core/helpers.cpp +6 -1
  171. esphome/core/helpers.h +2 -1
  172. esphome/core/optional.h +2 -2
  173. {esphome-2024.11.3.dist-info → esphome-2024.12.0b1.dist-info}/METADATA +3 -3
  174. {esphome-2024.11.3.dist-info → esphome-2024.12.0b1.dist-info}/RECORD +178 -149
  175. {esphome-2024.11.3.dist-info → esphome-2024.12.0b1.dist-info}/LICENSE +0 -0
  176. {esphome-2024.11.3.dist-info → esphome-2024.12.0b1.dist-info}/WHEEL +0 -0
  177. {esphome-2024.11.3.dist-info → esphome-2024.12.0b1.dist-info}/entry_points.txt +0 -0
  178. {esphome-2024.11.3.dist-info → esphome-2024.12.0b1.dist-info}/top_level.txt +0 -0
esphome/core/config.py CHANGED
@@ -21,6 +21,7 @@ from esphome.const import (
21
21
  CONF_LIBRARIES,
22
22
  CONF_MIN_VERSION,
23
23
  CONF_NAME,
24
+ CONF_NAME_ADD_MAC_SUFFIX,
24
25
  CONF_ON_BOOT,
25
26
  CONF_ON_LOOP,
26
27
  CONF_ON_SHUTDOWN,
@@ -59,8 +60,6 @@ ProjectUpdateTrigger = cg.esphome_ns.class_(
59
60
 
60
61
  VERSION_REGEX = re.compile(r"^[0-9]+\.[0-9]+\.[0-9]+(?:[ab]\d+)?$")
61
62
 
62
- CONF_NAME_ADD_MAC_SUFFIX = "name_add_mac_suffix"
63
-
64
63
 
65
64
  VALID_INCLUDE_EXTS = {".h", ".hpp", ".tcc", ".ino", ".cpp", ".c"}
66
65
 
esphome/core/defines.h CHANGED
@@ -84,7 +84,6 @@
84
84
 
85
85
  // Arduino-specific feature flags
86
86
  #ifdef USE_ARDUINO
87
- #define USE_CAPTIVE_PORTAL
88
87
  #define USE_PROMETHEUS
89
88
  #define USE_WIFI_WPA2_EAP
90
89
  #endif
@@ -97,6 +96,7 @@
97
96
  // ESP32-specific feature flags
98
97
  #ifdef USE_ESP32
99
98
  #define USE_BLUETOOTH_PROXY
99
+ #define USE_CAPTIVE_PORTAL
100
100
  #define USE_ESP32_BLE
101
101
  #define USE_ESP32_BLE_CLIENT
102
102
  #define USE_ESP32_BLE_SERVER
@@ -135,6 +135,7 @@
135
135
  #ifdef USE_ESP8266
136
136
  #define USE_ADC_SENSOR_VCC
137
137
  #define USE_ARDUINO_VERSION_CODE VERSION_CODE(3, 1, 2)
138
+ #define USE_CAPTIVE_PORTAL
138
139
  #define USE_ESP8266_PREFERENCES_FLASH
139
140
  #define USE_HTTP_REQUEST_ESP8266_HTTPS
140
141
  #define USE_SOCKET_IMPL_LWIP_TCP
@@ -159,6 +160,7 @@
159
160
  #endif
160
161
 
161
162
  #ifdef USE_LIBRETINY
163
+ #define USE_CAPTIVE_PORTAL
162
164
  #define USE_SOCKET_IMPL_LWIP_SOCKETS
163
165
  #define USE_WEBSERVER
164
166
  #define USE_WEBSERVER_PORT 80 // NOLINT
esphome/core/helpers.cpp CHANGED
@@ -259,10 +259,15 @@ bool random_bytes(uint8_t *data, size_t len) {
259
259
  bool str_equals_case_insensitive(const std::string &a, const std::string &b) {
260
260
  return strcasecmp(a.c_str(), b.c_str()) == 0;
261
261
  }
262
+ #if ESP_IDF_VERSION_MAJOR >= 5
263
+ bool str_startswith(const std::string &str, const std::string &start) { return str.starts_with(start); }
264
+ bool str_endswith(const std::string &str, const std::string &end) { return str.ends_with(end); }
265
+ #else
262
266
  bool str_startswith(const std::string &str, const std::string &start) { return str.rfind(start, 0) == 0; }
263
267
  bool str_endswith(const std::string &str, const std::string &end) {
264
268
  return str.rfind(end) == (str.size() - end.size());
265
269
  }
270
+ #endif
266
271
  std::string str_truncate(const std::string &str, size_t length) {
267
272
  return str.length() > length ? str.substr(0, length) : str;
268
273
  }
@@ -293,7 +298,7 @@ std::string str_sanitize(const std::string &str) {
293
298
  std::replace_if(
294
299
  out.begin(), out.end(),
295
300
  [](const char &c) {
296
- return !(c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
301
+ return c != '-' && c != '_' && (c < '0' || c > '9') && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z');
297
302
  },
298
303
  '_');
299
304
  return out;
esphome/core/helpers.h CHANGED
@@ -565,7 +565,8 @@ class Mutex {
565
565
  #if defined(USE_ESP32) || defined(USE_LIBRETINY)
566
566
  SemaphoreHandle_t handle_;
567
567
  #else
568
- void *handle_; // d-pointer to store private data on new platforms
568
+ // d-pointer to store private data on new platforms
569
+ void *handle_; // NOLINT(clang-diagnostic-unused-private-field)
569
570
  #endif
570
571
  };
571
572
 
esphome/core/optional.h CHANGED
@@ -59,7 +59,7 @@ template<typename T> class optional { // NOLINT
59
59
  return *this;
60
60
  }
61
61
 
62
- void swap(optional &rhs) {
62
+ void swap(optional &rhs) noexcept {
63
63
  using std::swap;
64
64
  if (has_value() && rhs.has_value()) {
65
65
  swap(**this, *rhs);
@@ -206,7 +206,7 @@ template<typename T, typename U> inline bool operator>=(U const &v, optional<T>
206
206
 
207
207
  // Specialized algorithms
208
208
 
209
- template<typename T> void swap(optional<T> &x, optional<T> &y) { x.swap(y); }
209
+ template<typename T> void swap(optional<T> &x, optional<T> &y) noexcept { x.swap(y); }
210
210
 
211
211
  // Convenience function to create an optional.
212
212
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: esphome
3
- Version: 2024.11.3
4
- Summary: Make creating custom firmwares for ESP32/ESP8266 super easy.
3
+ Version: 2024.12.0b1
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@nabucasa.com>
6
6
  License: MIT
7
7
  Project-URL: Documentation, https://esphome.io
@@ -50,7 +50,7 @@ Requires-Dist: argcomplete >=2.0.0
50
50
  Requires-Dist: async-timeout ==4.0.3 ; python_version <= "3.10"
51
51
  Provides-Extra: dev
52
52
  Requires-Dist: clang-format ==13.0.1 ; extra == 'dev'
53
- Requires-Dist: clang-tidy ==14.0.6 ; extra == 'dev'
53
+ Requires-Dist: clang-tidy ==18.1.8 ; extra == 'dev'
54
54
  Requires-Dist: yamllint ==1.35.1 ; extra == 'dev'
55
55
  Provides-Extra: displays
56
56
  Requires-Dist: cairosvg ==2.7.1 ; extra == 'displays'