esphome 2025.5.0b2__py3-none-any.whl → 2025.5.0b4__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 +16 -14
- esphome/components/api/api_connection.cpp +339 -652
- esphome/components/api/api_connection.h +251 -57
- esphome/components/api/api_frame_helper.cpp +136 -49
- esphome/components/api/api_frame_helper.h +49 -6
- esphome/components/api/proto.h +48 -8
- esphome/components/ballu/climate.py +1 -1
- esphome/components/bedjet/bedjet_hub.cpp +1 -0
- esphome/components/binary_sensor/binary_sensor.cpp +10 -6
- esphome/components/binary_sensor/binary_sensor.h +1 -1
- esphome/components/binary_sensor/filter.cpp +21 -21
- esphome/components/binary_sensor/filter.h +10 -10
- esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +2 -1
- esphome/components/ccs811/sensor.py +9 -6
- esphome/components/climate_ir/__init__.py +3 -3
- esphome/components/climate_ir_lg/climate.py +1 -1
- esphome/components/coolix/climate.py +1 -1
- esphome/components/cse7766/cse7766.cpp +2 -1
- esphome/components/current_based/current_based_cover.cpp +2 -1
- esphome/components/daikin/climate.py +1 -1
- esphome/components/daikin_arc/climate.py +1 -1
- esphome/components/daikin_brc/climate.py +1 -1
- esphome/components/daly_bms/daly_bms.cpp +2 -1
- esphome/components/debug/debug_component.cpp +1 -1
- esphome/components/delonghi/climate.py +1 -1
- esphome/components/dps310/sensor.py +6 -6
- esphome/components/ee895/sensor.py +9 -9
- esphome/components/emmeti/climate.py +1 -1
- esphome/components/endstop/endstop_cover.cpp +2 -1
- esphome/components/ens160_base/__init__.py +12 -9
- esphome/components/esp32_ble/ble_advertising.cpp +2 -1
- esphome/components/esp32_camera/__init__.py +1 -1
- esphome/components/esp32_camera/esp32_camera.cpp +2 -10
- esphome/components/esp32_camera/esp32_camera.h +1 -1
- esphome/components/esp32_improv/esp32_improv_component.cpp +1 -1
- esphome/components/esp32_touch/esp32_touch.cpp +1 -1
- esphome/components/ethernet/ethernet_component.cpp +1 -1
- esphome/components/feedback/feedback_cover.cpp +2 -1
- esphome/components/fujitsu_general/climate.py +1 -1
- esphome/components/gcja5/gcja5.cpp +2 -1
- esphome/components/gps/__init__.py +37 -16
- esphome/components/gps/gps.cpp +33 -17
- esphome/components/gps/gps.h +16 -15
- esphome/components/gree/climate.py +1 -1
- esphome/components/growatt_solar/growatt_solar.cpp +2 -1
- esphome/components/heatpumpir/climate.py +1 -1
- esphome/components/hitachi_ac344/climate.py +1 -1
- esphome/components/hitachi_ac424/climate.py +1 -1
- esphome/components/hte501/sensor.py +6 -6
- esphome/components/hyt271/sensor.py +6 -6
- esphome/components/kuntze/kuntze.cpp +2 -1
- esphome/components/logger/__init__.py +1 -0
- esphome/components/logger/logger.cpp +53 -32
- esphome/components/logger/logger.h +55 -5
- esphome/components/matrix_keypad/matrix_keypad.cpp +2 -1
- esphome/components/max7219digit/max7219digit.cpp +2 -1
- esphome/components/mhz19/sensor.py +11 -7
- esphome/components/midea_ir/climate.py +1 -1
- esphome/components/mitsubishi/climate.py +1 -1
- esphome/components/modbus/modbus.cpp +2 -1
- esphome/components/mqtt/mqtt_client.cpp +1 -1
- esphome/components/ms5611/sensor.py +6 -6
- esphome/components/ms8607/sensor.py +3 -3
- esphome/components/noblex/climate.py +1 -1
- esphome/components/pmsx003/pmsx003.cpp +2 -1
- esphome/components/pzem004t/pzem004t.cpp +2 -1
- esphome/components/rf_bridge/rf_bridge.cpp +2 -1
- esphome/components/sds011/sds011.cpp +2 -1
- esphome/components/sen5x/sen5x.cpp +55 -36
- esphome/components/senseair/sensor.py +3 -3
- esphome/components/sgp30/sensor.py +14 -16
- esphome/components/shtcx/sensor.py +6 -6
- esphome/components/slow_pwm/slow_pwm_output.cpp +2 -1
- esphome/components/sprinkler/sprinkler.cpp +6 -5
- esphome/components/t6615/sensor.py +3 -3
- esphome/components/t6615/t6615.cpp +2 -1
- esphome/components/tcl112/climate.py +1 -1
- esphome/components/time_based/time_based_cover.cpp +2 -1
- esphome/components/toshiba/climate.py +1 -1
- esphome/components/uart/switch/uart_switch.cpp +2 -1
- esphome/components/uponor_smatrix/climate/uponor_smatrix_climate.cpp +2 -1
- esphome/components/uponor_smatrix/uponor_smatrix.cpp +2 -1
- esphome/components/weikai/weikai.cpp +0 -52
- esphome/components/whirlpool/climate.py +1 -1
- esphome/components/whynter/climate.py +1 -1
- esphome/components/zhlt01/climate.py +1 -1
- esphome/config.py +13 -13
- esphome/const.py +1 -1
- esphome/core/application.cpp +26 -10
- esphome/core/application.h +5 -1
- esphome/core/component.cpp +10 -5
- esphome/core/component.h +5 -1
- esphome/core/doxygen.h +13 -0
- esphome/core/scheduler.cpp +4 -1
- esphome/log.py +15 -19
- esphome/mqtt.py +2 -2
- esphome/voluptuous_schema.py +3 -1
- esphome/wizard.py +45 -35
- {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/METADATA +1 -1
- {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/RECORD +104 -103
- {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/WHEEL +0 -0
- {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/entry_points.txt +0 -0
- {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/licenses/LICENSE +0 -0
- {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/top_level.txt +0 -0
esphome/__main__.py
CHANGED
@@ -43,7 +43,7 @@ from esphome.const import (
|
|
43
43
|
)
|
44
44
|
from esphome.core import CORE, EsphomeError, coroutine
|
45
45
|
from esphome.helpers import get_bool_env, indent, is_ip_address
|
46
|
-
from esphome.log import
|
46
|
+
from esphome.log import AnsiFore, color, setup_log
|
47
47
|
from esphome.util import (
|
48
48
|
get_serial_ports,
|
49
49
|
list_yaml_files,
|
@@ -83,7 +83,7 @@ def choose_prompt(options, purpose: str = None):
|
|
83
83
|
raise ValueError
|
84
84
|
break
|
85
85
|
except ValueError:
|
86
|
-
safe_print(color(
|
86
|
+
safe_print(color(AnsiFore.RED, f"Invalid option: '{opt}'"))
|
87
87
|
return options[opt - 1][1]
|
88
88
|
|
89
89
|
|
@@ -596,30 +596,30 @@ def command_update_all(args):
|
|
596
596
|
click.echo(f"{half_line}{middle_text}{half_line}")
|
597
597
|
|
598
598
|
for f in files:
|
599
|
-
print(f"Updating {color(
|
599
|
+
print(f"Updating {color(AnsiFore.CYAN, f)}")
|
600
600
|
print("-" * twidth)
|
601
601
|
print()
|
602
602
|
rc = run_external_process(
|
603
603
|
"esphome", "--dashboard", "run", f, "--no-logs", "--device", "OTA"
|
604
604
|
)
|
605
605
|
if rc == 0:
|
606
|
-
print_bar(f"[{color(
|
606
|
+
print_bar(f"[{color(AnsiFore.BOLD_GREEN, 'SUCCESS')}] {f}")
|
607
607
|
success[f] = True
|
608
608
|
else:
|
609
|
-
print_bar(f"[{color(
|
609
|
+
print_bar(f"[{color(AnsiFore.BOLD_RED, 'ERROR')}] {f}")
|
610
610
|
success[f] = False
|
611
611
|
|
612
612
|
print()
|
613
613
|
print()
|
614
614
|
print()
|
615
615
|
|
616
|
-
print_bar(f"[{color(
|
616
|
+
print_bar(f"[{color(AnsiFore.BOLD_WHITE, 'SUMMARY')}]")
|
617
617
|
failed = 0
|
618
618
|
for f in files:
|
619
619
|
if success[f]:
|
620
|
-
print(f" - {f}: {color(
|
620
|
+
print(f" - {f}: {color(AnsiFore.GREEN, 'SUCCESS')}")
|
621
621
|
else:
|
622
|
-
print(f" - {f}: {color(
|
622
|
+
print(f" - {f}: {color(AnsiFore.BOLD_RED, 'FAILED')}")
|
623
623
|
failed += 1
|
624
624
|
return failed
|
625
625
|
|
@@ -645,7 +645,7 @@ def command_rename(args, config):
|
|
645
645
|
if c not in ALLOWED_NAME_CHARS:
|
646
646
|
print(
|
647
647
|
color(
|
648
|
-
|
648
|
+
AnsiFore.BOLD_RED,
|
649
649
|
f"'{c}' is an invalid character for names. Valid characters are: "
|
650
650
|
f"{ALLOWED_NAME_CHARS} (lowercase, no spaces)",
|
651
651
|
)
|
@@ -658,7 +658,9 @@ def command_rename(args, config):
|
|
658
658
|
yaml = yaml_util.load_yaml(CORE.config_path)
|
659
659
|
if CONF_ESPHOME not in yaml or CONF_NAME not in yaml[CONF_ESPHOME]:
|
660
660
|
print(
|
661
|
-
color(
|
661
|
+
color(
|
662
|
+
AnsiFore.BOLD_RED, "Complex YAML files cannot be automatically renamed."
|
663
|
+
)
|
662
664
|
)
|
663
665
|
return 1
|
664
666
|
old_name = yaml[CONF_ESPHOME][CONF_NAME]
|
@@ -681,7 +683,7 @@ def command_rename(args, config):
|
|
681
683
|
)
|
682
684
|
> 1
|
683
685
|
):
|
684
|
-
print(color(
|
686
|
+
print(color(AnsiFore.BOLD_RED, "Too many matches in YAML to safely rename"))
|
685
687
|
return 1
|
686
688
|
|
687
689
|
new_raw = re.sub(
|
@@ -693,7 +695,7 @@ def command_rename(args, config):
|
|
693
695
|
|
694
696
|
new_path = os.path.join(CORE.config_dir, args.name + ".yaml")
|
695
697
|
print(
|
696
|
-
f"Updating {color(
|
698
|
+
f"Updating {color(AnsiFore.CYAN, CORE.config_path)} to {color(AnsiFore.CYAN, new_path)}"
|
697
699
|
)
|
698
700
|
print()
|
699
701
|
|
@@ -702,7 +704,7 @@ def command_rename(args, config):
|
|
702
704
|
|
703
705
|
rc = run_external_process("esphome", "config", new_path)
|
704
706
|
if rc != 0:
|
705
|
-
print(color(
|
707
|
+
print(color(AnsiFore.BOLD_RED, "Rename failed. Reverting changes."))
|
706
708
|
os.remove(new_path)
|
707
709
|
return 1
|
708
710
|
|
@@ -728,7 +730,7 @@ def command_rename(args, config):
|
|
728
730
|
if CORE.config_path != new_path:
|
729
731
|
os.remove(CORE.config_path)
|
730
732
|
|
731
|
-
print(color(
|
733
|
+
print(color(AnsiFore.BOLD_GREEN, "SUCCESS"))
|
732
734
|
print()
|
733
735
|
return 0
|
734
736
|
|