esphome 2024.6.6__py3-none-any.whl → 2024.7.0__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 (102) hide show
  1. esphome/components/aht10/aht10.cpp +4 -2
  2. esphome/components/climate/climate.cpp +10 -6
  3. esphome/components/climate/climate_traits.h +3 -3
  4. esphome/components/cover/cover.h +2 -2
  5. esphome/components/esp32_camera/__init__.py +6 -3
  6. esphome/components/esp32_can/canbus.py +3 -0
  7. esphome/components/ethernet/ethernet_component.cpp +8 -3
  8. esphome/components/font/__init__.py +2 -28
  9. esphome/components/gree/climate.py +1 -0
  10. esphome/components/gree/gree.cpp +11 -3
  11. esphome/components/gree/gree.h +5 -1
  12. esphome/components/haier/binary_sensor/__init__.py +4 -4
  13. esphome/components/haier/button/__init__.py +1 -1
  14. esphome/components/haier/climate.py +43 -9
  15. esphome/components/haier/haier_base.cpp +4 -0
  16. esphome/components/haier/haier_base.h +11 -1
  17. esphome/components/haier/hon_climate.cpp +109 -55
  18. esphome/components/haier/hon_climate.h +7 -1
  19. esphome/components/haier/hon_packet.h +5 -0
  20. esphome/components/haier/sensor/__init__.py +5 -5
  21. esphome/components/haier/smartair2_climate.cpp +1 -0
  22. esphome/components/haier/text_sensor/__init__.py +4 -4
  23. esphome/components/heatpumpir/climate.py +12 -5
  24. esphome/components/heatpumpir/heatpumpir.cpp +11 -0
  25. esphome/components/heatpumpir/heatpumpir.h +11 -0
  26. esphome/components/http_request/http_request_arduino.cpp +7 -2
  27. esphome/components/http_request/update/http_request_update.cpp +6 -7
  28. esphome/components/http_request/update/http_request_update.h +0 -3
  29. esphome/components/i2s_audio/__init__.py +10 -0
  30. esphome/components/i2s_audio/microphone/__init__.py +7 -0
  31. esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp +2 -3
  32. esphome/components/i2s_audio/microphone/i2s_audio_microphone.h +3 -0
  33. esphome/components/image/__init__.py +2 -29
  34. esphome/components/improv_serial/improv_serial_component.cpp +9 -8
  35. esphome/components/ltr390/ltr390.cpp +44 -29
  36. esphome/components/ltr390/ltr390.h +9 -5
  37. esphome/components/ltr390/sensor.py +35 -5
  38. esphome/components/mdns/__init__.py +3 -3
  39. esphome/components/mdns/mdns_component.cpp +3 -1
  40. esphome/components/mdns/mdns_component.h +3 -1
  41. esphome/components/mdns/mdns_esp32.cpp +2 -1
  42. esphome/components/mdns/mdns_esp8266.cpp +2 -1
  43. esphome/components/mdns/mdns_host.cpp +2 -1
  44. esphome/components/mdns/mdns_libretiny.cpp +2 -1
  45. esphome/components/mdns/mdns_rp2040.cpp +2 -1
  46. esphome/components/micro_wake_word/__init__.py +205 -56
  47. esphome/components/micro_wake_word/micro_wake_word.cpp +225 -275
  48. esphome/components/micro_wake_word/micro_wake_word.h +77 -107
  49. esphome/components/micro_wake_word/preprocessor_settings.h +20 -0
  50. esphome/components/micro_wake_word/streaming_model.cpp +189 -0
  51. esphome/components/micro_wake_word/streaming_model.h +84 -0
  52. esphome/components/mitsubishi/mitsubishi.cpp +1 -0
  53. esphome/components/modbus_controller/text_sensor/__init__.py +2 -1
  54. esphome/components/modbus_controller/text_sensor/modbus_textsensor.cpp +4 -1
  55. esphome/components/modbus_controller/text_sensor/modbus_textsensor.h +1 -1
  56. esphome/components/number/__init__.py +2 -0
  57. esphome/components/ota/ota_backend_arduino_esp32.cpp +22 -7
  58. esphome/components/ota/ota_backend_arduino_esp8266.cpp +23 -8
  59. esphome/components/ota/ota_backend_arduino_libretiny.cpp +22 -7
  60. esphome/components/ota/ota_backend_arduino_rp2040.cpp +22 -7
  61. esphome/components/pmsa003i/pmsa003i.cpp +9 -0
  62. esphome/components/qspi_amoled/display.py +16 -4
  63. esphome/components/qspi_amoled/qspi_amoled.cpp +16 -0
  64. esphome/components/qspi_amoled/qspi_amoled.h +0 -3
  65. esphome/components/remote_base/dooya_protocol.cpp +4 -4
  66. esphome/components/remote_base/rc_switch_protocol.cpp +1 -1
  67. esphome/components/restart/button/__init__.py +2 -0
  68. esphome/components/script/__init__.py +1 -1
  69. esphome/components/sensor/__init__.py +2 -0
  70. esphome/components/tuya/tuya.cpp +8 -2
  71. esphome/components/tuya/tuya.h +3 -1
  72. esphome/components/uart/__init__.py +72 -9
  73. esphome/components/uart/uart_component_esp32_arduino.cpp +18 -4
  74. esphome/components/uart/uart_component_esp_idf.cpp +22 -2
  75. esphome/components/uart/uart_component_host.cpp +295 -0
  76. esphome/components/uart/uart_component_host.h +38 -0
  77. esphome/components/uptime/sensor.py +44 -11
  78. esphome/components/uptime/{uptime_sensor.cpp → uptime_seconds_sensor.cpp} +11 -7
  79. esphome/components/uptime/{uptime_sensor.h → uptime_seconds_sensor.h} +2 -2
  80. esphome/components/uptime/uptime_timestamp_sensor.cpp +39 -0
  81. esphome/components/uptime/uptime_timestamp_sensor.h +30 -0
  82. esphome/components/veml7700/veml7700.cpp +1 -1
  83. esphome/components/veml7700/veml7700.h +5 -5
  84. esphome/components/voice_assistant/voice_assistant.cpp +4 -2
  85. esphome/components/web_server/server_index_v2.h +42 -41
  86. esphome/components/web_server/server_index_v3.h +368 -367
  87. esphome/components/wifi/wifi_component_esp_idf.cpp +1 -1
  88. esphome/components/wifi/wifi_component_pico_w.cpp +18 -2
  89. esphome/components/wireguard/__init__.py +1 -1
  90. esphome/components/x9c/output.py +7 -1
  91. esphome/const.py +2 -1
  92. esphome/core/defines.h +1 -0
  93. esphome/core/helpers.cpp +2 -2
  94. esphome/core/helpers.h +1 -1
  95. esphome/external_files.py +26 -0
  96. {esphome-2024.6.6.dist-info → esphome-2024.7.0.dist-info}/METADATA +1 -1
  97. {esphome-2024.6.6.dist-info → esphome-2024.7.0.dist-info}/RECORD +101 -95
  98. esphome/components/micro_wake_word/audio_preprocessor_int8_model_data.h +0 -493
  99. {esphome-2024.6.6.dist-info → esphome-2024.7.0.dist-info}/LICENSE +0 -0
  100. {esphome-2024.6.6.dist-info → esphome-2024.7.0.dist-info}/WHEEL +0 -0
  101. {esphome-2024.6.6.dist-info → esphome-2024.7.0.dist-info}/entry_points.txt +0 -0
  102. {esphome-2024.6.6.dist-info → esphome-2024.7.0.dist-info}/top_level.txt +0 -0
@@ -757,7 +757,7 @@ void WiFiComponent::wifi_process_event_(IDFWiFiEvent *data) {
757
757
 
758
758
  WiFiSTAConnectStatus WiFiComponent::wifi_sta_connect_status_() {
759
759
  if (s_sta_connected && this->got_ipv4_address_) {
760
- #if USE_NETWORK_IPV6
760
+ #if USE_NETWORK_IPV6 && (USE_NETWORK_MIN_IPV6_ADDR_COUNT > 0)
761
761
  if (this->num_ipv6_addresses_ >= USE_NETWORK_MIN_IPV6_ADDR_COUNT) {
762
762
  return WiFiSTAConnectStatus::CONNECTED;
763
763
  }
@@ -141,13 +141,29 @@ bool WiFiComponent::wifi_scan_start_(bool passive) {
141
141
 
142
142
  #ifdef USE_WIFI_AP
143
143
  bool WiFiComponent::wifi_ap_ip_config_(optional<ManualIP> manual_ip) {
144
- // TODO:
145
- return false;
144
+ esphome::network::IPAddress ip_address, gateway, subnet, dns;
145
+ if (manual_ip.has_value()) {
146
+ ip_address = manual_ip->static_ip;
147
+ gateway = manual_ip->gateway;
148
+ subnet = manual_ip->subnet;
149
+ dns = manual_ip->static_ip;
150
+ } else {
151
+ ip_address = network::IPAddress(192, 168, 4, 1);
152
+ gateway = network::IPAddress(192, 168, 4, 1);
153
+ subnet = network::IPAddress(255, 255, 255, 0);
154
+ dns = network::IPAddress(192, 168, 4, 1);
155
+ }
156
+ WiFi.config(ip_address, dns, gateway, subnet);
157
+ return true;
146
158
  }
147
159
 
148
160
  bool WiFiComponent::wifi_start_ap_(const WiFiAP &ap) {
149
161
  if (!this->wifi_mode_({}, true))
150
162
  return false;
163
+ if (!this->wifi_ap_ip_config_(ap.get_manual_ip())) {
164
+ ESP_LOGV(TAG, "wifi_ap_ip_config_ failed!");
165
+ return false;
166
+ }
151
167
 
152
168
  WiFi.beginAP(ap.get_ssid().c_str(), ap.get_password().c_str(), ap.get_channel().value_or(1));
153
169
 
@@ -132,7 +132,7 @@ async def to_code(config):
132
132
  # the '+1' modifier is relative to the device's own address that will
133
133
  # be automatically added to the provided list.
134
134
  cg.add_build_flag(f"-DCONFIG_WIREGUARD_MAX_SRC_IPS={len(allowed_ips) + 1}")
135
- cg.add_library("droscy/esp_wireguard", "0.4.1")
135
+ cg.add_library("droscy/esp_wireguard", "0.4.2")
136
136
 
137
137
  await cg.register_component(var, config)
138
138
 
@@ -27,7 +27,13 @@ CONFIG_SCHEMA = cv.All(
27
27
  cv.Optional(CONF_INITIAL_VALUE, default=1.0): cv.float_range(
28
28
  min=0.01, max=1.0
29
29
  ),
30
- cv.Optional(CONF_STEP_DELAY, default=1): cv.int_range(min=1, max=100),
30
+ cv.Optional(CONF_STEP_DELAY, default="1us"): cv.All(
31
+ cv.positive_time_period_microseconds,
32
+ cv.Range(
33
+ min=cv.TimePeriod(microseconds=1),
34
+ max=cv.TimePeriod(microseconds=100),
35
+ ),
36
+ ),
31
37
  }
32
38
  )
33
39
  )
esphome/const.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Constants used by esphome."""
2
2
 
3
- __version__ = "2024.6.6"
3
+ __version__ = "2024.7.0"
4
4
 
5
5
  ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
6
6
  VALID_SUBSTITUTIONS_CHARACTERS = (
@@ -1072,6 +1072,7 @@ DEVICE_CLASS_BUTTON = "button"
1072
1072
  DEVICE_CLASS_CARBON_DIOXIDE = "carbon_dioxide"
1073
1073
  DEVICE_CLASS_CARBON_MONOXIDE = "carbon_monoxide"
1074
1074
  DEVICE_CLASS_COLD = "cold"
1075
+ DEVICE_CLASS_CONDUCTIVITY = "conductivity"
1075
1076
  DEVICE_CLASS_CONNECTIVITY = "connectivity"
1076
1077
  DEVICE_CLASS_CURRENT = "current"
1077
1078
  DEVICE_CLASS_CURTAIN = "curtain"
esphome/core/defines.h CHANGED
@@ -86,6 +86,7 @@
86
86
  #define USE_ESP32_BLE_SERVER
87
87
  #define USE_ESP32_CAMERA
88
88
  #define USE_IMPROV
89
+ #define USE_MICRO_WAKE_WORD_VAD
89
90
  #define USE_MICROPHONE
90
91
  #define USE_PSRAM
91
92
  #define USE_SOCKET_IMPL_BSD_SOCKETS
esphome/core/helpers.cpp CHANGED
@@ -78,7 +78,7 @@ static const uint16_t CRC16_1021_BE_LUT_H[] = {0x0000, 0x1231, 0x2462, 0x3653, 0
78
78
 
79
79
  // STL backports
80
80
 
81
- #if _GLIBCXX_RELEASE < 7
81
+ #if _GLIBCXX_RELEASE < 8
82
82
  std::string to_string(int value) { return str_snprintf("%d", 32, value); } // NOLINT
83
83
  std::string to_string(long value) { return str_snprintf("%ld", 32, value); } // NOLINT
84
84
  std::string to_string(long long value) { return str_snprintf("%lld", 32, value); } // NOLINT
@@ -93,7 +93,7 @@ std::string to_string(long double value) { return str_snprintf("%Lf", 32, value)
93
93
  // Mathematics
94
94
 
95
95
  float lerp(float completion, float start, float end) { return start + (end - start) * completion; }
96
- uint8_t crc8(uint8_t *data, uint8_t len) {
96
+ uint8_t crc8(const uint8_t *data, uint8_t len) {
97
97
  uint8_t crc = 0;
98
98
 
99
99
  while ((len--) != 0u) {
esphome/core/helpers.h CHANGED
@@ -155,7 +155,7 @@ template<typename T, typename U> T remap(U value, U min, U max, T min_out, T max
155
155
  }
156
156
 
157
157
  /// Calculate a CRC-8 checksum of \p data with size \p len.
158
- uint8_t crc8(uint8_t *data, uint8_t len);
158
+ uint8_t crc8(const uint8_t *data, uint8_t len);
159
159
 
160
160
  /// Calculate a CRC-16 checksum of \p data with size \p len.
161
161
  uint16_t crc16(const uint8_t *data, uint16_t len, uint16_t crc = 0xffff, uint16_t reverse_poly = 0xa001,
esphome/external_files.py CHANGED
@@ -7,6 +7,7 @@ from datetime import datetime
7
7
  import requests
8
8
  import esphome.config_validation as cv
9
9
  from esphome.core import CORE, TimePeriodSeconds
10
+ from esphome.const import __version__
10
11
 
11
12
  _LOGGER = logging.getLogger(__name__)
12
13
  CODEOWNERS = ["@landonr"]
@@ -75,3 +76,28 @@ def compute_local_file_dir(domain: str) -> Path:
75
76
  base_directory.mkdir(parents=True, exist_ok=True)
76
77
 
77
78
  return base_directory
79
+
80
+
81
+ def download_content(url: str, path: Path, timeout=NETWORK_TIMEOUT) -> None:
82
+ if not has_remote_file_changed(url, path):
83
+ _LOGGER.debug("Remote file has not changed %s", url)
84
+ return
85
+
86
+ _LOGGER.debug(
87
+ "Remote file has changed, downloading from %s to %s",
88
+ url,
89
+ path,
90
+ )
91
+
92
+ try:
93
+ req = requests.get(
94
+ url,
95
+ timeout=timeout,
96
+ headers={"User-agent": f"ESPHome/{__version__} (https://esphome.io)"},
97
+ )
98
+ req.raise_for_status()
99
+ except requests.exceptions.RequestException as e:
100
+ raise cv.Invalid(f"Could not download from {url}: {e}")
101
+
102
+ path.parent.mkdir(parents=True, exist_ok=True)
103
+ path.write_bytes(req.content)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: esphome
3
- Version: 2024.6.6
3
+ Version: 2024.7.0
4
4
  Summary: Make creating custom firmwares for ESP32/ESP8266 super easy.
5
5
  Author-email: The ESPHome Authors <esphome@nabucasa.com>
6
6
  License: MIT