1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-12 14:53:49 +01:00

make speaker and syslog groupable

This commit is contained in:
J. Nick Koston
2025-10-09 13:08:27 -10:00
parent f6d67e415f
commit f0e0f8bfdc
7 changed files with 36 additions and 18 deletions

View File

@@ -48,6 +48,16 @@ PACKAGE_DEPENDENCIES = {
# Add more package dependencies here as needed # Add more package dependencies here as needed
} }
# Base bus components - these ARE the bus implementations and should not
# be flagged as needing migration since they are the platform/base components
BASE_BUS_COMPONENTS = {
"i2c",
"spi",
"uart",
"modbus",
"canbus",
}
# Components that must be tested in isolation (not grouped or batched with others) # Components that must be tested in isolation (not grouped or batched with others)
# These have known build issues that prevent grouping # These have known build issues that prevent grouping
# NOTE: This should be kept in sync with both test_build_components and split_components_for_ci.py # NOTE: This should be kept in sync with both test_build_components and split_components_for_ci.py
@@ -323,7 +333,8 @@ def analyze_all_components(
# Check if component defines buses directly in test files # Check if component defines buses directly in test files
# These create unique bus IDs and cause conflicts when merged # These create unique bus IDs and cause conflicts when merged
if has_direct_bus_config: # Exclude base bus components (i2c, spi, uart, etc.) since they ARE the platform
if has_direct_bus_config and component_name not in BASE_BUS_COMPONENTS:
non_groupable.add(component_name) non_groupable.add(component_name)
direct_bus_components.add(component_name) direct_bus_components.add(component_name)
@@ -439,7 +450,7 @@ def main() -> None:
non_groupable.add(comp) non_groupable.add(comp)
if has_extend_remove: if has_extend_remove:
non_groupable.add(comp) non_groupable.add(comp)
if has_direct_bus_config: if has_direct_bus_config and comp not in BASE_BUS_COMPONENTS:
non_groupable.add(comp) non_groupable.add(comp)
direct_bus_components.add(comp) direct_bus_components.add(comp)
else: else:

View File

@@ -1,9 +1,10 @@
substitutions: substitutions:
scl_pin: GPIO16
sda_pin: GPIO17
i2s_bclk_pin: GPIO27 i2s_bclk_pin: GPIO27
i2s_lrclk_pin: GPIO26 i2s_lrclk_pin: GPIO26
i2s_mclk_pin: GPIO25 i2s_mclk_pin: GPIO25
i2s_dout_pin: GPIO23 i2s_dout_pin: GPIO23
packages:
i2c: !include ../../test_build_components/common/i2c/esp32-ard.yaml
<<: !include common-audio_dac.yaml <<: !include common-audio_dac.yaml

View File

@@ -1,9 +1,10 @@
substitutions: substitutions:
scl_pin: GPIO5
sda_pin: GPIO4
i2s_bclk_pin: GPIO7 i2s_bclk_pin: GPIO7
i2s_lrclk_pin: GPIO6 i2s_lrclk_pin: GPIO6
i2s_mclk_pin: GPIO9 i2s_mclk_pin: GPIO9
i2s_dout_pin: GPIO8 i2s_dout_pin: GPIO8
packages:
i2c: !include ../../test_build_components/common/i2c/esp32-c3-ard.yaml
<<: !include common-audio_dac.yaml <<: !include common-audio_dac.yaml

View File

@@ -1,9 +1,10 @@
substitutions: substitutions:
scl_pin: GPIO5
sda_pin: GPIO4
i2s_bclk_pin: GPIO7 i2s_bclk_pin: GPIO7
i2s_lrclk_pin: GPIO6 i2s_lrclk_pin: GPIO6
i2s_mclk_pin: GPIO9 i2s_mclk_pin: GPIO9
i2s_dout_pin: GPIO8 i2s_dout_pin: GPIO8
packages:
i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml
<<: !include common-audio_dac.yaml <<: !include common-audio_dac.yaml

View File

@@ -1,9 +1,10 @@
substitutions: substitutions:
scl_pin: GPIO16
sda_pin: GPIO17
i2s_bclk_pin: GPIO27 i2s_bclk_pin: GPIO27
i2s_lrclk_pin: GPIO26 i2s_lrclk_pin: GPIO26
i2s_mclk_pin: GPIO25 i2s_mclk_pin: GPIO25
i2s_dout_pin: GPIO23 i2s_dout_pin: GPIO23
packages:
i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml
<<: !include common-audio_dac.yaml <<: !include common-audio_dac.yaml

View File

@@ -14,11 +14,6 @@ esphome:
- speaker.finish: - speaker.finish:
- speaker.stop: - speaker.stop:
i2c:
- id: i2c_audio_dac
scl: ${scl_pin}
sda: ${sda_pin}
i2s_audio: i2s_audio:
i2s_lrclk_pin: ${i2s_bclk_pin} i2s_lrclk_pin: ${i2s_bclk_pin}
i2s_bclk_pin: ${i2s_lrclk_pin} i2s_bclk_pin: ${i2s_lrclk_pin}
@@ -26,6 +21,7 @@ i2s_audio:
audio_dac: audio_dac:
- platform: aic3204 - platform: aic3204
i2c_id: i2c_bus
id: internal_dac id: internal_dac
speaker: speaker:

View File

@@ -1,4 +1,11 @@
packages: udp:
common: !include common.yaml addresses: ["239.0.60.53"]
wifi: !remove time:
platform: host
syslog:
port: 514
strip: true
level: info
facility: 16