esphome 2024.10.0b1__py3-none-any.whl → 2024.10.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.
- esphome/components/cse7766/cse7766.cpp +1 -1
- esphome/components/event/__init__.py +20 -12
- esphome/components/shelly_dimmer/shelly_dimmer.cpp +32 -32
- esphome/components/shelly_dimmer/shelly_dimmer.h +2 -0
- esphome/components/touchscreen/touchscreen.cpp +2 -2
- esphome/components/web_server/web_server.cpp +7 -1
- esphome/const.py +1 -1
- {esphome-2024.10.0b1.dist-info → esphome-2024.10.0b2.dist-info}/METADATA +1 -1
- {esphome-2024.10.0b1.dist-info → esphome-2024.10.0b2.dist-info}/RECORD +13 -13
- {esphome-2024.10.0b1.dist-info → esphome-2024.10.0b2.dist-info}/LICENSE +0 -0
- {esphome-2024.10.0b1.dist-info → esphome-2024.10.0b2.dist-info}/WHEEL +0 -0
- {esphome-2024.10.0b1.dist-info → esphome-2024.10.0b2.dist-info}/entry_points.txt +0 -0
- {esphome-2024.10.0b1.dist-info → esphome-2024.10.0b2.dist-info}/top_level.txt +0 -0
@@ -244,7 +244,7 @@ void CSE7766Component::dump_config() {
|
|
244
244
|
LOG_SENSOR(" ", "Apparent Power", this->apparent_power_sensor_);
|
245
245
|
LOG_SENSOR(" ", "Reactive Power", this->reactive_power_sensor_);
|
246
246
|
LOG_SENSOR(" ", "Power Factor", this->power_factor_sensor_);
|
247
|
-
this->check_uart_settings(4800);
|
247
|
+
this->check_uart_settings(4800, 1, uart::UART_CONFIG_PARITY_EVEN);
|
248
248
|
}
|
249
249
|
|
250
250
|
} // namespace cse7766
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from esphome import automation
|
2
2
|
import esphome.codegen as cg
|
3
|
-
from esphome.components import mqtt
|
3
|
+
from esphome.components import mqtt, web_server
|
4
4
|
import esphome.config_validation as cv
|
5
5
|
from esphome.const import (
|
6
6
|
CONF_DEVICE_CLASS,
|
@@ -11,6 +11,7 @@ from esphome.const import (
|
|
11
11
|
CONF_MQTT_ID,
|
12
12
|
CONF_ON_EVENT,
|
13
13
|
CONF_TRIGGER_ID,
|
14
|
+
CONF_WEB_SERVER,
|
14
15
|
DEVICE_CLASS_BUTTON,
|
15
16
|
DEVICE_CLASS_DOORBELL,
|
16
17
|
DEVICE_CLASS_EMPTY,
|
@@ -40,17 +41,21 @@ EventTrigger = event_ns.class_("EventTrigger", automation.Trigger.template())
|
|
40
41
|
|
41
42
|
validate_device_class = cv.one_of(*DEVICE_CLASSES, lower=True, space="_")
|
42
43
|
|
43
|
-
EVENT_SCHEMA =
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
44
|
+
EVENT_SCHEMA = (
|
45
|
+
cv.ENTITY_BASE_SCHEMA.extend(web_server.WEBSERVER_SORTING_SCHEMA)
|
46
|
+
.extend(cv.MQTT_COMPONENT_SCHEMA)
|
47
|
+
.extend(
|
48
|
+
{
|
49
|
+
cv.OnlyWith(CONF_MQTT_ID, "mqtt"): cv.declare_id(mqtt.MQTTEventComponent),
|
50
|
+
cv.GenerateID(): cv.declare_id(Event),
|
51
|
+
cv.Optional(CONF_DEVICE_CLASS): validate_device_class,
|
52
|
+
cv.Optional(CONF_ON_EVENT): automation.validate_automation(
|
53
|
+
{
|
54
|
+
cv.GenerateID(CONF_TRIGGER_ID): cv.declare_id(EventTrigger),
|
55
|
+
}
|
56
|
+
),
|
57
|
+
}
|
58
|
+
)
|
54
59
|
)
|
55
60
|
|
56
61
|
_UNDEF = object()
|
@@ -97,6 +102,9 @@ async def setup_event_core_(var, config, *, event_types: list[str]):
|
|
97
102
|
mqtt_ = cg.new_Pvariable(mqtt_id, var)
|
98
103
|
await mqtt.register_mqtt_component(mqtt_, config)
|
99
104
|
|
105
|
+
if web_server_config := config.get(CONF_WEB_SERVER):
|
106
|
+
await web_server.add_entity_config(var, web_server_config)
|
107
|
+
|
100
108
|
|
101
109
|
async def register_event(var, config, *, event_types: list[str]):
|
102
110
|
if not CORE.has_id(config[CONF_ID]):
|
@@ -64,46 +64,46 @@ uint16_t shelly_dimmer_checksum(const uint8_t *buf, int len) {
|
|
64
64
|
return std::accumulate<decltype(buf), uint16_t>(buf, buf + len, 0);
|
65
65
|
}
|
66
66
|
|
67
|
-
|
68
|
-
this->
|
69
|
-
|
70
|
-
|
71
|
-
ESP_LOGI(TAG, "Initializing Shelly Dimmer...");
|
67
|
+
bool ShellyDimmer::is_running_configured_version() const {
|
68
|
+
return this->version_major_ == USE_SHD_FIRMWARE_MAJOR_VERSION &&
|
69
|
+
this->version_minor_ == USE_SHD_FIRMWARE_MINOR_VERSION;
|
70
|
+
}
|
72
71
|
|
72
|
+
void ShellyDimmer::handle_firmware() {
|
73
73
|
// Reset the STM32 and check the firmware version.
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
this->version_minor_, USE_SHD_FIRMWARE_MAJOR_VERSION, USE_SHD_FIRMWARE_MINOR_VERSION);
|
79
|
-
if (this->version_major_ != USE_SHD_FIRMWARE_MAJOR_VERSION ||
|
80
|
-
this->version_minor_ != USE_SHD_FIRMWARE_MINOR_VERSION) {
|
81
|
-
#ifdef USE_SHD_FIRMWARE_DATA
|
82
|
-
// Update firmware if needed.
|
83
|
-
ESP_LOGW(TAG, "Unsupported STM32 firmware version, flashing");
|
84
|
-
if (i > 0) {
|
85
|
-
// Upgrade was already performed but the reported version is still not right.
|
86
|
-
ESP_LOGE(TAG, "STM32 firmware upgrade already performed, but version is still incorrect");
|
87
|
-
this->mark_failed();
|
88
|
-
return;
|
89
|
-
}
|
74
|
+
this->reset_normal_boot_();
|
75
|
+
this->send_command_(SHELLY_DIMMER_PROTO_CMD_VERSION, nullptr, 0);
|
76
|
+
ESP_LOGI(TAG, "STM32 current firmware version: %d.%d, desired version: %d.%d", this->version_major_,
|
77
|
+
this->version_minor_, USE_SHD_FIRMWARE_MAJOR_VERSION, USE_SHD_FIRMWARE_MINOR_VERSION);
|
90
78
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
79
|
+
if (!is_running_configured_version()) {
|
80
|
+
#ifdef USE_SHD_FIRMWARE_DATA
|
81
|
+
if (!this->upgrade_firmware_()) {
|
82
|
+
ESP_LOGW(TAG, "Failed to upgrade firmware");
|
83
|
+
this->mark_failed();
|
84
|
+
return;
|
85
|
+
}
|
96
86
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
87
|
+
this->reset_normal_boot_();
|
88
|
+
this->send_command_(SHELLY_DIMMER_PROTO_CMD_VERSION, nullptr, 0);
|
89
|
+
if (!is_running_configured_version()) {
|
90
|
+
ESP_LOGE(TAG, "STM32 firmware upgrade already performed, but version is still incorrect");
|
101
91
|
this->mark_failed();
|
102
92
|
return;
|
103
|
-
#endif
|
104
93
|
}
|
105
|
-
|
94
|
+
#else
|
95
|
+
ESP_LOGW(TAG, "Firmware version mismatch, put 'update: true' in the yaml to flash an update.");
|
96
|
+
#endif
|
106
97
|
}
|
98
|
+
}
|
99
|
+
|
100
|
+
void ShellyDimmer::setup() {
|
101
|
+
this->pin_nrst_->setup();
|
102
|
+
this->pin_boot0_->setup();
|
103
|
+
|
104
|
+
ESP_LOGI(TAG, "Initializing Shelly Dimmer...");
|
105
|
+
|
106
|
+
this->handle_firmware();
|
107
107
|
|
108
108
|
this->send_settings_();
|
109
109
|
// Do an immediate poll to refresh current state.
|
@@ -20,6 +20,8 @@ class ShellyDimmer : public PollingComponent, public light::LightOutput, public
|
|
20
20
|
public:
|
21
21
|
float get_setup_priority() const override { return setup_priority::LATE; }
|
22
22
|
|
23
|
+
bool is_running_configured_version() const;
|
24
|
+
void handle_firmware();
|
23
25
|
void setup() override;
|
24
26
|
void update() override;
|
25
27
|
void dump_config() override;
|
@@ -18,8 +18,8 @@ void Touchscreen::attach_interrupt_(InternalGPIOPin *irq_pin, esphome::gpio::Int
|
|
18
18
|
|
19
19
|
void Touchscreen::call_setup() {
|
20
20
|
if (this->display_ != nullptr) {
|
21
|
-
this->display_width_ = this->display_->
|
22
|
-
this->display_height_ = this->display_->
|
21
|
+
this->display_width_ = this->display_->get_width();
|
22
|
+
this->display_height_ = this->display_->get_height();
|
23
23
|
}
|
24
24
|
PollingComponent::call_setup();
|
25
25
|
}
|
@@ -1443,7 +1443,7 @@ void WebServer::on_event(event::Event *obj, const std::string &event_type) {
|
|
1443
1443
|
}
|
1444
1444
|
|
1445
1445
|
std::string WebServer::event_json(event::Event *obj, const std::string &event_type, JsonDetail start_config) {
|
1446
|
-
return json::build_json([obj, event_type, start_config](JsonObject root) {
|
1446
|
+
return json::build_json([this, obj, event_type, start_config](JsonObject root) {
|
1447
1447
|
set_json_id(root, obj, "event-" + obj->get_object_id(), start_config);
|
1448
1448
|
if (!event_type.empty()) {
|
1449
1449
|
root["event_type"] = event_type;
|
@@ -1454,6 +1454,12 @@ std::string WebServer::event_json(event::Event *obj, const std::string &event_ty
|
|
1454
1454
|
event_types.add(event_type);
|
1455
1455
|
}
|
1456
1456
|
root["device_class"] = obj->get_device_class();
|
1457
|
+
if (this->sorting_entitys_.find(obj) != this->sorting_entitys_.end()) {
|
1458
|
+
root["sorting_weight"] = this->sorting_entitys_[obj].weight;
|
1459
|
+
if (this->sorting_groups_.find(this->sorting_entitys_[obj].group_id) != this->sorting_groups_.end()) {
|
1460
|
+
root["sorting_group"] = this->sorting_groups_[this->sorting_entitys_[obj].group_id].name;
|
1461
|
+
}
|
1462
|
+
}
|
1457
1463
|
}
|
1458
1464
|
});
|
1459
1465
|
}
|
esphome/const.py
CHANGED
@@ -5,7 +5,7 @@ esphome/codegen.py,sha256=GePHUM7xdXb_Pil59SHVsXg2F4VBPgkH-Fz2PDX8Z54,1873
|
|
5
5
|
esphome/config.py,sha256=ArMupdqCpKqQm-vFWb85HueI88DAfYTjuhR6mA691DI,39614
|
6
6
|
esphome/config_helpers.py,sha256=MKf_wzO35nn41FvigXE0iYKDslPgL2ruf8R-EPtTT2I,3256
|
7
7
|
esphome/config_validation.py,sha256=MeZcJrTRpe91KV5r18i6U-PeZ_Oaql81m12KW_gzCXU,66221
|
8
|
-
esphome/const.py,sha256=
|
8
|
+
esphome/const.py,sha256=5j2rexALciDIOWlhQ3DGCKi3G1MqnK7dqDT4cts7zRo,40032
|
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
|
@@ -535,7 +535,7 @@ esphome/components/cse7761/cse7761.cpp,sha256=tsZJZYSmexAqgpxgRgFPDE9x20TmPIWslW
|
|
535
535
|
esphome/components/cse7761/cse7761.h,sha256=GYUBIQqtqnCre8hcwRhLFH9jlbWVvPcaCvtOOdTZfmc,1805
|
536
536
|
esphome/components/cse7761/sensor.py,sha256=4_1oWJ_Tg0yfgTpWIvYknppGEN9sdo3PfzVEJNAMhGA,2838
|
537
537
|
esphome/components/cse7766/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
538
|
-
esphome/components/cse7766/cse7766.cpp,sha256=
|
538
|
+
esphome/components/cse7766/cse7766.cpp,sha256=1mPxd9PvGrivN4f1MYI_cL_Z1MiLPvpK6EY2mNEk7fk,7840
|
539
539
|
esphome/components/cse7766/cse7766.h,sha256=RE_q5Sa2n8PLkQsO3C9Nt11g6PS_5XBIVD1w3yvzP5o,1743
|
540
540
|
esphome/components/cse7766/sensor.py,sha256=rHZGEUgTD8j6V9u8kTKSfRWQ67HzqIeHa9YaC5j6K70,4082
|
541
541
|
esphome/components/cst226/__init__.py,sha256=Xbt13-GS0lUNexCt3EYip3UvO15P2cdJdepZWoDqBw8,130
|
@@ -866,7 +866,7 @@ esphome/components/ethernet_info/__init__.py,sha256=LoiZr_nRyJfR5w1ZWOFppOVTQRwl
|
|
866
866
|
esphome/components/ethernet_info/ethernet_info_text_sensor.cpp,sha256=nfP7xeusvbzee1KHfuipELWvF1vmuk_2e4G_NlLeJ3M,564
|
867
867
|
esphome/components/ethernet_info/ethernet_info_text_sensor.h,sha256=G0qcvZWT7GlZ_Hz_D5FAXBGnnwRVNd8KJu3E092IE2Q,2307
|
868
868
|
esphome/components/ethernet_info/text_sensor.py,sha256=TUZNQiVCiepNin6bisVrUw2-PoAQJCvkLneQNGfCigI,2392
|
869
|
-
esphome/components/event/__init__.py,sha256=
|
869
|
+
esphome/components/event/__init__.py,sha256=fk6W4AjKQXd8h-5rAzyF88C8E87Qs4h6d7-BxPSYhL8,4265
|
870
870
|
esphome/components/event/automation.h,sha256=LVrFgWVvg6ewaQFlE5KD57nd2cPx-Iv_OXXsx56GSYk,667
|
871
871
|
esphome/components/event/event.cpp,sha256=9OmqhLkMNHEu3pOoZoXqdzvt0ZyU5lLATu6FSl9BJrU,695
|
872
872
|
esphome/components/event/event.h,sha256=l5YWXG8Cf5aGmjX1W_lzE5ur_BXqJAJEvgIS6HInWIY,1198
|
@@ -2444,8 +2444,8 @@ esphome/components/sgp4x/sgp4x.h,sha256=wUlfVIHreIqDNS6rO_QJo91-9xhj6NIEeC1zQ81y
|
|
2444
2444
|
esphome/components/shelly_dimmer/__init__.py,sha256=eeBqDV3Pg3-RwlArBG37jYjeYuRqLMwZU3D-zLfs0ws,37
|
2445
2445
|
esphome/components/shelly_dimmer/dev_table.h,sha256=ByBoXa1go3FvcbeTCTDza4vGI4EEQuCJoMJeeyL7ex8,8731
|
2446
2446
|
esphome/components/shelly_dimmer/light.py,sha256=XGD_h73CnIMeh8tvqoZ4MQrNarqRkVnBo2CrJ0NQIXo,7385
|
2447
|
-
esphome/components/shelly_dimmer/shelly_dimmer.cpp,sha256=
|
2448
|
-
esphome/components/shelly_dimmer/shelly_dimmer.h,sha256=
|
2447
|
+
esphome/components/shelly_dimmer/shelly_dimmer.cpp,sha256=DHxDGXG1wptnHOLU6VQHKJkswCBwiMZBWxYqPhbv5eA,15461
|
2448
|
+
esphome/components/shelly_dimmer/shelly_dimmer.h,sha256=zWAxQ-wvnWFDe_YWv4px9gq_qzjfN3rAI2OMc1YIJFA,3912
|
2449
2449
|
esphome/components/shelly_dimmer/stm32flash.cpp,sha256=1S0uVw5geIHYT9D30xcpfH6Wgm23HNXBmQvmeGQ1I-E,33319
|
2450
2450
|
esphome/components/shelly_dimmer/stm32flash.h,sha256=_2W7HaCS0uHvRtmsF27Dh_3XznqnUyIg9vtqoBeENJQ,4725
|
2451
2451
|
esphome/components/sht3xd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -2875,7 +2875,7 @@ esphome/components/total_daily_energy/sensor.py,sha256=tzKInzFLBSaVh0555Rh_3bUKF
|
|
2875
2875
|
esphome/components/total_daily_energy/total_daily_energy.cpp,sha256=q_jsZ1F1rKsN4dOdLH-RHogPH7Hcdbp_42D_lph8SUs,2073
|
2876
2876
|
esphome/components/total_daily_energy/total_daily_energy.h,sha256=HFg_bjSgvlTifRms3D6LziyPX5YrU7aeGnRZ6kIPu94,1307
|
2877
2877
|
esphome/components/touchscreen/__init__.py,sha256=zcKoX8KsWKbktHKaGC5adCzIIJrguQ3ibCYF4EDJSDY,5370
|
2878
|
-
esphome/components/touchscreen/touchscreen.cpp,sha256=
|
2878
|
+
esphome/components/touchscreen/touchscreen.cpp,sha256=FDUM8gzT3oNVRKEdh45zNjnBrH3O7oyZ31BDPltp1d8,4942
|
2879
2879
|
esphome/components/touchscreen/touchscreen.h,sha256=aV7hVA0XxF1QsmbuJYdDwiS_3HP5g5d-BoKQhNdTCDI,3681
|
2880
2880
|
esphome/components/touchscreen/binary_sensor/__init__.py,sha256=9PC8Ko1SXjLaGeMk-BtcubaG2ZgJHoOMwRAnXjc7BBw,2407
|
2881
2881
|
esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.cpp,sha256=Iqnt9p2FGsaAhP2-ruoNUc0VV-T8omYhak0b7b6DhP4,800
|
@@ -3061,7 +3061,7 @@ esphome/components/web_server/list_entities.cpp,sha256=KZPiwuVT17wTxTJ0dwNt8alxF
|
|
3061
3061
|
esphome/components/web_server/list_entities.h,sha256=y-y1d5Pi_e0o2vHk257KelJY4HoyK7xvL_WdWH6aRaU,2077
|
3062
3062
|
esphome/components/web_server/server_index_v2.h,sha256=klUL1lEbo_YN_Mrx48tFu9LNmunGJfZyzGYO8adEWVo,74318
|
3063
3063
|
esphome/components/web_server/server_index_v3.h,sha256=ISSZbq8VzjfnI3a4D8myDM0iGRQ7LWUVriHVGjz2pVs,473726
|
3064
|
-
esphome/components/web_server/web_server.cpp,sha256=
|
3064
|
+
esphome/components/web_server/web_server.cpp,sha256=lx1nIOIxFg6xtRHtXKyrlADJ4-fds-jjdk29mYMaNV4,64876
|
3065
3065
|
esphome/components/web_server/web_server.h,sha256=pUcK_p6ehhVoevr64_YEyyEA3qgxdnsO0PK5gmoXFgg,13767
|
3066
3066
|
esphome/components/web_server/web_server_v1.cpp,sha256=Ri32qveJXRPxCpgWz-0Eo3it2yIdVWb5NkRVzokQJLw,7213
|
3067
3067
|
esphome/components/web_server_base/__init__.py,sha256=mY9m_IS1ifiay-fYqDumRw8QJdhbcONCovAMIh42n2k,1122
|
@@ -3309,9 +3309,9 @@ esphome/dashboard/util/itertools.py,sha256=8eLrWEWmICLtXNxkKdYPQV0c_N4GEz8m9Npnb
|
|
3309
3309
|
esphome/dashboard/util/password.py,sha256=cQz3b9B-ijTe7zS6BeCW0hc3pWv6JjC78jmnycYYAh8,321
|
3310
3310
|
esphome/dashboard/util/subprocess.py,sha256=T8EW6dbU4LPd2DG1dRrdh8li71tt6J1isn411poMhkk,1022
|
3311
3311
|
esphome/dashboard/util/text.py,sha256=ENDnfN4O0NdA3CKVJjQYabFbwbrsIhVKrAMQe53qYu4,534
|
3312
|
-
esphome-2024.10.
|
3313
|
-
esphome-2024.10.
|
3314
|
-
esphome-2024.10.
|
3315
|
-
esphome-2024.10.
|
3316
|
-
esphome-2024.10.
|
3317
|
-
esphome-2024.10.
|
3312
|
+
esphome-2024.10.0b2.dist-info/LICENSE,sha256=HzEjkBInJe44L4WvAOPfhPJJDNj6YbnqFyvGWRzArGM,36664
|
3313
|
+
esphome-2024.10.0b2.dist-info/METADATA,sha256=3XcF-m77uFAKDxzRZlmFRVDAIY7AAB1FRsVqzxcaDR4,3409
|
3314
|
+
esphome-2024.10.0b2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
3315
|
+
esphome-2024.10.0b2.dist-info/entry_points.txt,sha256=mIxVNuWtbYzeEcaWCl-AQ-97aBOWbnYBAK8nbF6P4M0,50
|
3316
|
+
esphome-2024.10.0b2.dist-info/top_level.txt,sha256=0GSXEW3cnITpgG3qnsSMz0qoqJHAFyfw7Y8MVtEf1Yk,8
|
3317
|
+
esphome-2024.10.0b2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|