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.
Files changed (104) hide show
  1. esphome/__main__.py +16 -14
  2. esphome/components/api/api_connection.cpp +339 -652
  3. esphome/components/api/api_connection.h +251 -57
  4. esphome/components/api/api_frame_helper.cpp +136 -49
  5. esphome/components/api/api_frame_helper.h +49 -6
  6. esphome/components/api/proto.h +48 -8
  7. esphome/components/ballu/climate.py +1 -1
  8. esphome/components/bedjet/bedjet_hub.cpp +1 -0
  9. esphome/components/binary_sensor/binary_sensor.cpp +10 -6
  10. esphome/components/binary_sensor/binary_sensor.h +1 -1
  11. esphome/components/binary_sensor/filter.cpp +21 -21
  12. esphome/components/binary_sensor/filter.h +10 -10
  13. esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +2 -1
  14. esphome/components/ccs811/sensor.py +9 -6
  15. esphome/components/climate_ir/__init__.py +3 -3
  16. esphome/components/climate_ir_lg/climate.py +1 -1
  17. esphome/components/coolix/climate.py +1 -1
  18. esphome/components/cse7766/cse7766.cpp +2 -1
  19. esphome/components/current_based/current_based_cover.cpp +2 -1
  20. esphome/components/daikin/climate.py +1 -1
  21. esphome/components/daikin_arc/climate.py +1 -1
  22. esphome/components/daikin_brc/climate.py +1 -1
  23. esphome/components/daly_bms/daly_bms.cpp +2 -1
  24. esphome/components/debug/debug_component.cpp +1 -1
  25. esphome/components/delonghi/climate.py +1 -1
  26. esphome/components/dps310/sensor.py +6 -6
  27. esphome/components/ee895/sensor.py +9 -9
  28. esphome/components/emmeti/climate.py +1 -1
  29. esphome/components/endstop/endstop_cover.cpp +2 -1
  30. esphome/components/ens160_base/__init__.py +12 -9
  31. esphome/components/esp32_ble/ble_advertising.cpp +2 -1
  32. esphome/components/esp32_camera/__init__.py +1 -1
  33. esphome/components/esp32_camera/esp32_camera.cpp +2 -10
  34. esphome/components/esp32_camera/esp32_camera.h +1 -1
  35. esphome/components/esp32_improv/esp32_improv_component.cpp +1 -1
  36. esphome/components/esp32_touch/esp32_touch.cpp +1 -1
  37. esphome/components/ethernet/ethernet_component.cpp +1 -1
  38. esphome/components/feedback/feedback_cover.cpp +2 -1
  39. esphome/components/fujitsu_general/climate.py +1 -1
  40. esphome/components/gcja5/gcja5.cpp +2 -1
  41. esphome/components/gps/__init__.py +37 -16
  42. esphome/components/gps/gps.cpp +33 -17
  43. esphome/components/gps/gps.h +16 -15
  44. esphome/components/gree/climate.py +1 -1
  45. esphome/components/growatt_solar/growatt_solar.cpp +2 -1
  46. esphome/components/heatpumpir/climate.py +1 -1
  47. esphome/components/hitachi_ac344/climate.py +1 -1
  48. esphome/components/hitachi_ac424/climate.py +1 -1
  49. esphome/components/hte501/sensor.py +6 -6
  50. esphome/components/hyt271/sensor.py +6 -6
  51. esphome/components/kuntze/kuntze.cpp +2 -1
  52. esphome/components/logger/__init__.py +1 -0
  53. esphome/components/logger/logger.cpp +53 -32
  54. esphome/components/logger/logger.h +55 -5
  55. esphome/components/matrix_keypad/matrix_keypad.cpp +2 -1
  56. esphome/components/max7219digit/max7219digit.cpp +2 -1
  57. esphome/components/mhz19/sensor.py +11 -7
  58. esphome/components/midea_ir/climate.py +1 -1
  59. esphome/components/mitsubishi/climate.py +1 -1
  60. esphome/components/modbus/modbus.cpp +2 -1
  61. esphome/components/mqtt/mqtt_client.cpp +1 -1
  62. esphome/components/ms5611/sensor.py +6 -6
  63. esphome/components/ms8607/sensor.py +3 -3
  64. esphome/components/noblex/climate.py +1 -1
  65. esphome/components/pmsx003/pmsx003.cpp +2 -1
  66. esphome/components/pzem004t/pzem004t.cpp +2 -1
  67. esphome/components/rf_bridge/rf_bridge.cpp +2 -1
  68. esphome/components/sds011/sds011.cpp +2 -1
  69. esphome/components/sen5x/sen5x.cpp +55 -36
  70. esphome/components/senseair/sensor.py +3 -3
  71. esphome/components/sgp30/sensor.py +14 -16
  72. esphome/components/shtcx/sensor.py +6 -6
  73. esphome/components/slow_pwm/slow_pwm_output.cpp +2 -1
  74. esphome/components/sprinkler/sprinkler.cpp +6 -5
  75. esphome/components/t6615/sensor.py +3 -3
  76. esphome/components/t6615/t6615.cpp +2 -1
  77. esphome/components/tcl112/climate.py +1 -1
  78. esphome/components/time_based/time_based_cover.cpp +2 -1
  79. esphome/components/toshiba/climate.py +1 -1
  80. esphome/components/uart/switch/uart_switch.cpp +2 -1
  81. esphome/components/uponor_smatrix/climate/uponor_smatrix_climate.cpp +2 -1
  82. esphome/components/uponor_smatrix/uponor_smatrix.cpp +2 -1
  83. esphome/components/weikai/weikai.cpp +0 -52
  84. esphome/components/whirlpool/climate.py +1 -1
  85. esphome/components/whynter/climate.py +1 -1
  86. esphome/components/zhlt01/climate.py +1 -1
  87. esphome/config.py +13 -13
  88. esphome/const.py +1 -1
  89. esphome/core/application.cpp +26 -10
  90. esphome/core/application.h +5 -1
  91. esphome/core/component.cpp +10 -5
  92. esphome/core/component.h +5 -1
  93. esphome/core/doxygen.h +13 -0
  94. esphome/core/scheduler.cpp +4 -1
  95. esphome/log.py +15 -19
  96. esphome/mqtt.py +2 -2
  97. esphome/voluptuous_schema.py +3 -1
  98. esphome/wizard.py +45 -35
  99. {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/METADATA +1 -1
  100. {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/RECORD +104 -103
  101. {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/WHEEL +0 -0
  102. {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/entry_points.txt +0 -0
  103. {esphome-2025.5.0b2.dist-info → esphome-2025.5.0b4.dist-info}/licenses/LICENSE +0 -0
  104. {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 Fore, color, setup_log
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(Fore.RED, f"Invalid option: '{opt}'"))
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(Fore.CYAN, f)}")
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(Fore.BOLD_GREEN, 'SUCCESS')}] {f}")
606
+ print_bar(f"[{color(AnsiFore.BOLD_GREEN, 'SUCCESS')}] {f}")
607
607
  success[f] = True
608
608
  else:
609
- print_bar(f"[{color(Fore.BOLD_RED, 'ERROR')}] {f}")
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(Fore.BOLD_WHITE, 'SUMMARY')}]")
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(Fore.GREEN, 'SUCCESS')}")
620
+ print(f" - {f}: {color(AnsiFore.GREEN, 'SUCCESS')}")
621
621
  else:
622
- print(f" - {f}: {color(Fore.BOLD_RED, 'FAILED')}")
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
- Fore.BOLD_RED,
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(Fore.BOLD_RED, "Complex YAML files cannot be automatically renamed.")
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(Fore.BOLD_RED, "Too many matches in YAML to safely rename"))
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(Fore.CYAN, CORE.config_path)} to {color(Fore.CYAN, new_path)}"
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(Fore.BOLD_RED, "Rename failed. Reverting changes."))
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(Fore.BOLD_GREEN, "SUCCESS"))
733
+ print(color(AnsiFore.BOLD_GREEN, "SUCCESS"))
732
734
  print()
733
735
  return 0
734
736