esphome 2024.7.2__py3-none-any.whl → 2024.8.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.
- esphome/__main__.py +15 -81
- esphome/automation.py +1 -1
- esphome/codegen.py +53 -53
- esphome/components/ade7953/sensor.py +1 -1
- esphome/components/ade7953_spi/ade7953_spi.cpp +1 -1
- esphome/components/airthings_wave_plus/airthings_wave_plus.cpp +5 -2
- esphome/components/airthings_wave_plus/airthings_wave_plus.h +2 -0
- esphome/components/airthings_wave_plus/sensor.py +12 -0
- esphome/components/alarm_control_panel/__init__.py +75 -66
- esphome/components/apds9306/__init__.py +4 -0
- esphome/components/apds9306/apds9306.cpp +151 -0
- esphome/components/apds9306/apds9306.h +66 -0
- esphome/components/apds9306/sensor.py +95 -0
- esphome/components/api/__init__.py +80 -52
- esphome/components/api/api_connection.cpp +14 -1
- esphome/components/api/api_pb2.cpp +33 -4
- esphome/components/api/api_pb2.h +8 -1
- esphome/components/api/api_server.cpp +10 -0
- esphome/components/api/api_server.h +3 -0
- esphome/components/atm90e32/__init__.py +7 -0
- esphome/components/atm90e32/atm90e32.cpp +68 -16
- esphome/components/atm90e32/atm90e32.h +20 -7
- esphome/components/atm90e32/atm90e32_reg.h +2 -0
- esphome/components/atm90e32/button/__init__.py +43 -0
- esphome/components/atm90e32/button/atm90e32_button.cpp +20 -0
- esphome/components/atm90e32/button/atm90e32_button.h +27 -0
- esphome/components/atm90e32/sensor.py +15 -11
- esphome/components/bedjet/bedjet_codec.h +1 -1
- esphome/components/binary/light/binary_light_output.h +3 -2
- esphome/components/binary_sensor/__init__.py +5 -5
- esphome/components/ble_client/__init__.py +3 -3
- esphome/components/ble_client/output/__init__.py +1 -1
- esphome/components/ble_client/sensor/__init__.py +4 -3
- esphome/components/ble_client/switch/__init__.py +2 -1
- esphome/components/ble_client/text_sensor/__init__.py +4 -3
- esphome/components/ble_presence/binary_sensor.py +3 -3
- esphome/components/ble_rssi/sensor.py +2 -2
- esphome/components/ble_scanner/text_sensor.py +1 -1
- esphome/components/bluetooth_proxy/__init__.py +3 -3
- esphome/components/bme68x_bsec2/__init__.py +196 -0
- esphome/components/bme68x_bsec2/bme68x_bsec2.cpp +523 -0
- esphome/components/bme68x_bsec2/bme68x_bsec2.h +163 -0
- esphome/components/bme68x_bsec2/sensor.py +130 -0
- esphome/components/bme68x_bsec2/text_sensor.py +33 -0
- esphome/components/bme68x_bsec2_i2c/__init__.py +28 -0
- esphome/components/bme68x_bsec2_i2c/bme68x_bsec2_i2c.cpp +53 -0
- esphome/components/bme68x_bsec2_i2c/bme68x_bsec2_i2c.h +28 -0
- esphome/components/bmp3xx/sensor.py +1 -1
- esphome/components/button/__init__.py +4 -4
- esphome/components/climate/__init__.py +5 -5
- esphome/components/climate/climate.h +1 -1
- esphome/components/cover/__init__.py +8 -8
- esphome/components/cst226/touchscreen/cst226_touchscreen.cpp +11 -7
- esphome/components/cst226/touchscreen/cst226_touchscreen.h +1 -1
- esphome/components/datetime/__init__.py +11 -13
- esphome/components/demo/demo_sensor.h +3 -2
- esphome/components/display/display.cpp +31 -0
- esphome/components/display/display.h +3 -0
- esphome/components/display_menu_base/__init__.py +14 -13
- esphome/components/ens160/sensor.py +1 -1
- esphome/components/esp32/__init__.py +22 -10
- esphome/components/esp32/boards.py +1 -1
- esphome/components/esp32/gpio.py +12 -13
- esphome/components/esp32/gpio_esp32.py +1 -2
- esphome/components/esp32/gpio_esp32_c2.py +1 -2
- esphome/components/esp32/gpio_esp32_c3.py +1 -5
- esphome/components/esp32/gpio_esp32_c6.py +1 -2
- esphome/components/esp32/gpio_esp32_h2.py +1 -2
- esphome/components/esp32/gpio_esp32_s2.py +1 -2
- esphome/components/esp32/gpio_esp32_s3.py +1 -6
- esphome/components/esp32_ble/__init__.py +20 -3
- esphome/components/esp32_ble/ble.cpp +9 -1
- esphome/components/esp32_ble/ble.h +9 -0
- esphome/components/esp32_ble/ble_advertising.cpp +42 -9
- esphome/components/esp32_ble/ble_advertising.h +21 -1
- esphome/components/esp32_ble_beacon/__init__.py +17 -7
- esphome/components/esp32_ble_beacon/esp32_ble_beacon.cpp +45 -113
- esphome/components/esp32_ble_beacon/esp32_ble_beacon.h +17 -19
- esphome/components/esp32_ble_client/__init__.py +0 -1
- esphome/components/esp32_ble_server/__init__.py +2 -3
- esphome/components/esp32_ble_tracker/__init__.py +2 -2
- esphome/components/esp32_improv/__init__.py +2 -4
- esphome/components/ethernet/__init__.py +17 -17
- esphome/components/ethernet_info/text_sensor.py +2 -2
- esphome/components/event/__init__.py +5 -5
- esphome/components/fan/__init__.py +14 -14
- esphome/components/fan/fan.cpp +2 -2
- esphome/components/fingerprint_grow/fingerprint_grow.cpp +1 -1
- esphome/components/fingerprint_grow/fingerprint_grow.h +1 -1
- esphome/components/graphical_display_menu/__init__.py +11 -8
- esphome/components/haier/haier_base.h +2 -2
- esphome/components/homeassistant/__init__.py +8 -1
- esphome/components/homeassistant/number/__init__.py +33 -0
- esphome/components/homeassistant/number/homeassistant_number.cpp +100 -0
- esphome/components/homeassistant/number/homeassistant_number.h +31 -0
- esphome/components/homeassistant/switch/__init__.py +30 -0
- esphome/components/homeassistant/switch/homeassistant_switch.cpp +59 -0
- esphome/components/homeassistant/switch/homeassistant_switch.h +22 -0
- esphome/components/host/__init__.py +3 -7
- esphome/components/http_request/__init__.py +12 -1
- esphome/components/http_request/http_request_arduino.cpp +2 -2
- esphome/components/http_request/http_request_idf.cpp +11 -2
- esphome/components/http_request/http_request_idf.h +10 -0
- esphome/components/http_request/ota/ota_http_request.cpp +1 -1
- esphome/components/http_request/update/http_request_update.cpp +2 -2
- esphome/components/http_request/update/http_request_update.h +2 -1
- esphome/components/hx711/hx711.cpp +10 -1
- esphome/components/hydreon_rgxx/hydreon_rgxx.cpp +1 -1
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +11 -2
- esphome/components/i2s_audio/speaker/i2s_audio_speaker.h +2 -0
- esphome/components/ili9xxx/ili9xxx_defines.h +3 -1
- esphome/components/ili9xxx/ili9xxx_display.cpp +9 -22
- esphome/components/ili9xxx/ili9xxx_display.h +5 -7
- esphome/components/ili9xxx/ili9xxx_init.h +4 -4
- esphome/components/improv_base/__init__.py +2 -3
- esphome/components/improv_serial/__init__.py +4 -10
- esphome/components/improv_serial/improv_serial_component.cpp +4 -0
- esphome/components/jsn_sr04t/jsn_sr04t.cpp +18 -1
- esphome/components/jsn_sr04t/jsn_sr04t.h +7 -1
- esphome/components/jsn_sr04t/sensor.py +13 -0
- esphome/components/kalman_combinator/sensor.py +1 -1
- esphome/components/light/__init__.py +16 -15
- esphome/components/light/addressable_light_effect.h +12 -8
- esphome/components/light/automation.h +16 -1
- esphome/components/light/automation.py +21 -0
- esphome/components/light/base_light_effects.h +5 -5
- esphome/components/light/esp_color_correction.h +8 -8
- esphome/components/light/types.py +7 -0
- esphome/components/lock/__init__.py +3 -3
- esphome/components/logger/__init__.py +15 -18
- esphome/components/lvgl/__init__.py +346 -0
- esphome/components/lvgl/automation.py +226 -0
- esphome/components/lvgl/binary_sensor/__init__.py +43 -0
- esphome/components/lvgl/defines.py +508 -0
- esphome/components/lvgl/encoders.py +77 -0
- esphome/components/lvgl/font.cpp +76 -0
- esphome/components/lvgl/helpers.py +49 -0
- esphome/components/lvgl/light/__init__.py +32 -0
- esphome/components/lvgl/light/lvgl_light.h +48 -0
- esphome/components/lvgl/lv_validation.py +303 -0
- esphome/components/lvgl/lvcode.py +349 -0
- esphome/components/lvgl/lvgl_esphome.cpp +407 -0
- esphome/components/lvgl/lvgl_esphome.h +274 -0
- esphome/components/lvgl/lvgl_hal.h +21 -0
- esphome/components/lvgl/number/__init__.py +66 -0
- esphome/components/lvgl/number/lvgl_number.h +34 -0
- esphome/components/lvgl/schemas.py +436 -0
- esphome/components/lvgl/select/__init__.py +55 -0
- esphome/components/lvgl/select/lvgl_select.h +62 -0
- esphome/components/lvgl/sensor/__init__.py +47 -0
- esphome/components/lvgl/styles.py +58 -0
- esphome/components/lvgl/switch/__init__.py +56 -0
- esphome/components/lvgl/switch/lvgl_switch.h +34 -0
- esphome/components/lvgl/text/__init__.py +50 -0
- esphome/components/lvgl/text/lvgl_text.h +34 -0
- esphome/components/lvgl/text_sensor/__init__.py +42 -0
- esphome/components/lvgl/touchscreens.py +45 -0
- esphome/components/lvgl/trigger.py +74 -0
- esphome/components/lvgl/types.py +191 -0
- esphome/components/lvgl/widgets/__init__.py +419 -0
- esphome/components/lvgl/widgets/animimg.py +117 -0
- esphome/components/lvgl/widgets/arc.py +78 -0
- esphome/components/lvgl/widgets/button.py +20 -0
- esphome/components/lvgl/widgets/buttonmatrix.py +275 -0
- esphome/components/lvgl/widgets/checkbox.py +27 -0
- esphome/components/lvgl/widgets/dropdown.py +76 -0
- esphome/components/lvgl/widgets/img.py +85 -0
- esphome/components/lvgl/widgets/keyboard.py +49 -0
- esphome/components/lvgl/widgets/label.py +42 -0
- esphome/components/lvgl/widgets/led.py +29 -0
- esphome/components/lvgl/widgets/line.py +50 -0
- esphome/components/lvgl/widgets/lv_bar.py +55 -0
- esphome/components/lvgl/widgets/meter.py +302 -0
- esphome/components/lvgl/widgets/msgbox.py +134 -0
- esphome/components/lvgl/widgets/obj.py +28 -0
- esphome/components/lvgl/widgets/page.py +113 -0
- esphome/components/lvgl/widgets/roller.py +77 -0
- esphome/components/lvgl/widgets/slider.py +63 -0
- esphome/components/lvgl/widgets/spinbox.py +178 -0
- esphome/components/lvgl/widgets/spinner.py +43 -0
- esphome/components/lvgl/widgets/switch.py +20 -0
- esphome/components/lvgl/widgets/tabview.py +114 -0
- esphome/components/lvgl/widgets/textarea.py +66 -0
- esphome/components/lvgl/widgets/tileview.py +128 -0
- esphome/components/m5stack_8angle/__init__.py +33 -0
- esphome/components/m5stack_8angle/binary_sensor/__init__.py +30 -0
- esphome/components/m5stack_8angle/binary_sensor/m5stack_8angle_binary_sensor.cpp +17 -0
- esphome/components/m5stack_8angle/binary_sensor/m5stack_8angle_binary_sensor.h +19 -0
- esphome/components/m5stack_8angle/light/__init__.py +31 -0
- esphome/components/m5stack_8angle/light/m5stack_8angle_light.cpp +45 -0
- esphome/components/m5stack_8angle/light/m5stack_8angle_light.h +37 -0
- esphome/components/m5stack_8angle/m5stack_8angle.cpp +74 -0
- esphome/components/m5stack_8angle/m5stack_8angle.h +34 -0
- esphome/components/m5stack_8angle/sensor/__init__.py +66 -0
- esphome/components/m5stack_8angle/sensor/m5stack_8angle_sensor.cpp +24 -0
- esphome/components/m5stack_8angle/sensor/m5stack_8angle_sensor.h +27 -0
- esphome/components/matrix_keypad/matrix_keypad.cpp +2 -0
- esphome/components/max31856/sensor.py +5 -5
- esphome/components/media_player/__init__.py +3 -5
- esphome/components/media_player/automation.h +31 -27
- esphome/components/micro_wake_word/__init__.py +20 -25
- esphome/components/micro_wake_word/streaming_model.cpp +6 -4
- esphome/components/microphone/microphone.h +4 -1
- esphome/components/mitsubishi/mitsubishi.cpp +7 -1
- esphome/components/modbus_controller/__init__.py +26 -2
- esphome/components/modbus_controller/automation.h +19 -0
- esphome/components/modbus_controller/const.py +1 -0
- esphome/components/modbus_controller/modbus_controller.cpp +8 -0
- esphome/components/modbus_controller/modbus_controller.h +3 -0
- esphome/components/mqtt/__init__.py +20 -9
- esphome/components/mqtt/mqtt_alarm_control_panel.cpp +128 -0
- esphome/components/mqtt/mqtt_alarm_control_panel.h +39 -0
- esphome/components/mqtt/mqtt_backend.h +3 -1
- esphome/components/mqtt/mqtt_backend_esp32.cpp +4 -1
- esphome/components/mqtt/mqtt_backend_esp32.h +3 -1
- esphome/components/mqtt/mqtt_backend_esp8266.h +3 -1
- esphome/components/mqtt/mqtt_backend_libretiny.h +3 -1
- esphome/components/mqtt/mqtt_client.cpp +16 -3
- esphome/components/mqtt/mqtt_client.h +5 -1
- esphome/components/mqtt/mqtt_component.cpp +32 -4
- esphome/components/mqtt/mqtt_const.h +2 -0
- esphome/components/network/__init__.py +15 -12
- esphome/components/network/ip_address.h +3 -0
- esphome/components/network/util.cpp +2 -1
- esphome/components/network/util.h +3 -1
- esphome/components/nextion/base_component.py +5 -8
- esphome/components/number/__init__.py +7 -8
- esphome/components/online_image/__init__.py +167 -0
- esphome/components/online_image/image_decoder.cpp +44 -0
- esphome/components/online_image/image_decoder.h +112 -0
- esphome/components/online_image/online_image.cpp +283 -0
- esphome/components/online_image/online_image.h +195 -0
- esphome/components/online_image/png_image.cpp +68 -0
- esphome/components/online_image/png_image.h +33 -0
- esphome/components/ota/__init__.py +8 -4
- esphome/components/pid/pid_climate.h +2 -0
- esphome/components/pmwcs3/pmwcs3.cpp +31 -30
- esphome/components/remote_base/pronto_protocol.cpp +0 -3
- esphome/components/remote_transmitter/remote_transmitter.h +1 -1
- esphome/components/rgbct/rgbct_light_output.h +3 -2
- esphome/components/rgbw/rgbw_light_output.h +3 -2
- esphome/components/rgbww/rgbww_light_output.h +3 -2
- esphome/components/rp2040_pio_led_strip/led_strip.cpp +31 -5
- esphome/components/rp2040_pio_led_strip/led_strip.h +5 -0
- esphome/components/rtttl/rtttl.cpp +108 -21
- esphome/components/rtttl/rtttl.h +15 -6
- esphome/components/select/__init__.py +7 -7
- esphome/components/sensor/__init__.py +29 -10
- esphome/components/sensor/filter.cpp +8 -0
- esphome/components/sensor/filter.h +9 -0
- esphome/components/sml/sml_parser.cpp +48 -22
- esphome/components/socket/socket.cpp +11 -14
- esphome/components/speaker/__init__.py +14 -5
- esphome/components/speaker/automation.h +10 -0
- esphome/components/speaker/speaker.h +9 -0
- esphome/components/spi/spi.cpp +0 -6
- esphome/components/spi/spi.h +2 -19
- esphome/components/spi_led_strip/spi_led_strip.h +5 -4
- esphome/components/sprinkler/sprinkler.cpp +2 -2
- esphome/components/sprinkler/sprinkler.h +1 -1
- esphome/components/switch/__init__.py +3 -3
- esphome/components/text/__init__.py +5 -5
- esphome/components/text_sensor/__init__.py +7 -7
- esphome/components/time/__init__.py +8 -8
- esphome/components/touchscreen/binary_sensor/__init__.py +24 -10
- esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.cpp +3 -2
- esphome/components/touchscreen/binary_sensor/touchscreen_binary_sensor.h +4 -2
- esphome/components/uart/uart_component_host.cpp +6 -2
- esphome/components/update/__init__.py +33 -15
- esphome/components/update/automation.h +23 -0
- esphome/components/update/update_entity.h +3 -1
- esphome/components/valve/__init__.py +3 -3
- esphome/components/voice_assistant/__init__.py +7 -8
- esphome/components/wake_on_lan/wake_on_lan.cpp +2 -0
- esphome/components/wake_on_lan/wake_on_lan.h +3 -1
- esphome/components/watchdog/__init__.py +1 -0
- esphome/components/{http_request → watchdog}/watchdog.cpp +0 -2
- esphome/components/{http_request → watchdog}/watchdog.h +0 -2
- esphome/components/waveshare_epaper/waveshare_epaper.cpp +5 -5
- esphome/components/web_server/server_index_v3.h +3615 -3603
- esphome/components/web_server/web_server.cpp +0 -209
- esphome/components/web_server/web_server.h +1 -1
- esphome/components/web_server/web_server_v1.cpp +217 -0
- esphome/components/web_server_base/web_server_base.h +1 -0
- esphome/components/wifi/__init__.py +15 -14
- esphome/components/wifi/wifi_component.cpp +2 -0
- esphome/components/wifi/wifi_component.h +7 -1
- esphome/components/wifi/wifi_component_esp32_arduino.cpp +5 -2
- esphome/components/wifi/wifi_component_esp8266.cpp +2 -0
- esphome/components/wifi/wifi_component_esp_idf.cpp +43 -7
- esphome/components/wifi/wifi_component_libretiny.cpp +2 -0
- esphome/components/wifi/wifi_component_pico_w.cpp +2 -0
- esphome/components/wifi/wpa2_eap.py +6 -7
- esphome/components/wifi_info/text_sensor.py +3 -3
- esphome/components/wifi_info/wifi_info_text_sensor.cpp +2 -0
- esphome/components/wifi_info/wifi_info_text_sensor.h +2 -0
- esphome/components/wifi_signal/sensor.py +1 -1
- esphome/components/wifi_signal/wifi_signal_sensor.cpp +2 -0
- esphome/components/wifi_signal/wifi_signal_sensor.h +2 -1
- esphome/components/xiaomi_ble/xiaomi_ble.cpp +20 -3
- esphome/components/xiaomi_ble/xiaomi_ble.h +1 -0
- esphome/components/xiaomi_lywsd02mmc/__init__.py +0 -0
- esphome/components/xiaomi_lywsd02mmc/sensor.py +77 -0
- esphome/components/xiaomi_lywsd02mmc/xiaomi_lywsd02mmc.cpp +73 -0
- esphome/components/xiaomi_lywsd02mmc/xiaomi_lywsd02mmc.h +37 -0
- esphome/config.py +17 -19
- esphome/config_validation.py +55 -23
- esphome/const.py +25 -9
- esphome/core/__init__.py +17 -14
- esphome/core/application.h +42 -21
- esphome/core/automation.h +5 -3
- esphome/core/base_automation.h +3 -2
- esphome/core/bytebuffer.cpp +134 -0
- esphome/core/bytebuffer.h +96 -0
- esphome/core/color.h +24 -16
- esphome/core/config.py +3 -3
- esphome/core/defines.h +14 -1
- esphome/core/entity_base.h +2 -2
- esphome/core/entity_helpers.py +1 -2
- esphome/core/gpio.h +0 -18
- esphome/core/helpers.h +1 -1
- esphome/core/optional.h +15 -16
- esphome/coroutine.py +1 -1
- esphome/cpp_generator.py +1 -1
- esphome/cpp_helpers.py +3 -5
- esphome/dashboard/core.py +3 -3
- esphome/dashboard/dashboard.py +3 -3
- esphome/dashboard/entries.py +1 -1
- esphome/dashboard/util/file.py +1 -1
- esphome/dashboard/web_server.py +3 -3
- esphome/external_files.py +5 -3
- esphome/final_validate.py +2 -2
- esphome/git.py +4 -4
- esphome/helpers.py +5 -5
- esphome/loader.py +15 -10
- esphome/mqtt.py +4 -8
- esphome/pins.py +6 -6
- esphome/platformio_api.py +5 -5
- esphome/storage_json.py +2 -1
- esphome/types.py +1 -1
- esphome/util.py +2 -3
- esphome/voluptuous_schema.py +1 -0
- esphome/vscode.py +5 -4
- esphome/wizard.py +1 -1
- esphome/writer.py +7 -7
- esphome/yaml_util.py +3 -3
- esphome/zeroconf.py +1 -1
- {esphome-2024.7.2.dist-info → esphome-2024.8.0.dist-info}/METADATA +3 -3
- {esphome-2024.7.2.dist-info → esphome-2024.8.0.dist-info}/RECORD +353 -247
- {esphome-2024.7.2.dist-info → esphome-2024.8.0.dist-info}/LICENSE +0 -0
- {esphome-2024.7.2.dist-info → esphome-2024.8.0.dist-info}/WHEEL +0 -0
- {esphome-2024.7.2.dist-info → esphome-2024.8.0.dist-info}/entry_points.txt +0 -0
- {esphome-2024.7.2.dist-info → esphome-2024.8.0.dist-info}/top_level.txt +0 -0
esphome/git.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
+
from dataclasses import dataclass
|
2
|
+
from datetime import datetime
|
1
3
|
import hashlib
|
2
4
|
import logging
|
5
|
+
from pathlib import Path
|
3
6
|
import re
|
4
7
|
import subprocess
|
5
|
-
import urllib.parse
|
6
|
-
from dataclasses import dataclass
|
7
|
-
from datetime import datetime
|
8
|
-
from pathlib import Path
|
9
8
|
from typing import Callable, Optional
|
9
|
+
import urllib.parse
|
10
10
|
|
11
11
|
import esphome.config_validation as cv
|
12
12
|
from esphome.core import CORE, TimePeriodSeconds
|
esphome/helpers.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
import codecs
|
2
2
|
from contextlib import suppress
|
3
|
-
|
4
3
|
import logging
|
5
4
|
import os
|
6
|
-
import platform
|
7
5
|
from pathlib import Path
|
8
|
-
|
6
|
+
import platform
|
7
|
+
import re
|
9
8
|
import tempfile
|
9
|
+
from typing import Union
|
10
10
|
from urllib.parse import urlparse
|
11
|
-
import re
|
12
11
|
|
13
12
|
_LOGGER = logging.getLogger(__name__)
|
14
13
|
|
@@ -129,9 +128,10 @@ def _resolve_with_zeroconf(host):
|
|
129
128
|
|
130
129
|
|
131
130
|
def resolve_ip_address(host):
|
132
|
-
from esphome.core import EsphomeError
|
133
131
|
import socket
|
134
132
|
|
133
|
+
from esphome.core import EsphomeError
|
134
|
+
|
135
135
|
errs = []
|
136
136
|
|
137
137
|
if host.endswith(".local"):
|
esphome/loader.py
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
-
import
|
2
|
-
from
|
3
|
-
from types import ModuleType
|
1
|
+
from contextlib import AbstractContextManager
|
2
|
+
from dataclasses import dataclass
|
4
3
|
import importlib
|
5
|
-
import importlib.util
|
6
|
-
import importlib.resources
|
7
4
|
import importlib.abc
|
8
|
-
import
|
5
|
+
import importlib.resources
|
6
|
+
import importlib.util
|
7
|
+
import logging
|
9
8
|
from pathlib import Path
|
10
|
-
|
9
|
+
import sys
|
10
|
+
from types import ModuleType
|
11
|
+
from typing import Any, Callable, Optional
|
11
12
|
|
12
13
|
from esphome.const import SOURCE_FILE_EXTENSIONS
|
13
|
-
import esphome.core.config
|
14
14
|
from esphome.core import CORE
|
15
|
+
import esphome.core.config
|
15
16
|
from esphome.types import ConfigType
|
16
17
|
|
17
18
|
_LOGGER = logging.getLogger(__name__)
|
@@ -22,7 +23,7 @@ class FileResource:
|
|
22
23
|
package: str
|
23
24
|
resource: str
|
24
25
|
|
25
|
-
def path(self) ->
|
26
|
+
def path(self) -> AbstractContextManager[Path]:
|
26
27
|
return importlib.resources.as_file(
|
27
28
|
importlib.resources.files(self.package) / self.resource
|
28
29
|
)
|
@@ -175,7 +176,11 @@ def _lookup_module(domain):
|
|
175
176
|
try:
|
176
177
|
module = importlib.import_module(f"esphome.components.{domain}")
|
177
178
|
except ImportError as e:
|
178
|
-
if "No module named"
|
179
|
+
if "No module named" in str(e):
|
180
|
+
_LOGGER.info(
|
181
|
+
"Unable to import component %s: %s", domain, str(e), exc_info=False
|
182
|
+
)
|
183
|
+
else:
|
179
184
|
_LOGGER.error("Unable to import component %s:", domain, exc_info=True)
|
180
185
|
return None
|
181
186
|
except Exception: # pylint: disable=broad-except
|
esphome/mqtt.py
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
from datetime import datetime
|
2
2
|
import hashlib
|
3
|
+
import json
|
3
4
|
import logging
|
4
5
|
import ssl
|
5
|
-
import sys
|
6
6
|
import time
|
7
|
-
import json
|
8
7
|
|
9
8
|
import paho.mqtt.client as mqtt
|
10
9
|
|
@@ -24,9 +23,9 @@ from esphome.const import (
|
|
24
23
|
CONF_USERNAME,
|
25
24
|
)
|
26
25
|
from esphome.core import CORE, EsphomeError
|
27
|
-
from esphome.
|
26
|
+
from esphome.helpers import get_int_env, get_str_env
|
27
|
+
from esphome.log import Fore, color
|
28
28
|
from esphome.util import safe_print
|
29
|
-
from esphome.helpers import get_str_env, get_int_env
|
30
29
|
|
31
30
|
_LOGGER = logging.getLogger(__name__)
|
32
31
|
|
@@ -103,10 +102,7 @@ def prepare(
|
|
103
102
|
if config[CONF_MQTT].get(CONF_SSL_FINGERPRINTS) or config[CONF_MQTT].get(
|
104
103
|
CONF_CERTIFICATE_AUTHORITY
|
105
104
|
):
|
106
|
-
|
107
|
-
tls_version = ssl.PROTOCOL_TLS # pylint: disable=no-member
|
108
|
-
else:
|
109
|
-
tls_version = ssl.PROTOCOL_SSLv23
|
105
|
+
tls_version = ssl.PROTOCOL_TLS # pylint: disable=no-member
|
110
106
|
client.tls_set(
|
111
107
|
ca_certs=None,
|
112
108
|
certfile=None,
|
esphome/pins.py
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
import operator
|
2
1
|
from functools import reduce
|
3
|
-
import
|
4
|
-
from esphome.core import CORE
|
2
|
+
import operator
|
5
3
|
|
4
|
+
import esphome.config_validation as cv
|
6
5
|
from esphome.const import (
|
6
|
+
CONF_ALLOW_OTHER_USES,
|
7
|
+
CONF_IGNORE_STRAPPING_WARNING,
|
7
8
|
CONF_INPUT,
|
9
|
+
CONF_INVERTED,
|
8
10
|
CONF_MODE,
|
9
11
|
CONF_NUMBER,
|
10
12
|
CONF_OPEN_DRAIN,
|
11
13
|
CONF_OUTPUT,
|
12
14
|
CONF_PULLDOWN,
|
13
15
|
CONF_PULLUP,
|
14
|
-
CONF_IGNORE_STRAPPING_WARNING,
|
15
|
-
CONF_ALLOW_OTHER_USES,
|
16
|
-
CONF_INVERTED,
|
17
16
|
)
|
17
|
+
from esphome.core import CORE
|
18
18
|
|
19
19
|
|
20
20
|
class PinRegistry(dict):
|
esphome/platformio_api.py
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
from dataclasses import dataclass
|
2
2
|
import json
|
3
|
-
from typing import Union
|
4
|
-
from pathlib import Path
|
5
|
-
|
6
3
|
import logging
|
7
4
|
import os
|
5
|
+
from pathlib import Path
|
8
6
|
import re
|
9
7
|
import subprocess
|
8
|
+
from typing import Union
|
10
9
|
|
11
10
|
from esphome.const import CONF_COMPILE_PROCESS_LIMIT, CONF_ESPHOME, KEY_CORE
|
12
11
|
from esphome.core import CORE, EsphomeError
|
@@ -20,9 +19,10 @@ def patch_structhash():
|
|
20
19
|
# removed/added. This might have unintended consequences, but this improves compile
|
21
20
|
# times greatly when adding/removing components and a simple clean build solves
|
22
21
|
# all issues
|
23
|
-
from platformio.run import helpers, cli
|
24
|
-
from os.path import join, isdir, getmtime
|
25
22
|
from os import makedirs
|
23
|
+
from os.path import getmtime, isdir, join
|
24
|
+
|
25
|
+
from platformio.run import cli, helpers
|
26
26
|
|
27
27
|
def patched_clean_build_dir(build_dir, *args):
|
28
28
|
from platformio import fs
|
esphome/storage_json.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
from __future__ import annotations
|
2
|
+
|
2
3
|
import binascii
|
3
4
|
import codecs
|
5
|
+
from datetime import datetime
|
4
6
|
import json
|
5
7
|
import logging
|
6
8
|
import os
|
7
|
-
from datetime import datetime
|
8
9
|
|
9
10
|
from esphome import const
|
10
11
|
from esphome.const import CONF_DISABLED, CONF_MDNS
|
esphome/types.py
CHANGED
esphome/util.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
-
from typing import Union
|
2
|
-
|
3
1
|
import collections
|
4
2
|
import io
|
5
3
|
import logging
|
6
4
|
import os
|
5
|
+
from pathlib import Path
|
7
6
|
import re
|
8
7
|
import subprocess
|
9
8
|
import sys
|
10
|
-
from
|
9
|
+
from typing import Union
|
11
10
|
|
12
11
|
from esphome import const
|
13
12
|
|
esphome/voluptuous_schema.py
CHANGED
esphome/vscode.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
from __future__ import annotations
|
2
|
+
|
3
|
+
from io import StringIO
|
2
4
|
import json
|
3
5
|
import os
|
4
|
-
from io import StringIO
|
5
6
|
from typing import Any
|
6
7
|
|
7
|
-
from esphome.
|
8
|
-
from esphome.config import validate_config, _format_vol_invalid, Config
|
9
|
-
from esphome.core import CORE, DocumentRange
|
8
|
+
from esphome.config import Config, _format_vol_invalid, validate_config
|
10
9
|
import esphome.config_validation as cv
|
10
|
+
from esphome.core import CORE, DocumentRange
|
11
|
+
from esphome.yaml_util import parse_yaml
|
11
12
|
|
12
13
|
|
13
14
|
def _get_invalid_range(res: Config, invalid: cv.Invalid) -> DocumentRange | None:
|
esphome/wizard.py
CHANGED
@@ -276,8 +276,8 @@ def wizard(path):
|
|
276
276
|
from esphome.components.bk72xx import boards as bk72xx_boards
|
277
277
|
from esphome.components.esp32 import boards as esp32_boards
|
278
278
|
from esphome.components.esp8266 import boards as esp8266_boards
|
279
|
-
from esphome.components.rtl87xx import boards as rtl87xx_boards
|
280
279
|
from esphome.components.rp2040 import boards as rp2040_boards
|
280
|
+
from esphome.components.rtl87xx import boards as rtl87xx_boards
|
281
281
|
|
282
282
|
if not path.endswith(".yaml") and not path.endswith(".yml"):
|
283
283
|
safe_print(
|
esphome/writer.py
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
import logging
|
2
2
|
import os
|
3
|
-
import re
|
4
3
|
from pathlib import Path
|
4
|
+
import re
|
5
5
|
from typing import Union
|
6
6
|
|
7
|
-
from esphome
|
7
|
+
from esphome import loader
|
8
|
+
from esphome.config import iter_component_configs, iter_components
|
8
9
|
from esphome.const import (
|
10
|
+
ENV_NOGITIGNORE,
|
9
11
|
HEADER_FILE_EXTENSIONS,
|
10
12
|
SOURCE_FILE_EXTENSIONS,
|
11
13
|
__version__,
|
12
|
-
ENV_NOGITIGNORE,
|
13
14
|
)
|
14
15
|
from esphome.core import CORE, EsphomeError
|
15
16
|
from esphome.helpers import (
|
17
|
+
copy_file_if_changed,
|
18
|
+
get_bool_env,
|
16
19
|
mkdir_p,
|
17
20
|
read_file,
|
18
|
-
write_file_if_changed,
|
19
21
|
walk_files,
|
20
|
-
|
21
|
-
get_bool_env,
|
22
|
+
write_file_if_changed,
|
22
23
|
)
|
23
24
|
from esphome.storage_json import StorageJSON, storage_path
|
24
|
-
from esphome import loader
|
25
25
|
|
26
26
|
_LOGGER = logging.getLogger(__name__)
|
27
27
|
|
esphome/yaml_util.py
CHANGED
@@ -3,16 +3,16 @@ from __future__ import annotations
|
|
3
3
|
import fnmatch
|
4
4
|
import functools
|
5
5
|
import inspect
|
6
|
+
from io import TextIOWrapper
|
6
7
|
import logging
|
7
8
|
import math
|
8
9
|
import os
|
9
|
-
import uuid
|
10
|
-
from io import TextIOWrapper
|
11
10
|
from typing import Any
|
11
|
+
import uuid
|
12
12
|
|
13
13
|
import yaml
|
14
|
-
import yaml.constructor
|
15
14
|
from yaml import SafeLoader as PurePythonLoader
|
15
|
+
import yaml.constructor
|
16
16
|
|
17
17
|
try:
|
18
18
|
from yaml import CSafeLoader as FastestAvailableSafeLoader
|
esphome/zeroconf.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: esphome
|
3
|
-
Version: 2024.
|
3
|
+
Version: 2024.8.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
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Home Automation
|
|
23
23
|
Requires-Python: >=3.9.0
|
24
24
|
Description-Content-Type: text/markdown
|
25
25
|
License-File: LICENSE
|
26
|
-
Requires-Dist: cryptography ==
|
26
|
+
Requires-Dist: cryptography ==43.0.0
|
27
27
|
Requires-Dist: voluptuous ==0.14.2
|
28
28
|
Requires-Dist: PyYAML ==6.0.1
|
29
29
|
Requires-Dist: paho-mqtt ==1.6.1
|
@@ -37,7 +37,7 @@ Requires-Dist: platformio ==6.1.15
|
|
37
37
|
Requires-Dist: esptool ==4.7.0
|
38
38
|
Requires-Dist: click ==8.1.7
|
39
39
|
Requires-Dist: esphome-dashboard ==20240620.0
|
40
|
-
Requires-Dist: aioesphomeapi ==24.
|
40
|
+
Requires-Dist: aioesphomeapi ==24.6.2
|
41
41
|
Requires-Dist: zeroconf ==0.132.2
|
42
42
|
Requires-Dist: python-magic ==0.4.27
|
43
43
|
Requires-Dist: ruamel.yaml ==0.18.6
|