esphome 2025.2.1__py3-none-any.whl → 2025.3.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 (140) hide show
  1. esphome/__main__.py +9 -1
  2. esphome/components/api/api_connection.cpp +426 -70
  3. esphome/components/api/api_connection.h +117 -25
  4. esphome/components/api/api_pb2.cpp +9 -0
  5. esphome/components/api/api_pb2.h +1 -0
  6. esphome/components/api/api_server.cpp +2 -2
  7. esphome/components/api/list_entities.cpp +76 -22
  8. esphome/components/api/list_entities.h +1 -0
  9. esphome/components/api/subscribe_state.h +2 -0
  10. esphome/components/audio/audio_reader.cpp +7 -7
  11. esphome/components/audio/audio_reader.h +1 -1
  12. esphome/components/bluetooth_proxy/bluetooth_proxy.h +8 -0
  13. esphome/components/bmp085/bmp085.cpp +1 -1
  14. esphome/components/chsc6x/__init__.py +2 -0
  15. esphome/components/chsc6x/chsc6x_touchscreen.cpp +47 -0
  16. esphome/components/chsc6x/chsc6x_touchscreen.h +34 -0
  17. esphome/components/chsc6x/touchscreen.py +33 -0
  18. esphome/components/climate/__init__.py +0 -1
  19. esphome/components/cst816/binary_sensor/__init__.py +2 -25
  20. esphome/components/cst816/touchscreen/cst816_touchscreen.cpp +3 -14
  21. esphome/components/cst816/touchscreen/cst816_touchscreen.h +0 -4
  22. esphome/components/esp32_ble_beacon/__init__.py +3 -1
  23. esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +2 -2
  24. esphome/components/esp8266/gpio.py +1 -2
  25. esphome/components/font/__init__.py +185 -185
  26. esphome/components/font/font.cpp +4 -4
  27. esphome/components/font/font.h +1 -0
  28. esphome/components/haier/climate.py +11 -10
  29. esphome/components/hbridge/switch/hbridge_switch.cpp +2 -2
  30. esphome/components/heatpumpir/climate.py +2 -1
  31. esphome/components/heatpumpir/heatpumpir.cpp +1 -0
  32. esphome/components/heatpumpir/heatpumpir.h +1 -0
  33. esphome/components/i2c/__init__.py +6 -6
  34. esphome/components/i2c/i2c_bus_esp_idf.cpp +6 -2
  35. esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +1 -1
  36. esphome/components/ili9xxx/display.py +1 -0
  37. esphome/components/ili9xxx/ili9xxx_display.h +5 -0
  38. esphome/components/ili9xxx/ili9xxx_init.h +59 -0
  39. esphome/components/ld2450/__init__.py +51 -0
  40. esphome/components/ld2450/binary_sensor.py +47 -0
  41. esphome/components/ld2450/button/__init__.py +45 -0
  42. esphome/components/ld2450/button/reset_button.cpp +9 -0
  43. esphome/components/ld2450/button/reset_button.h +18 -0
  44. esphome/components/ld2450/button/restart_button.cpp +9 -0
  45. esphome/components/ld2450/button/restart_button.h +18 -0
  46. esphome/components/ld2450/ld2450.cpp +876 -0
  47. esphome/components/ld2450/ld2450.h +234 -0
  48. esphome/components/ld2450/number/__init__.py +121 -0
  49. esphome/components/ld2450/number/presence_timeout_number.cpp +12 -0
  50. esphome/components/ld2450/number/presence_timeout_number.h +18 -0
  51. esphome/components/ld2450/number/zone_coordinate_number.cpp +14 -0
  52. esphome/components/ld2450/number/zone_coordinate_number.h +19 -0
  53. esphome/components/ld2450/select/__init__.py +56 -0
  54. esphome/components/ld2450/select/baud_rate_select.cpp +12 -0
  55. esphome/components/ld2450/select/baud_rate_select.h +18 -0
  56. esphome/components/ld2450/select/zone_type_select.cpp +12 -0
  57. esphome/components/ld2450/select/zone_type_select.h +18 -0
  58. esphome/components/ld2450/sensor.py +156 -0
  59. esphome/components/ld2450/switch/__init__.py +45 -0
  60. esphome/components/ld2450/switch/bluetooth_switch.cpp +12 -0
  61. esphome/components/ld2450/switch/bluetooth_switch.h +18 -0
  62. esphome/components/ld2450/switch/multi_target_switch.cpp +12 -0
  63. esphome/components/ld2450/switch/multi_target_switch.h +18 -0
  64. esphome/components/ld2450/text_sensor.py +62 -0
  65. esphome/components/ltr390/ltr390.cpp +7 -7
  66. esphome/components/ltr390/ltr390.h +0 -1
  67. esphome/components/lvgl/defines.py +0 -2
  68. esphome/components/lvgl/font.cpp +1 -1
  69. esphome/components/lvgl/lvgl_esphome.cpp +27 -19
  70. esphome/components/lvgl/widgets/img.py +1 -3
  71. esphome/components/mcp2515/mcp2515.cpp +1 -0
  72. esphome/components/mlx90393/sensor.py +53 -33
  73. esphome/components/mlx90393/sensor_mlx90393.cpp +4 -0
  74. esphome/components/mlx90393/sensor_mlx90393.h +8 -3
  75. esphome/components/mqtt/__init__.py +2 -2
  76. esphome/components/msa3xx/__init__.py +189 -0
  77. esphome/components/msa3xx/binary_sensor.py +40 -0
  78. esphome/components/msa3xx/msa3xx.cpp +417 -0
  79. esphome/components/msa3xx/msa3xx.h +311 -0
  80. esphome/components/msa3xx/sensor.py +42 -0
  81. esphome/components/msa3xx/text_sensor.py +38 -0
  82. esphome/components/nfc/binary_sensor/__init__.py +4 -4
  83. esphome/components/opentherm/binary_sensor/__init__.py +4 -4
  84. esphome/components/opentherm/generate.py +6 -6
  85. esphome/components/opentherm/sensor/__init__.py +5 -6
  86. esphome/components/packages/__init__.py +35 -11
  87. esphome/components/pn532/binary_sensor.py +4 -4
  88. esphome/components/rc522/binary_sensor.py +4 -4
  89. esphome/components/socket/bsd_sockets_impl.cpp +1 -0
  90. esphome/components/socket/lwip_sockets_impl.cpp +1 -0
  91. esphome/components/socket/socket.h +3 -1
  92. esphome/components/ssd1306_base/__init__.py +7 -7
  93. esphome/components/thermostat/climate.py +1 -1
  94. esphome/components/tmp1075/tmp1075.cpp +7 -11
  95. esphome/components/tmp1075/tmp1075.h +1 -2
  96. esphome/components/tormatic/__init__.py +1 -0
  97. esphome/components/tormatic/cover.py +47 -0
  98. esphome/components/tormatic/tormatic_cover.cpp +355 -0
  99. esphome/components/tormatic/tormatic_cover.h +60 -0
  100. esphome/components/tormatic/tormatic_protocol.h +211 -0
  101. esphome/components/touchscreen/binary_sensor/__init__.py +3 -0
  102. esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.cpp +7 -1
  103. esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.h +3 -1
  104. esphome/components/touchscreen/touchscreen.cpp +3 -4
  105. esphome/components/udp/udp_component.h +4 -1
  106. esphome/components/web_server/list_entities.cpp +70 -66
  107. esphome/components/web_server/list_entities.h +43 -22
  108. esphome/components/web_server/web_server.cpp +345 -68
  109. esphome/components/web_server/web_server.h +138 -6
  110. esphome/components/web_server_base/__init__.py +1 -1
  111. esphome/components/web_server_idf/__init__.py +2 -0
  112. esphome/components/web_server_idf/web_server_idf.cpp +177 -30
  113. esphome/components/web_server_idf/web_server_idf.h +53 -4
  114. esphome/config_validation.py +23 -125
  115. esphome/const.py +5 -1
  116. esphome/core/config.py +12 -4
  117. esphome/core/defines.h +1 -1
  118. esphome/core/helpers.h +5 -3
  119. esphome/core/time.cpp +1 -0
  120. esphome/cpp_generator.py +3 -3
  121. esphome/dashboard/core.py +30 -21
  122. esphome/dashboard/dns.py +7 -1
  123. esphome/dashboard/entries.py +83 -16
  124. esphome/dashboard/settings.py +0 -4
  125. esphome/dashboard/status/mdns.py +43 -14
  126. esphome/dashboard/status/mqtt.py +22 -9
  127. esphome/dashboard/status/ping.py +54 -10
  128. esphome/dashboard/web_server.py +56 -24
  129. esphome/storage_json.py +4 -0
  130. esphome/wizard.py +13 -17
  131. esphome/writer.py +1 -3
  132. esphome/yaml_util.py +36 -33
  133. esphome/zeroconf.py +9 -21
  134. {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/METADATA +5 -5
  135. {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/RECORD +139 -99
  136. esphome/components/cst816/binary_sensor/cst816_button.h +0 -27
  137. {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/LICENSE +0 -0
  138. {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/WHEEL +0 -0
  139. {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/entry_points.txt +0 -0
  140. {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,33 @@
1
+ from esphome import pins
2
+ import esphome.codegen as cg
3
+ from esphome.components import i2c, touchscreen
4
+ import esphome.config_validation as cv
5
+ from esphome.const import CONF_ID, CONF_INTERRUPT_PIN
6
+
7
+ chsc6x_ns = cg.esphome_ns.namespace("chsc6x")
8
+
9
+ CHSC6XTouchscreen = chsc6x_ns.class_(
10
+ "CHSC6XTouchscreen",
11
+ touchscreen.Touchscreen,
12
+ i2c.I2CDevice,
13
+ )
14
+
15
+ CONFIG_SCHEMA = (
16
+ touchscreen.touchscreen_schema("100ms")
17
+ .extend(
18
+ {
19
+ cv.GenerateID(): cv.declare_id(CHSC6XTouchscreen),
20
+ cv.Optional(CONF_INTERRUPT_PIN): pins.internal_gpio_input_pin_schema,
21
+ }
22
+ )
23
+ .extend(i2c.i2c_device_schema(0x2E))
24
+ )
25
+
26
+
27
+ async def to_code(config):
28
+ var = cg.new_Pvariable(config[CONF_ID])
29
+ await touchscreen.register_touchscreen(var, config)
30
+ await i2c.register_i2c_device(var, config)
31
+
32
+ if interrupt_pin := config.get(CONF_INTERRUPT_PIN):
33
+ cg.add(var.set_interrupt_pin(await cg.gpio_pin_expression(interrupt_pin)))
@@ -128,7 +128,6 @@ VISUAL_TEMPERATURE_STEP_SCHEMA = cv.Schema(
128
128
 
129
129
 
130
130
  def visual_temperature_step(value):
131
-
132
131
  # Allow defining target/current temperature steps separately
133
132
  if isinstance(value, dict):
134
133
  return VISUAL_TEMPERATURE_STEP_SCHEMA(value)
@@ -1,28 +1,5 @@
1
- import esphome.codegen as cg
2
1
  import esphome.config_validation as cv
3
- from esphome.components import binary_sensor
4
2
 
5
- from .. import cst816_ns
6
- from ..touchscreen import CST816Touchscreen, CST816ButtonListener
7
-
8
- CONF_CST816_ID = "cst816_id"
9
-
10
- CST816Button = cst816_ns.class_(
11
- "CST816Button",
12
- binary_sensor.BinarySensor,
13
- cg.Component,
14
- CST816ButtonListener,
15
- cg.Parented.template(CST816Touchscreen),
16
- )
17
-
18
- CONFIG_SCHEMA = binary_sensor.binary_sensor_schema(CST816Button).extend(
19
- {
20
- cv.GenerateID(CONF_CST816_ID): cv.use_id(CST816Touchscreen),
21
- }
3
+ CONFIG_SCHEMA = cv.invalid(
4
+ "The CST816 binary sensor has been removed. Instead use the touchscreen binary sensor with the 'use_raw' flag set."
22
5
  )
23
-
24
-
25
- async def to_code(config):
26
- var = await binary_sensor.new_binary_sensor(config)
27
- await cg.register_component(var, config)
28
- await cg.register_parented(var, config[CONF_CST816_ID])
@@ -37,14 +37,6 @@ void CST816Touchscreen::continue_setup_() {
37
37
  ESP_LOGCONFIG(TAG, "CST816 Touchscreen setup complete");
38
38
  }
39
39
 
40
- void CST816Touchscreen::update_button_state_(bool state) {
41
- if (this->button_touched_ == state)
42
- return;
43
- this->button_touched_ = state;
44
- for (auto *listener : this->button_listeners_)
45
- listener->update_button(state);
46
- }
47
-
48
40
  void CST816Touchscreen::setup() {
49
41
  ESP_LOGCONFIG(TAG, "Setting up CST816 Touchscreen...");
50
42
  if (this->reset_pin_ != nullptr) {
@@ -68,18 +60,13 @@ void CST816Touchscreen::update_touches() {
68
60
  }
69
61
  uint8_t num_of_touches = data[REG_TOUCH_NUM] & 3;
70
62
  if (num_of_touches == 0) {
71
- this->update_button_state_(false);
72
63
  return;
73
64
  }
74
65
 
75
66
  uint16_t x = encode_uint16(data[REG_XPOS_HIGH] & 0xF, data[REG_XPOS_LOW]);
76
67
  uint16_t y = encode_uint16(data[REG_YPOS_HIGH] & 0xF, data[REG_YPOS_LOW]);
77
68
  ESP_LOGV(TAG, "Read touch %d/%d", x, y);
78
- if (x >= this->x_raw_max_) {
79
- this->update_button_state_(true);
80
- } else {
81
- this->add_raw_touch_position_(0, x, y);
82
- }
69
+ this->add_raw_touch_position_(0, x, y);
83
70
  }
84
71
 
85
72
  void CST816Touchscreen::dump_config() {
@@ -87,6 +74,8 @@ void CST816Touchscreen::dump_config() {
87
74
  LOG_I2C_DEVICE(this);
88
75
  LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
89
76
  LOG_PIN(" Reset Pin: ", this->reset_pin_);
77
+ ESP_LOGCONFIG(TAG, " X Raw Min: %d, X Raw Max: %d", this->x_raw_min_, this->x_raw_max_);
78
+ ESP_LOGCONFIG(TAG, " Y Raw Min: %d, Y Raw Max: %d", this->y_raw_min_, this->y_raw_max_);
90
79
  const char *name;
91
80
  switch (this->chip_id_) {
92
81
  case CST820_CHIP_ID:
@@ -40,7 +40,6 @@ class CST816Touchscreen : public touchscreen::Touchscreen, public i2c::I2CDevice
40
40
  public:
41
41
  void setup() override;
42
42
  void update_touches() override;
43
- void register_button_listener(CST816ButtonListener *listener) { this->button_listeners_.push_back(listener); }
44
43
  void dump_config() override;
45
44
 
46
45
  void set_interrupt_pin(InternalGPIOPin *pin) { this->interrupt_pin_ = pin; }
@@ -49,14 +48,11 @@ class CST816Touchscreen : public touchscreen::Touchscreen, public i2c::I2CDevice
49
48
 
50
49
  protected:
51
50
  void continue_setup_();
52
- void update_button_state_(bool state);
53
51
 
54
52
  InternalGPIOPin *interrupt_pin_{};
55
53
  GPIOPin *reset_pin_{};
56
54
  uint8_t chip_id_{};
57
55
  bool skip_probe_{}; // if set, do not expect to be able to probe the controller on the i2c bus.
58
- std::vector<CST816ButtonListener *> button_listeners_;
59
- bool button_touched_{};
60
56
  };
61
57
 
62
58
  } // namespace cst816
@@ -66,7 +66,9 @@ FINAL_VALIDATE_SCHEMA = esp32_ble.validate_variant
66
66
 
67
67
  async def to_code(config):
68
68
  uuid = config[CONF_UUID].hex
69
- uuid_arr = [cg.RawExpression(f"0x{uuid[i:i + 2]}") for i in range(0, len(uuid), 2)]
69
+ uuid_arr = [
70
+ cg.RawExpression(f"0x{uuid[i : i + 2]}") for i in range(0, len(uuid), 2)
71
+ ]
70
72
  var = cg.new_Pvariable(config[CONF_ID], uuid_arr)
71
73
 
72
74
  parent = await cg.get_variable(config[esp32_ble.CONF_BLE_ID])
@@ -176,9 +176,9 @@ void ESP32BLETracker::loop() {
176
176
  https://github.com/espressif/esp-idf/issues/6688
177
177
 
178
178
  */
179
- if (!connecting && !disconnecting && xSemaphoreTake(this->scan_end_lock_, 0L)) {
179
+ if (!connecting && xSemaphoreTake(this->scan_end_lock_, 0L)) {
180
180
  if (this->scan_continuous_) {
181
- if (!promote_to_connecting && !this->scan_start_failed_ && !this->scan_set_param_failed_) {
181
+ if (!disconnecting && !promote_to_connecting && !this->scan_start_failed_ && !this->scan_set_param_failed_) {
182
182
  this->start_scan_(false);
183
183
  } else {
184
184
  // We didn't start the scan, so we need to release the lock
@@ -112,8 +112,7 @@ def validate_supports(value):
112
112
  )
113
113
  if is_pullup and num == 16:
114
114
  raise cv.Invalid(
115
- "GPIO Pin 16 does not support pullup pin mode. "
116
- "Please choose another pin.",
115
+ "GPIO Pin 16 does not support pullup pin mode. Please choose another pin.",
117
116
  [CONF_MODE, CONF_PULLUP],
118
117
  )
119
118
  if is_pulldown and num != 16: