esphome 2024.12.0__py3-none-any.whl → 2024.12.0b2__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.
@@ -27,9 +27,6 @@ namespace esp32_ble {
27
27
 
28
28
  static const char *const TAG = "esp32_ble";
29
29
 
30
- static RAMAllocator<BLEEvent> EVENT_ALLOCATOR( // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
31
- RAMAllocator<BLEEvent>::ALLOW_FAILURE | RAMAllocator<BLEEvent>::ALLOC_INTERNAL);
32
-
33
30
  void ESP32BLE::setup() {
34
31
  global_ble = this;
35
32
  ESP_LOGCONFIG(TAG, "Setting up BLE...");
@@ -325,8 +322,7 @@ void ESP32BLE::loop() {
325
322
  default:
326
323
  break;
327
324
  }
328
- ble_event->~BLEEvent();
329
- EVENT_ALLOCATOR.deallocate(ble_event, 1);
325
+ delete ble_event; // NOLINT(cppcoreguidelines-owning-memory)
330
326
  ble_event = this->ble_events_.pop();
331
327
  }
332
328
  if (this->advertising_ != nullptr) {
@@ -335,14 +331,9 @@ void ESP32BLE::loop() {
335
331
  }
336
332
 
337
333
  void ESP32BLE::gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) {
338
- BLEEvent *new_event = EVENT_ALLOCATOR.allocate(1);
339
- if (new_event == nullptr) {
340
- // Memory too fragmented to allocate new event. Can only drop it until memory comes back
341
- return;
342
- }
343
- new (new_event) BLEEvent(event, param);
334
+ BLEEvent *new_event = new BLEEvent(event, param); // NOLINT(cppcoreguidelines-owning-memory)
344
335
  global_ble->ble_events_.push(new_event);
345
- } // NOLINT(clang-analyzer-unix.Malloc)
336
+ } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
346
337
 
347
338
  void ESP32BLE::real_gap_event_handler_(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) {
348
339
  ESP_LOGV(TAG, "(BLE) gap_event_handler - %d", event);
@@ -353,14 +344,9 @@ void ESP32BLE::real_gap_event_handler_(esp_gap_ble_cb_event_t event, esp_ble_gap
353
344
 
354
345
  void ESP32BLE::gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if,
355
346
  esp_ble_gatts_cb_param_t *param) {
356
- BLEEvent *new_event = EVENT_ALLOCATOR.allocate(1);
357
- if (new_event == nullptr) {
358
- // Memory too fragmented to allocate new event. Can only drop it until memory comes back
359
- return;
360
- }
361
- new (new_event) BLEEvent(event, gatts_if, param);
347
+ BLEEvent *new_event = new BLEEvent(event, gatts_if, param); // NOLINT(cppcoreguidelines-owning-memory)
362
348
  global_ble->ble_events_.push(new_event);
363
- } // NOLINT(clang-analyzer-unix.Malloc)
349
+ } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
364
350
 
365
351
  void ESP32BLE::real_gatts_event_handler_(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if,
366
352
  esp_ble_gatts_cb_param_t *param) {
@@ -372,14 +358,9 @@ void ESP32BLE::real_gatts_event_handler_(esp_gatts_cb_event_t event, esp_gatt_if
372
358
 
373
359
  void ESP32BLE::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
374
360
  esp_ble_gattc_cb_param_t *param) {
375
- BLEEvent *new_event = EVENT_ALLOCATOR.allocate(1);
376
- if (new_event == nullptr) {
377
- // Memory too fragmented to allocate new event. Can only drop it until memory comes back
378
- return;
379
- }
380
- new (new_event) BLEEvent(event, gattc_if, param);
361
+ BLEEvent *new_event = new BLEEvent(event, gattc_if, param); // NOLINT(cppcoreguidelines-owning-memory)
381
362
  global_ble->ble_events_.push(new_event);
382
- } // NOLINT(clang-analyzer-unix.Malloc)
363
+ } // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
383
364
 
384
365
  void ESP32BLE::real_gattc_event_handler_(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
385
366
  esp_ble_gattc_cb_param_t *param) {
@@ -51,11 +51,8 @@ CONF_IGNORE_MISSING_GLYPHS = "ignore_missing_glyphs"
51
51
  # Cache loaded freetype fonts
52
52
  class FontCache(dict):
53
53
  def __missing__(self, key):
54
- try:
55
- res = self[key] = freetype.Face(key)
56
- return res
57
- except freetype.FT_Exception as e:
58
- raise cv.Invalid(f"Could not load Font file {key}: {e}") from e
54
+ res = self[key] = freetype.Face(key)
55
+ return res
59
56
 
60
57
 
61
58
  FONT_CACHE = FontCache()
esphome/const.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Constants used by esphome."""
2
2
 
3
- __version__ = "2024.12.0"
3
+ __version__ = "2024.12.0b2"
4
4
 
5
5
  ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
6
6
  VALID_SUBSTITUTIONS_CHARACTERS = (
@@ -108,12 +108,6 @@ def is_authenticated(handler: BaseHandler) -> bool:
108
108
  return True
109
109
 
110
110
  if settings.using_auth:
111
- if auth_header := handler.request.headers.get("Authorization"):
112
- assert isinstance(auth_header, str)
113
- if auth_header.startswith("Basic "):
114
- auth_decoded = base64.b64decode(auth_header[6:]).decode()
115
- username, password = auth_decoded.split(":", 1)
116
- return settings.check_password(username, password)
117
111
  return handler.get_secure_cookie(AUTH_COOKIE_NAME) == COOKIE_AUTHENTICATED_YES
118
112
 
119
113
  return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: esphome
3
- Version: 2024.12.0
3
+ Version: 2024.12.0b2
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@nabucasa.com>
6
6
  License: MIT
@@ -36,7 +36,7 @@ Requires-Dist: pyserial ==3.5
36
36
  Requires-Dist: platformio ==6.1.16
37
37
  Requires-Dist: esptool ==4.7.0
38
38
  Requires-Dist: click ==8.1.7
39
- Requires-Dist: esphome-dashboard ==20241217.1
39
+ Requires-Dist: esphome-dashboard ==20241120.0
40
40
  Requires-Dist: aioesphomeapi ==24.6.2
41
41
  Requires-Dist: zeroconf ==0.132.2
42
42
  Requires-Dist: puremagic ==1.27
@@ -5,7 +5,7 @@ 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=jtqGmSF_0mAIMxRMV3eJj7dQ71Jmlc51NOx6AvWlnqs,66374
8
- esphome/const.py,sha256=1DPFJxlwvWA5rcWHVJhD3m1KtGynd0E9CvXgW3TnFis,40644
8
+ esphome/const.py,sha256=loew3PJznRZnI-bAYl6g1mSRhs4Iljrxs0a0HHtWcuU,40646
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
@@ -789,7 +789,7 @@ esphome/components/esp32/post_build.py.script,sha256=ZBsPNunx2BH4ZiRyXnjTP7D7eN2
789
789
  esphome/components/esp32/preferences.cpp,sha256=6mrR6ziH2dnBcMKPD5RwYYB16tkAy0w75x_mRy4wQCY,6294
790
790
  esphome/components/esp32/preferences.h,sha256=9HIy-BOgjOXJiEgOizZ_Qb8-l6K4eb3VSPW8Y8ffuWM,165
791
791
  esphome/components/esp32_ble/__init__.py,sha256=_icbuq6fiRVExFZe1ETU2GJ6ziR4LxMK3nzeER7gEuY,4321
792
- esphome/components/esp32_ble/ble.cpp,sha256=w51oEvWeMcYs2CgIlCLTFEMaxxzxW0hAstWhwHl_oQM,13661
792
+ esphome/components/esp32_ble/ble.cpp,sha256=OtuXz0Qv-YQa-Ghubtvpvon9FzsU3n-P401oFcTB1l8,13082
793
793
  esphome/components/esp32_ble/ble.h,sha256=1USMpwRwVHc6_CnxieJa55mMPq3GFfkEPPYarySc05Y,5234
794
794
  esphome/components/esp32_ble/ble_advertising.cpp,sha256=DUdZyaNCc4xxyPmB4OM8dtgSxcHkIdju1-j-CJGMtyg,6022
795
795
  esphome/components/esp32_ble/ble_advertising.h,sha256=dLksw168KS1wh3_X7GhesS9nacINphlZUl4nMgYSA8M,1480
@@ -932,7 +932,7 @@ esphome/components/fingerprint_grow/binary_sensor.py,sha256=NeVcqVCpmjGdnfimIIWS
932
932
  esphome/components/fingerprint_grow/fingerprint_grow.cpp,sha256=xtHEpnp1Ei_5s5SS5Vfxt8vG_PoPMmeUjbOQHWrn5G0,18675
933
933
  esphome/components/fingerprint_grow/fingerprint_grow.h,sha256=UEkLR4Cqas_XYlTLAwscXCAMRoprWeQZEZ_3vTsI-BM,11206
934
934
  esphome/components/fingerprint_grow/sensor.py,sha256=eazvZvdtt1Rl8o3Aw6eYKn-kb2sNDfZKHegxpFFdQeg,2244
935
- esphome/components/font/__init__.py,sha256=UffNdpZ8qzYXqi3Z1KN5m2Vf_9q_Q5bjgB-JN_H-MYw,19227
935
+ esphome/components/font/__init__.py,sha256=eixW4XJNfpxcV-_dDGDsC8Z7VgB42u4StDgCSbMxoes,19087
936
936
  esphome/components/font/font.cpp,sha256=xORioLApiap2sPwx4d5uMTQNx5-OUIYSB8pt0uHx0IU,5413
937
937
  esphome/components/font/font.h,sha256=jTeGf7Osax98Tbs9TeZ01Ta3P2FZt-wWar1bybMFc20,2009
938
938
  esphome/components/fs3000/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -3374,7 +3374,7 @@ esphome/dashboard/dns.py,sha256=zJjzjjuJsnHXW59V-H1QqjwwqJFgtJUIsB2QUcALZns,1369
3374
3374
  esphome/dashboard/entries.py,sha256=jbmvXQ5-zeUBVrd80tupYmStRsTwGp0hbfG7ZIRQF94,13130
3375
3375
  esphome/dashboard/enum.py,sha256=rlQFVVxyBt5Iw7OL0o9F8D5LGgw23tbvi-KYjzP0QUQ,597
3376
3376
  esphome/dashboard/settings.py,sha256=xoN2eLh-t0hmVYLmZm9beVOqonPNqWkzpRsoPbEomoA,2962
3377
- esphome/dashboard/web_server.py,sha256=cSWc_M4ieUg_O0DpQYBM-bDDkhkSF4wFvDRAUVtf08s,42211
3377
+ esphome/dashboard/web_server.py,sha256=SnAB_8ndfY91SPmY1cwCYkKxtWF9ppDgbD7soSzs3YQ,41837
3378
3378
  esphome/dashboard/status/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3379
3379
  esphome/dashboard/status/mdns.py,sha256=FuASYxcQ-LQVK5vqX9ZLs9wIXlmXZh4tjXhg-Zmpq14,3741
3380
3380
  esphome/dashboard/status/mqtt.py,sha256=ZRb18LOvl4975Pzc4Fdr5ErML3WKwV8Pv1sD2qdSJ1s,1965
@@ -3385,9 +3385,9 @@ esphome/dashboard/util/itertools.py,sha256=8eLrWEWmICLtXNxkKdYPQV0c_N4GEz8m9Npnb
3385
3385
  esphome/dashboard/util/password.py,sha256=cQz3b9B-ijTe7zS6BeCW0hc3pWv6JjC78jmnycYYAh8,321
3386
3386
  esphome/dashboard/util/subprocess.py,sha256=T8EW6dbU4LPd2DG1dRrdh8li71tt6J1isn411poMhkk,1022
3387
3387
  esphome/dashboard/util/text.py,sha256=ENDnfN4O0NdA3CKVJjQYabFbwbrsIhVKrAMQe53qYu4,534
3388
- esphome-2024.12.0.dist-info/LICENSE,sha256=HzEjkBInJe44L4WvAOPfhPJJDNj6YbnqFyvGWRzArGM,36664
3389
- esphome-2024.12.0.dist-info/METADATA,sha256=dL4Mr4nI31ROpM4HxYdovxSSBtos57W76DplmG5yoWw,3549
3390
- esphome-2024.12.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
3391
- esphome-2024.12.0.dist-info/entry_points.txt,sha256=mIxVNuWtbYzeEcaWCl-AQ-97aBOWbnYBAK8nbF6P4M0,50
3392
- esphome-2024.12.0.dist-info/top_level.txt,sha256=0GSXEW3cnITpgG3qnsSMz0qoqJHAFyfw7Y8MVtEf1Yk,8
3393
- esphome-2024.12.0.dist-info/RECORD,,
3388
+ esphome-2024.12.0b2.dist-info/LICENSE,sha256=HzEjkBInJe44L4WvAOPfhPJJDNj6YbnqFyvGWRzArGM,36664
3389
+ esphome-2024.12.0b2.dist-info/METADATA,sha256=ua2PrbGevoon-zserr93K2ZRBS1wj39PDAx0sA98iTo,3551
3390
+ esphome-2024.12.0b2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
3391
+ esphome-2024.12.0b2.dist-info/entry_points.txt,sha256=mIxVNuWtbYzeEcaWCl-AQ-97aBOWbnYBAK8nbF6P4M0,50
3392
+ esphome-2024.12.0b2.dist-info/top_level.txt,sha256=0GSXEW3cnITpgG3qnsSMz0qoqJHAFyfw7Y8MVtEf1Yk,8
3393
+ esphome-2024.12.0b2.dist-info/RECORD,,