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.
- esphome/__main__.py +9 -1
- esphome/components/api/api_connection.cpp +426 -70
- esphome/components/api/api_connection.h +117 -25
- esphome/components/api/api_pb2.cpp +9 -0
- esphome/components/api/api_pb2.h +1 -0
- esphome/components/api/api_server.cpp +2 -2
- esphome/components/api/list_entities.cpp +76 -22
- esphome/components/api/list_entities.h +1 -0
- esphome/components/api/subscribe_state.h +2 -0
- esphome/components/audio/audio_reader.cpp +7 -7
- esphome/components/audio/audio_reader.h +1 -1
- esphome/components/bluetooth_proxy/bluetooth_proxy.h +8 -0
- esphome/components/bmp085/bmp085.cpp +1 -1
- esphome/components/chsc6x/__init__.py +2 -0
- esphome/components/chsc6x/chsc6x_touchscreen.cpp +47 -0
- esphome/components/chsc6x/chsc6x_touchscreen.h +34 -0
- esphome/components/chsc6x/touchscreen.py +33 -0
- esphome/components/climate/__init__.py +0 -1
- esphome/components/cst816/binary_sensor/__init__.py +2 -25
- esphome/components/cst816/touchscreen/cst816_touchscreen.cpp +3 -14
- esphome/components/cst816/touchscreen/cst816_touchscreen.h +0 -4
- esphome/components/esp32_ble_beacon/__init__.py +3 -1
- esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +2 -2
- esphome/components/esp8266/gpio.py +1 -2
- esphome/components/font/__init__.py +185 -185
- esphome/components/font/font.cpp +4 -4
- esphome/components/font/font.h +1 -0
- esphome/components/haier/climate.py +11 -10
- esphome/components/hbridge/switch/hbridge_switch.cpp +2 -2
- esphome/components/heatpumpir/climate.py +2 -1
- esphome/components/heatpumpir/heatpumpir.cpp +1 -0
- esphome/components/heatpumpir/heatpumpir.h +1 -0
- esphome/components/i2c/__init__.py +6 -6
- esphome/components/i2c/i2c_bus_esp_idf.cpp +6 -2
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +1 -1
- esphome/components/ili9xxx/display.py +1 -0
- esphome/components/ili9xxx/ili9xxx_display.h +5 -0
- esphome/components/ili9xxx/ili9xxx_init.h +59 -0
- esphome/components/ld2450/__init__.py +51 -0
- esphome/components/ld2450/binary_sensor.py +47 -0
- esphome/components/ld2450/button/__init__.py +45 -0
- esphome/components/ld2450/button/reset_button.cpp +9 -0
- esphome/components/ld2450/button/reset_button.h +18 -0
- esphome/components/ld2450/button/restart_button.cpp +9 -0
- esphome/components/ld2450/button/restart_button.h +18 -0
- esphome/components/ld2450/ld2450.cpp +876 -0
- esphome/components/ld2450/ld2450.h +234 -0
- esphome/components/ld2450/number/__init__.py +121 -0
- esphome/components/ld2450/number/presence_timeout_number.cpp +12 -0
- esphome/components/ld2450/number/presence_timeout_number.h +18 -0
- esphome/components/ld2450/number/zone_coordinate_number.cpp +14 -0
- esphome/components/ld2450/number/zone_coordinate_number.h +19 -0
- esphome/components/ld2450/select/__init__.py +56 -0
- esphome/components/ld2450/select/baud_rate_select.cpp +12 -0
- esphome/components/ld2450/select/baud_rate_select.h +18 -0
- esphome/components/ld2450/select/zone_type_select.cpp +12 -0
- esphome/components/ld2450/select/zone_type_select.h +18 -0
- esphome/components/ld2450/sensor.py +156 -0
- esphome/components/ld2450/switch/__init__.py +45 -0
- esphome/components/ld2450/switch/bluetooth_switch.cpp +12 -0
- esphome/components/ld2450/switch/bluetooth_switch.h +18 -0
- esphome/components/ld2450/switch/multi_target_switch.cpp +12 -0
- esphome/components/ld2450/switch/multi_target_switch.h +18 -0
- esphome/components/ld2450/text_sensor.py +62 -0
- esphome/components/ltr390/ltr390.cpp +7 -7
- esphome/components/ltr390/ltr390.h +0 -1
- esphome/components/lvgl/defines.py +0 -2
- esphome/components/lvgl/font.cpp +1 -1
- esphome/components/lvgl/lvgl_esphome.cpp +27 -19
- esphome/components/lvgl/widgets/img.py +1 -3
- esphome/components/mcp2515/mcp2515.cpp +1 -0
- esphome/components/mlx90393/sensor.py +53 -33
- esphome/components/mlx90393/sensor_mlx90393.cpp +4 -0
- esphome/components/mlx90393/sensor_mlx90393.h +8 -3
- esphome/components/mqtt/__init__.py +2 -2
- esphome/components/msa3xx/__init__.py +189 -0
- esphome/components/msa3xx/binary_sensor.py +40 -0
- esphome/components/msa3xx/msa3xx.cpp +417 -0
- esphome/components/msa3xx/msa3xx.h +311 -0
- esphome/components/msa3xx/sensor.py +42 -0
- esphome/components/msa3xx/text_sensor.py +38 -0
- esphome/components/nfc/binary_sensor/__init__.py +4 -4
- esphome/components/opentherm/binary_sensor/__init__.py +4 -4
- esphome/components/opentherm/generate.py +6 -6
- esphome/components/opentherm/sensor/__init__.py +5 -6
- esphome/components/packages/__init__.py +35 -11
- esphome/components/pn532/binary_sensor.py +4 -4
- esphome/components/rc522/binary_sensor.py +4 -4
- esphome/components/socket/bsd_sockets_impl.cpp +1 -0
- esphome/components/socket/lwip_sockets_impl.cpp +1 -0
- esphome/components/socket/socket.h +3 -1
- esphome/components/ssd1306_base/__init__.py +7 -7
- esphome/components/thermostat/climate.py +1 -1
- esphome/components/tmp1075/tmp1075.cpp +7 -11
- esphome/components/tmp1075/tmp1075.h +1 -2
- esphome/components/tormatic/__init__.py +1 -0
- esphome/components/tormatic/cover.py +47 -0
- esphome/components/tormatic/tormatic_cover.cpp +355 -0
- esphome/components/tormatic/tormatic_cover.h +60 -0
- esphome/components/tormatic/tormatic_protocol.h +211 -0
- esphome/components/touchscreen/binary_sensor/__init__.py +3 -0
- esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.cpp +7 -1
- esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.h +3 -1
- esphome/components/touchscreen/touchscreen.cpp +3 -4
- esphome/components/udp/udp_component.h +4 -1
- esphome/components/web_server/list_entities.cpp +70 -66
- esphome/components/web_server/list_entities.h +43 -22
- esphome/components/web_server/web_server.cpp +345 -68
- esphome/components/web_server/web_server.h +138 -6
- esphome/components/web_server_base/__init__.py +1 -1
- esphome/components/web_server_idf/__init__.py +2 -0
- esphome/components/web_server_idf/web_server_idf.cpp +177 -30
- esphome/components/web_server_idf/web_server_idf.h +53 -4
- esphome/config_validation.py +23 -125
- esphome/const.py +5 -1
- esphome/core/config.py +12 -4
- esphome/core/defines.h +1 -1
- esphome/core/helpers.h +5 -3
- esphome/core/time.cpp +1 -0
- esphome/cpp_generator.py +3 -3
- esphome/dashboard/core.py +30 -21
- esphome/dashboard/dns.py +7 -1
- esphome/dashboard/entries.py +83 -16
- esphome/dashboard/settings.py +0 -4
- esphome/dashboard/status/mdns.py +43 -14
- esphome/dashboard/status/mqtt.py +22 -9
- esphome/dashboard/status/ping.py +54 -10
- esphome/dashboard/web_server.py +56 -24
- esphome/storage_json.py +4 -0
- esphome/wizard.py +13 -17
- esphome/writer.py +1 -3
- esphome/yaml_util.py +36 -33
- esphome/zeroconf.py +9 -21
- {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/METADATA +5 -5
- {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/RECORD +139 -99
- esphome/components/cst816/binary_sensor/cst816_button.h +0 -27
- {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/LICENSE +0 -0
- {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/WHEEL +0 -0
- {esphome-2025.2.1.dist-info → esphome-2025.3.0b1.dist-info}/entry_points.txt +0 -0
- {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)))
|
@@ -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
|
-
|
6
|
-
|
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
|
-
|
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 = [
|
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 &&
|
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:
|