diff --git a/.ai/instructions.md b/.ai/instructions.md index 1cd77b9136..d2e173472a 100644 --- a/.ai/instructions.md +++ b/.ai/instructions.md @@ -186,6 +186,11 @@ This document provides essential context for AI models interacting with this pro └── components/[component]/ # Component-specific tests ``` Run them using `script/test_build_components`. Use `-c ` to test specific components and `-t ` for specific platforms. + * **Testing All Components Together:** To verify that all components can be tested together without ID conflicts or configuration issues, use: + ```bash + ./script/test_component_grouping.py -e config --all + ``` + This tests all components in a single build to catch conflicts that might not appear when testing components individually. Use `-e config` for fast configuration validation, or `-e compile` for full compilation testing. * **Debugging and Troubleshooting:** * **Debug Tools:** - `esphome config .yaml` to validate configuration. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d7043c888..4451007da0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -369,10 +369,11 @@ jobs: matrix: file: ${{ fromJson(needs.determine-jobs.outputs.changed-components) }} steps: - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install libsdl2-dev + - name: Cache apt packages + uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.5.3 + with: + packages: libsdl2-dev + version: 1.0 - name: Check out code from GitHub uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -381,17 +382,17 @@ jobs: with: python-version: ${{ env.DEFAULT_PYTHON }} cache-key: ${{ needs.common.outputs.cache-key }} - - name: test_build_components -e config -c ${{ matrix.file }} + - name: Validate config for ${{ matrix.file }} run: | . venv/bin/activate - ./script/test_build_components -e config -c ${{ matrix.file }} - - name: test_build_components -e compile -c ${{ matrix.file }} + python3 script/test_build_components.py -e config -c ${{ matrix.file }} + - name: Compile config for ${{ matrix.file }} run: | . venv/bin/activate - ./script/test_build_components -e compile -c ${{ matrix.file }} + python3 script/test_build_components.py -e compile -c ${{ matrix.file }} test-build-components-splitter: - name: Split components for testing into 10 components per group + name: Split components for intelligent grouping (40 weighted per batch) runs-on: ubuntu-24.04 needs: - common @@ -402,14 +403,26 @@ jobs: steps: - name: Check out code from GitHub uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Split components into groups of 10 + - name: Restore Python + uses: ./.github/actions/restore-python + with: + python-version: ${{ env.DEFAULT_PYTHON }} + cache-key: ${{ needs.common.outputs.cache-key }} + - name: Split components intelligently based on bus configurations id: split run: | - components=$(echo '${{ needs.determine-jobs.outputs.changed-components }}' | jq -c '.[]' | shuf | jq -s -c '[_nwise(10) | join(" ")]') - echo "components=$components" >> $GITHUB_OUTPUT + . venv/bin/activate + + # Use intelligent splitter that groups components with same bus configs + components='${{ needs.determine-jobs.outputs.changed-components }}' + + echo "Splitting components intelligently..." + output=$(python3 script/split_components_for_ci.py --components "$components" --batch-size 40 --output github) + + echo "$output" >> $GITHUB_OUTPUT test-build-components-split: - name: Test split components + name: Test components batch (${{ matrix.components }}) runs-on: ubuntu-24.04 needs: - common @@ -418,17 +431,23 @@ jobs: if: github.event_name == 'pull_request' && fromJSON(needs.determine-jobs.outputs.component-test-count) >= 100 strategy: fail-fast: false - max-parallel: 4 + max-parallel: 5 matrix: components: ${{ fromJson(needs.test-build-components-splitter.outputs.matrix) }} steps: + - name: Show disk space + run: | + echo "Available disk space:" + df -h + - name: List components run: echo ${{ matrix.components }} - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install libsdl2-dev + - name: Cache apt packages + uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.5.3 + with: + packages: libsdl2-dev + version: 1.0 - name: Check out code from GitHub uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -437,20 +456,37 @@ jobs: with: python-version: ${{ env.DEFAULT_PYTHON }} cache-key: ${{ needs.common.outputs.cache-key }} - - name: Validate config + - name: Validate and compile components with intelligent grouping run: | . venv/bin/activate - for component in ${{ matrix.components }}; do - ./script/test_build_components -e config -c $component - done - - name: Compile config - run: | - . venv/bin/activate - mkdir build_cache - export PLATFORMIO_BUILD_CACHE_DIR=$PWD/build_cache - for component in ${{ matrix.components }}; do - ./script/test_build_components -e compile -c $component - done + # Use /mnt for build files (70GB available vs ~29GB on /) + # Bind mount PlatformIO directory to /mnt (tools, packages, build cache all go there) + sudo mkdir -p /mnt/platformio + sudo chown $USER:$USER /mnt/platformio + mkdir -p ~/.platformio + sudo mount --bind /mnt/platformio ~/.platformio + + # Bind mount test build directory to /mnt + sudo mkdir -p /mnt/test_build_components_build + sudo chown $USER:$USER /mnt/test_build_components_build + mkdir -p tests/test_build_components/build + sudo mount --bind /mnt/test_build_components_build tests/test_build_components/build + + # Convert space-separated components to comma-separated for Python script + components_csv=$(echo "${{ matrix.components }}" | tr ' ' ',') + + echo "Testing components: $components_csv" + echo "" + + # Run config validation with grouping + python3 script/test_build_components.py -e config -c "$components_csv" -f + + echo "" + echo "Config validation passed! Starting compilation..." + echo "" + + # Run compilation with grouping + python3 script/test_build_components.py -e compile -c "$components_csv" -f pre-commit-ci-lite: name: pre-commit.ci lite diff --git a/esphome/__main__.py b/esphome/__main__.py index b0f541f521..be4551f6b5 100644 --- a/esphome/__main__.py +++ b/esphome/__main__.py @@ -1002,6 +1002,12 @@ def parse_args(argv): action="append", default=[], ) + options_parser.add_argument( + "--testing-mode", + help="Enable testing mode (disables validation checks for grouped component testing)", + action="store_true", + default=False, + ) parser = argparse.ArgumentParser( description=f"ESPHome {const.__version__}", parents=[options_parser] @@ -1260,6 +1266,7 @@ def run_esphome(argv): args = parse_args(argv) CORE.dashboard = args.dashboard + CORE.testing_mode = args.testing_mode # Create address cache from command-line arguments CORE.address_cache = AddressCache.from_cli_args( diff --git a/esphome/components/esp32_ble/__init__.py b/esphome/components/esp32_ble/__init__.py index 05ef936baf..1c142ca7bd 100644 --- a/esphome/components/esp32_ble/__init__.py +++ b/esphome/components/esp32_ble/__init__.py @@ -285,6 +285,10 @@ def consume_connection_slots( def validate_connection_slots(max_connections: int) -> None: """Validate that BLE connection slots don't exceed the configured maximum.""" + # Skip validation in testing mode to allow component grouping + if CORE.testing_mode: + return + ble_data = CORE.data.get(KEY_ESP32_BLE, {}) used_slots = ble_data.get(KEY_USED_CONNECTION_SLOTS, []) num_used = len(used_slots) diff --git a/esphome/components/uart/__init__.py b/esphome/components/uart/__init__.py index 764576744f..f8f927d469 100644 --- a/esphome/components/uart/__init__.py +++ b/esphome/components/uart/__init__.py @@ -347,7 +347,7 @@ def final_validate_device_schema( def validate_pin(opt, device): def validator(value): - if opt in device: + if opt in device and not CORE.testing_mode: raise cv.Invalid( f"The uart {opt} is used both by {name} and {device[opt]}, " f"but can only be used by one. Please create a new uart bus for {name}." diff --git a/esphome/core/__init__.py b/esphome/core/__init__.py index 7ab8a3ba71..43febd28a2 100644 --- a/esphome/core/__init__.py +++ b/esphome/core/__init__.py @@ -529,6 +529,8 @@ class EsphomeCore: self.dashboard = False # True if command is run from vscode api self.vscode = False + # True if running in testing mode (disables validation checks for grouped testing) + self.testing_mode = False # The name of the node self.name: str | None = None # The friendly name of the node diff --git a/esphome/core/entity_helpers.py b/esphome/core/entity_helpers.py index e1b2a8264b..f0a04b4860 100644 --- a/esphome/core/entity_helpers.py +++ b/esphome/core/entity_helpers.py @@ -246,12 +246,15 @@ def entity_duplicate_validator(platform: str) -> Callable[[ConfigType], ConfigTy "\n to distinguish them" ) - raise cv.Invalid( - f"Duplicate {platform} entity with name '{entity_name}' found{device_prefix}. " - f"{conflict_msg}. " - "Each entity on a device must have a unique name within its platform." - f"{sanitized_msg}" - ) + # Skip duplicate entity name validation when testing_mode is enabled + # This flag is used for grouped component testing + if not CORE.testing_mode: + raise cv.Invalid( + f"Duplicate {platform} entity with name '{entity_name}' found{device_prefix}. " + f"{conflict_msg}. " + "Each entity on a device must have a unique name within its platform." + f"{sanitized_msg}" + ) # Store metadata about this entity entity_metadata: EntityMetadata = { diff --git a/esphome/pins.py b/esphome/pins.py index 4f9b4859a1..601c05880a 100644 --- a/esphome/pins.py +++ b/esphome/pins.py @@ -118,11 +118,11 @@ class PinRegistry(dict): parent_config = fconf.get_config_for_path(parent_path) final_val_fun(pin_config, parent_config) allow_others = pin_config.get(CONF_ALLOW_OTHER_USES, False) - if count != 1 and not allow_others: + if count != 1 and not allow_others and not CORE.testing_mode: raise cv.Invalid( f"Pin {pin_config[CONF_NUMBER]} is used in multiple places" ) - if count == 1 and allow_others: + if count == 1 and allow_others and not CORE.testing_mode: raise cv.Invalid( f"Pin {pin_config[CONF_NUMBER]} incorrectly sets {CONF_ALLOW_OTHER_USES}: true" ) diff --git a/esphome/platformio_api.py b/esphome/platformio_api.py index 8b7b790829..9418c1c7d3 100644 --- a/esphome/platformio_api.py +++ b/esphome/platformio_api.py @@ -5,6 +5,7 @@ import os from pathlib import Path import re import subprocess +from typing import Any from esphome.const import CONF_COMPILE_PROCESS_LIMIT, CONF_ESPHOME, KEY_CORE from esphome.core import CORE, EsphomeError @@ -42,6 +43,35 @@ def patch_structhash(): cli.clean_build_dir = patched_clean_build_dir +def patch_file_downloader(): + """Patch PlatformIO's FileDownloader to retry on PackageException errors.""" + from platformio.package.download import FileDownloader + from platformio.package.exception import PackageException + + original_init = FileDownloader.__init__ + + def patched_init(self, *args: Any, **kwargs: Any) -> None: + max_retries = 3 + + for attempt in range(max_retries): + try: + return original_init(self, *args, **kwargs) + except PackageException as e: + if attempt < max_retries - 1: + _LOGGER.warning( + "Package download failed: %s. Retrying... (attempt %d/%d)", + str(e), + attempt + 1, + max_retries, + ) + else: + # Final attempt - re-raise + raise + return None + + FileDownloader.__init__ = patched_init + + IGNORE_LIB_WARNINGS = f"(?:{'|'.join(['Hash', 'Update'])})" FILTER_PLATFORMIO_LINES = [ r"Verbose mode can be enabled via `-v, --verbose` option.*", @@ -99,6 +129,7 @@ def run_platformio_cli(*args, **kwargs) -> str | int: import platformio.__main__ patch_structhash() + patch_file_downloader() return run_external_command(platformio.__main__.main, *cmd, **kwargs) diff --git a/script/analyze_component_buses.py b/script/analyze_component_buses.py new file mode 100755 index 0000000000..39e1e66c75 --- /dev/null +++ b/script/analyze_component_buses.py @@ -0,0 +1,523 @@ +#!/usr/bin/env python3 +"""Analyze component test files to detect which common bus configs they use. + +This script scans component test files and extracts which common bus configurations +(i2c, spi, uart, etc.) are included via the packages mechanism. This information +is used to group components that can be tested together. + +Components can only be grouped together if they use the EXACT SAME set of common +bus configurations, ensuring that merged configs are compatible. + +Example output: +{ + "component1": { + "esp32-ard": ["i2c", "uart_19200"], + "esp32-idf": ["i2c", "uart_19200"] + }, + "component2": { + "esp32-ard": ["spi"], + "esp32-idf": ["spi"] + } +} +""" + +from __future__ import annotations + +import argparse +from functools import lru_cache +import json +from pathlib import Path +import re +import sys +from typing import Any + +# Add esphome to path +sys.path.insert(0, str(Path(__file__).parent.parent)) + +from esphome import yaml_util +from esphome.config_helpers import Extend, Remove + +# Path to common bus configs +COMMON_BUS_PATH = Path("tests/test_build_components/common") + +# Package dependencies - maps packages to the packages they include +# When a component uses a package on the left, it automatically gets +# the packages on the right as well +PACKAGE_DEPENDENCIES = { + "modbus": ["uart"], # modbus packages include uart packages + # Add more package dependencies here as needed +} + +# Bus types that can be defined directly in config files +# Components defining these directly cannot be grouped (they create unique bus IDs) +DIRECT_BUS_TYPES = ("i2c", "spi", "uart", "modbus") + +# Signature for components with no bus requirements +# These components can be merged with any other group +NO_BUSES_SIGNATURE = "no_buses" + +# 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) +# 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 +ISOLATED_COMPONENTS = { + "animation": "Has display lambda in common.yaml that requires existing display platform - breaks when merged without display", + "esphome": "Defines devices/areas in esphome: section that are referenced in other sections - breaks when merged", + "ethernet": "Defines ethernet: which conflicts with wifi: used by most components", + "ethernet_info": "Related to ethernet component which conflicts with wifi", + "lvgl": "Defines multiple SDL displays on host platform that conflict when merged with other display configs", + "matrix_keypad": "Needs isolation due to keypad", + "mcp4725": "no YAML config to specify i2c bus id", + "mcp47a1": "no YAML config to specify i2c bus id", + "modbus_controller": "Defines multiple modbus buses for testing client/server functionality - conflicts with package modbus bus", + "neopixelbus": "RMT type conflict with ESP32 Arduino/ESP-IDF headers (enum vs struct rmt_channel_t)", + "packages": "cannot merge packages", +} + + +@lru_cache(maxsize=1) +def get_common_bus_packages() -> frozenset[str]: + """Get the list of common bus package names. + + Reads from tests/test_build_components/common/ directory + and caches the result. All bus types support component grouping + for config validation since --testing-mode bypasses runtime conflicts. + + Returns: + Frozenset of common bus package names (i2c, spi, uart, etc.) + """ + if not COMMON_BUS_PATH.exists(): + return frozenset() + + # List all directories in common/ - these are the bus package names + return frozenset(d.name for d in COMMON_BUS_PATH.iterdir() if d.is_dir()) + + +def uses_local_file_references(component_dir: Path) -> bool: + """Check if a component uses local file references via $component_dir. + + Components that reference local files cannot be grouped because each needs + a unique component_dir path pointing to their specific directory. + + Args: + component_dir: Path to the component's test directory + + Returns: + True if the component uses $component_dir for local file references + """ + common_yaml = component_dir / "common.yaml" + if not common_yaml.exists(): + return False + + try: + content = common_yaml.read_text() + except Exception: # pylint: disable=broad-exception-caught + return False + + # Pattern to match $component_dir or ${component_dir} references + # These indicate local file usage that prevents grouping + return bool(re.search(r"\$\{?component_dir\}?", content)) + + +def is_platform_component(component_dir: Path) -> bool: + """Check if a component is a platform component (abstract base class). + + Platform components have IS_PLATFORM_COMPONENT = True and cannot be + instantiated without a platform-specific implementation. These components + define abstract methods and cause linker errors if compiled standalone. + + Examples: canbus, mcp23x08_base, mcp23x17_base + + Args: + component_dir: Path to the component's test directory + + Returns: + True if this is a platform component + """ + # Check in the actual component source, not tests + # tests/components/X -> tests/components -> tests -> repo root + repo_root = component_dir.parent.parent.parent + comp_init = ( + repo_root / "esphome" / "components" / component_dir.name / "__init__.py" + ) + + if not comp_init.exists(): + return False + + try: + content = comp_init.read_text() + return "IS_PLATFORM_COMPONENT = True" in content + except Exception: # pylint: disable=broad-exception-caught + return False + + +def _contains_extend_or_remove(data: Any) -> bool: + """Recursively check if data contains Extend or Remove objects. + + Args: + data: Parsed YAML data structure + + Returns: + True if any Extend or Remove objects are found + """ + if isinstance(data, (Extend, Remove)): + return True + + if isinstance(data, dict): + for value in data.values(): + if _contains_extend_or_remove(value): + return True + + if isinstance(data, list): + for item in data: + if _contains_extend_or_remove(item): + return True + + return False + + +def analyze_yaml_file(yaml_file: Path) -> dict[str, Any]: + """Load a YAML file once and extract all needed information. + + This loads the YAML file a single time and extracts all information needed + for component analysis, avoiding multiple file reads. + + Args: + yaml_file: Path to the YAML file to analyze + + Returns: + Dictionary with keys: + - buses: set of common bus package names + - has_extend_remove: bool indicating if Extend/Remove objects are present + - has_direct_bus_config: bool indicating if buses are defined directly (not via packages) + - loaded: bool indicating if file was successfully loaded + """ + result = { + "buses": set(), + "has_extend_remove": False, + "has_direct_bus_config": False, + "loaded": False, + } + + if not yaml_file.exists(): + return result + + try: + data = yaml_util.load_yaml(yaml_file) + result["loaded"] = True + except Exception: # pylint: disable=broad-exception-caught + return result + + # Check for Extend/Remove objects + result["has_extend_remove"] = _contains_extend_or_remove(data) + + # Check if buses are defined directly (not via packages) + # Components that define i2c, spi, uart, or modbus directly in test files + # cannot be grouped because they create unique bus IDs + if isinstance(data, dict): + for bus_type in DIRECT_BUS_TYPES: + if bus_type in data: + result["has_direct_bus_config"] = True + break + + # Extract common bus packages + if not isinstance(data, dict) or "packages" not in data: + return result + + packages = data["packages"] + if not isinstance(packages, dict): + return result + + valid_buses = get_common_bus_packages() + for pkg_name in packages: + if pkg_name not in valid_buses: + continue + result["buses"].add(pkg_name) + # Add any package dependencies (e.g., modbus includes uart) + if pkg_name not in PACKAGE_DEPENDENCIES: + continue + for dep in PACKAGE_DEPENDENCIES[pkg_name]: + if dep not in valid_buses: + continue + result["buses"].add(dep) + + return result + + +def analyze_component(component_dir: Path) -> tuple[dict[str, list[str]], bool, bool]: + """Analyze a component directory to find which buses each platform uses. + + Args: + component_dir: Path to the component's test directory + + Returns: + Tuple of: + - Dictionary mapping platform to list of bus configs + Example: {"esp32-ard": ["i2c", "spi"], "esp32-idf": ["i2c"]} + - Boolean indicating if component uses !extend or !remove + - Boolean indicating if component defines buses directly (not via packages) + """ + if not component_dir.is_dir(): + return {}, False, False + + platform_buses = {} + has_extend_remove = False + has_direct_bus_config = False + + # Analyze all YAML files in the component directory + for yaml_file in component_dir.glob("*.yaml"): + analysis = analyze_yaml_file(yaml_file) + + # Track if any file uses extend/remove + if analysis["has_extend_remove"]: + has_extend_remove = True + + # Track if any file defines buses directly + if analysis["has_direct_bus_config"]: + has_direct_bus_config = True + + # For test.*.yaml files, extract platform and buses + if yaml_file.name.startswith("test.") and yaml_file.suffix == ".yaml": + # Extract platform name (e.g., test.esp32-ard.yaml -> esp32-ard) + platform = yaml_file.stem.replace("test.", "") + # Always add platform, even if it has no buses (empty list) + # This allows grouping components that don't use any shared buses + platform_buses[platform] = ( + sorted(analysis["buses"]) if analysis["buses"] else [] + ) + + return platform_buses, has_extend_remove, has_direct_bus_config + + +def analyze_all_components( + tests_dir: Path = None, +) -> tuple[dict[str, dict[str, list[str]]], set[str], set[str]]: + """Analyze all component test directories. + + Args: + tests_dir: Path to tests/components directory (defaults to auto-detect) + + Returns: + Tuple of: + - Dictionary mapping component name to platform->buses mapping + - Set of component names that cannot be grouped + - Set of component names that define buses directly (need migration warning) + """ + if tests_dir is None: + tests_dir = Path("tests/components") + + if not tests_dir.exists(): + print(f"Error: {tests_dir} does not exist", file=sys.stderr) + return {}, set(), set() + + components = {} + non_groupable = set() + direct_bus_components = set() + + for component_dir in sorted(tests_dir.iterdir()): + if not component_dir.is_dir(): + continue + + component_name = component_dir.name + platform_buses, has_extend_remove, has_direct_bus_config = analyze_component( + component_dir + ) + + if platform_buses: + components[component_name] = platform_buses + + # Note: Components using $component_dir are now groupable because the merge + # script rewrites these to absolute paths with component-specific substitutions + + # Check if component is explicitly isolated + # These have known issues that prevent grouping with other components + if component_name in ISOLATED_COMPONENTS: + non_groupable.add(component_name) + + # Check if component is a base bus component + # These ARE the bus platform implementations and define buses directly for testing + # They cannot be grouped with components that use bus packages (causes ID conflicts) + if component_name in BASE_BUS_COMPONENTS: + non_groupable.add(component_name) + + # Check if component uses !extend or !remove directives + # These rely on specific config structure and cannot be merged with other components + # The directives work within a component's own package hierarchy but break when + # merging independent components together + if has_extend_remove: + non_groupable.add(component_name) + + # Check if component defines buses directly in test files + # These create unique bus IDs and cause conflicts when merged + # 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) + direct_bus_components.add(component_name) + + return components, non_groupable, direct_bus_components + + +def create_grouping_signature( + platform_buses: dict[str, list[str]], platform: str +) -> str: + """Create a signature string for grouping components. + + Components with the same signature can be grouped together for testing. + All valid bus types can be grouped since --testing-mode bypasses runtime + conflicts during config validation. + + Args: + platform_buses: Mapping of platform to list of buses + platform: The specific platform to create signature for + + Returns: + Signature string (e.g., "i2c" or "uart") or empty if no valid buses + """ + buses = platform_buses.get(platform, []) + if not buses: + return "" + + # Only include valid bus types in signature + common_buses = get_common_bus_packages() + valid_buses = [b for b in buses if b in common_buses] + if not valid_buses: + return "" + + return "+".join(sorted(valid_buses)) + + +def group_components_by_signature( + components: dict[str, dict[str, list[str]]], platform: str +) -> dict[str, list[str]]: + """Group components by their bus signature for a specific platform. + + Args: + components: Component analysis results from analyze_all_components() + platform: Platform to group for (e.g., "esp32-ard") + + Returns: + Dictionary mapping signature to list of component names + Example: {"i2c+uart_19200": ["comp1", "comp2"], "spi": ["comp3"]} + """ + signature_groups: dict[str, list[str]] = {} + + for component_name, platform_buses in components.items(): + if platform not in platform_buses: + continue + + signature = create_grouping_signature(platform_buses, platform) + if not signature: + continue + + if signature not in signature_groups: + signature_groups[signature] = [] + signature_groups[signature].append(component_name) + + return signature_groups + + +def main() -> None: + """Main entry point.""" + parser = argparse.ArgumentParser( + description="Analyze component test files to detect common bus usage" + ) + parser.add_argument( + "--components", + "-c", + nargs="+", + help="Specific components to analyze (default: all)", + ) + parser.add_argument( + "--platform", + "-p", + help="Show grouping for a specific platform", + ) + parser.add_argument( + "--json", + action="store_true", + help="Output as JSON", + ) + parser.add_argument( + "--group", + action="store_true", + help="Show component groupings by bus signature", + ) + + args = parser.parse_args() + + # Analyze components + tests_dir = Path("tests/components") + + if args.components: + # Analyze only specified components + components = {} + non_groupable = set() + direct_bus_components = set() + for comp in args.components: + comp_dir = tests_dir / comp + platform_buses, has_extend_remove, has_direct_bus_config = ( + analyze_component(comp_dir) + ) + if platform_buses: + components[comp] = platform_buses + # Note: Components using $component_dir are now groupable + if comp in ISOLATED_COMPONENTS: + non_groupable.add(comp) + if comp in BASE_BUS_COMPONENTS: + non_groupable.add(comp) + if has_direct_bus_config and comp not in BASE_BUS_COMPONENTS: + non_groupable.add(comp) + direct_bus_components.add(comp) + else: + # Analyze all components + components, non_groupable, direct_bus_components = analyze_all_components( + tests_dir + ) + + # Output results + if args.group and args.platform: + # Show groupings for a specific platform + groups = group_components_by_signature(components, args.platform) + + if args.json: + print(json.dumps(groups, indent=2)) + else: + print(f"Component groupings for {args.platform}:") + print() + for signature, comp_list in sorted(groups.items()): + print(f" {signature}:") + for comp in sorted(comp_list): + print(f" - {comp}") + print() + elif args.json: + # JSON output + print(json.dumps(components, indent=2)) + else: + # Human-readable output + for component, platform_buses in sorted(components.items()): + non_groupable_marker = ( + " [NON-GROUPABLE]" if component in non_groupable else "" + ) + print(f"{component}{non_groupable_marker}:") + for platform, buses in sorted(platform_buses.items()): + bus_str = ", ".join(buses) + print(f" {platform}: {bus_str}") + print() + print(f"Total components analyzed: {len(components)}") + if non_groupable: + print(f"Non-groupable components (use local files): {len(non_groupable)}") + for comp in sorted(non_groupable): + print(f" - {comp}") + + +if __name__ == "__main__": + main() diff --git a/script/merge_component_configs.py b/script/merge_component_configs.py new file mode 100755 index 0000000000..a19b65038c --- /dev/null +++ b/script/merge_component_configs.py @@ -0,0 +1,379 @@ +#!/usr/bin/env python3 +"""Merge multiple component test configurations into a single test file. + +This script combines multiple component test files that use the same common bus +configurations into a single merged test file. This allows testing multiple +compatible components together, reducing CI build time. + +The merger handles: +- Component-specific substitutions (prefixing to avoid conflicts) +- Multiple instances of component configurations +- Shared common bus packages (included only once) +- Platform-specific configurations +- Uses ESPHome's built-in merge_config for proper YAML merging +""" + +from __future__ import annotations + +import argparse +from pathlib import Path +import re +import sys +from typing import Any + +# Add esphome to path so we can import from it +sys.path.insert(0, str(Path(__file__).parent.parent)) + +from esphome import yaml_util +from esphome.config_helpers import merge_config +from script.analyze_component_buses import PACKAGE_DEPENDENCIES, get_common_bus_packages + + +def load_yaml_file(yaml_file: Path) -> dict: + """Load YAML file using ESPHome's YAML loader. + + Args: + yaml_file: Path to the YAML file + + Returns: + Parsed YAML as dictionary + """ + if not yaml_file.exists(): + raise FileNotFoundError(f"YAML file not found: {yaml_file}") + + return yaml_util.load_yaml(yaml_file) + + +def extract_packages_from_yaml(data: dict) -> dict[str, str]: + """Extract COMMON BUS package includes from parsed YAML. + + Only extracts packages that are from test_build_components/common/, + ignoring component-specific packages. + + Args: + data: Parsed YAML dictionary + + Returns: + Dictionary mapping package name to include path (as string representation) + Only includes common bus packages (i2c, spi, uart, etc.) + """ + if "packages" not in data: + return {} + + packages_value = data["packages"] + if not isinstance(packages_value, dict): + # List format doesn't include common bus packages (those use dict format) + return {} + + # Get common bus package names (cached) + common_bus_packages = get_common_bus_packages() + packages = {} + + # Dictionary format: packages: {name: value} + for name, value in packages_value.items(): + # Only include common bus packages, ignore component-specific ones + if name not in common_bus_packages: + continue + packages[name] = str(value) + # Also track package dependencies (e.g., modbus includes uart) + if name not in PACKAGE_DEPENDENCIES: + continue + for dep in PACKAGE_DEPENDENCIES[name]: + if dep not in common_bus_packages: + continue + # Mark as included via dependency + packages[f"_dep_{dep}"] = f"(included via {name})" + + return packages + + +def prefix_substitutions_in_dict( + data: Any, prefix: str, exclude: set[str] | None = None +) -> Any: + """Recursively prefix all substitution references in a data structure. + + Args: + data: YAML data structure (dict, list, or scalar) + prefix: Prefix to add to substitution names + exclude: Set of substitution names to exclude from prefixing + + Returns: + Data structure with prefixed substitution references + """ + if exclude is None: + exclude = set() + + def replace_sub(text: str) -> str: + """Replace substitution references in a string.""" + + def replace_match(match): + sub_name = match.group(1) + if sub_name in exclude: + return match.group(0) + # Always use braced format in output for consistency + return f"${{{prefix}_{sub_name}}}" + + # Match both ${substitution} and $substitution formats + return re.sub(r"\$\{?(\w+)\}?", replace_match, text) + + if isinstance(data, dict): + result = {} + for key, value in data.items(): + result[key] = prefix_substitutions_in_dict(value, prefix, exclude) + return result + if isinstance(data, list): + return [prefix_substitutions_in_dict(item, prefix, exclude) for item in data] + if isinstance(data, str): + return replace_sub(data) + return data + + +def deduplicate_by_id(data: dict) -> dict: + """Deduplicate list items with the same ID. + + Keeps only the first occurrence of each ID. If items with the same ID + are identical, this silently deduplicates. If they differ, the first + one is kept (ESPHome's validation will catch if this causes issues). + + Args: + data: Parsed config dictionary + + Returns: + Config with deduplicated lists + """ + if not isinstance(data, dict): + return data + + result = {} + for key, value in data.items(): + if isinstance(value, list): + # Check for items with 'id' field + seen_ids = set() + deduped_list = [] + + for item in value: + if isinstance(item, dict) and "id" in item: + item_id = item["id"] + if item_id not in seen_ids: + seen_ids.add(item_id) + deduped_list.append(item) + # else: skip duplicate ID (keep first occurrence) + else: + # No ID, just add it + deduped_list.append(item) + + result[key] = deduped_list + elif isinstance(value, dict): + # Recursively deduplicate nested dicts + result[key] = deduplicate_by_id(value) + else: + result[key] = value + + return result + + +def merge_component_configs( + component_names: list[str], + platform: str, + tests_dir: Path, + output_file: Path, +) -> None: + """Merge multiple component test configs into a single file. + + Args: + component_names: List of component names to merge + platform: Platform to merge for (e.g., "esp32-ard") + tests_dir: Path to tests/components directory + output_file: Path to output merged config file + """ + if not component_names: + raise ValueError("No components specified") + + # Track packages to ensure they're identical + all_packages = None + + # Start with empty config + merged_config_data = {} + + # Process each component + for comp_name in component_names: + comp_dir = tests_dir / comp_name + test_file = comp_dir / f"test.{platform}.yaml" + + if not test_file.exists(): + raise FileNotFoundError(f"Test file not found: {test_file}") + + # Load the component's test file + comp_data = load_yaml_file(test_file) + + # Validate packages are compatible + # Components with no packages (no_buses) can merge with any group + comp_packages = extract_packages_from_yaml(comp_data) + + if all_packages is None: + # First component - set the baseline + all_packages = comp_packages + elif not comp_packages: + # This component has no packages (no_buses) - it can merge with any group + pass + elif not all_packages: + # Previous components had no packages, but this one does - adopt these packages + all_packages = comp_packages + elif comp_packages != all_packages: + # Both have packages but they differ - this is an error + raise ValueError( + f"Component {comp_name} has different packages than previous components. " + f"Expected: {all_packages}, Got: {comp_packages}. " + f"All components must use the same common bus configs to be merged." + ) + + # Handle $component_dir by replacing with absolute path + # This allows components that use local file references to be grouped + comp_abs_dir = str(comp_dir.absolute()) + + # Save top-level substitutions BEFORE expanding packages + # In ESPHome, top-level substitutions override package substitutions + top_level_subs = ( + comp_data["substitutions"].copy() + if "substitutions" in comp_data and comp_data["substitutions"] is not None + else {} + ) + + # Expand packages - but we'll restore substitution priority after + if "packages" in comp_data: + packages_value = comp_data["packages"] + + if isinstance(packages_value, dict): + # Dict format - check each package + common_bus_packages = get_common_bus_packages() + for pkg_name, pkg_value in list(packages_value.items()): + if pkg_name in common_bus_packages: + continue + if not isinstance(pkg_value, dict): + continue + # Component-specific package - expand its content into top level + comp_data = merge_config(comp_data, pkg_value) + elif isinstance(packages_value, list): + # List format - expand all package includes + for pkg_value in packages_value: + if not isinstance(pkg_value, dict): + continue + comp_data = merge_config(comp_data, pkg_value) + + # Remove all packages (common will be re-added at the end) + del comp_data["packages"] + + # Restore top-level substitution priority + # Top-level substitutions override any from packages + if "substitutions" not in comp_data or comp_data["substitutions"] is None: + comp_data["substitutions"] = {} + + # Merge: package subs as base, top-level subs override + comp_data["substitutions"].update(top_level_subs) + + # Now prefix the final merged substitutions + comp_data["substitutions"] = { + f"{comp_name}_{sub_name}": sub_value + for sub_name, sub_value in comp_data["substitutions"].items() + } + + # Add component_dir substitution with absolute path for this component + comp_data["substitutions"][f"{comp_name}_component_dir"] = comp_abs_dir + + # Prefix substitution references throughout the config + comp_data = prefix_substitutions_in_dict(comp_data, comp_name) + + # Use ESPHome's merge_config to merge this component into the result + # merge_config handles list merging with ID-based deduplication automatically + merged_config_data = merge_config(merged_config_data, comp_data) + + # Add packages back (only once, since they're identical) + # IMPORTANT: Only re-add common bus packages (spi, i2c, uart, etc.) + # Do NOT re-add component-specific packages as they contain unprefixed $component_dir refs + if all_packages: + first_comp_data = load_yaml_file( + tests_dir / component_names[0] / f"test.{platform}.yaml" + ) + if "packages" in first_comp_data and isinstance( + first_comp_data["packages"], dict + ): + # Filter to only include common bus packages + # Only dict format can contain common bus packages + common_bus_packages = get_common_bus_packages() + filtered_packages = { + name: value + for name, value in first_comp_data["packages"].items() + if name in common_bus_packages + } + if filtered_packages: + merged_config_data["packages"] = filtered_packages + + # Deduplicate items with same ID (keeps first occurrence) + merged_config_data = deduplicate_by_id(merged_config_data) + + # Remove esphome section since it will be provided by the wrapper file + # The wrapper file includes this merged config via packages and provides + # the proper esphome: section with name, platform, etc. + if "esphome" in merged_config_data: + del merged_config_data["esphome"] + + # Write merged config + output_file.parent.mkdir(parents=True, exist_ok=True) + yaml_content = yaml_util.dump(merged_config_data) + output_file.write_text(yaml_content) + + print(f"Successfully merged {len(component_names)} components into {output_file}") + + +def main() -> None: + """Main entry point.""" + parser = argparse.ArgumentParser( + description="Merge multiple component test configs into a single file" + ) + parser.add_argument( + "--components", + "-c", + required=True, + help="Comma-separated list of component names to merge", + ) + parser.add_argument( + "--platform", + "-p", + required=True, + help="Platform to merge for (e.g., esp32-ard)", + ) + parser.add_argument( + "--output", + "-o", + required=True, + type=Path, + help="Output file path for merged config", + ) + parser.add_argument( + "--tests-dir", + type=Path, + default=Path("tests/components"), + help="Path to tests/components directory", + ) + + args = parser.parse_args() + + component_names = [c.strip() for c in args.components.split(",")] + + try: + merge_component_configs( + component_names=component_names, + platform=args.platform, + tests_dir=args.tests_dir, + output_file=args.output, + ) + except Exception as e: + print(f"Error merging configs: {e}", file=sys.stderr) + import traceback + + traceback.print_exc() + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/script/split_components_for_ci.py b/script/split_components_for_ci.py new file mode 100755 index 0000000000..ad2261499c --- /dev/null +++ b/script/split_components_for_ci.py @@ -0,0 +1,268 @@ +#!/usr/bin/env python3 +"""Split components into batches with intelligent grouping. + +This script analyzes components to identify which ones share common bus configurations +and intelligently groups them into batches to maximize the efficiency of the +component grouping system in CI. + +Components with the same bus signature are placed in the same batch whenever possible, +allowing the test_build_components.py script to merge them into single builds. +""" + +from __future__ import annotations + +import argparse +from collections import defaultdict +import json +from pathlib import Path +import sys + +# Add esphome to path +sys.path.insert(0, str(Path(__file__).parent.parent)) + +from script.analyze_component_buses import ( + ISOLATED_COMPONENTS, + NO_BUSES_SIGNATURE, + analyze_all_components, + create_grouping_signature, +) + +# Weighting for batch creation +# Isolated components can't be grouped/merged, so they count as 10x +# Groupable components can be merged into single builds, so they count as 1x +ISOLATED_WEIGHT = 10 +GROUPABLE_WEIGHT = 1 + + +def has_test_files(component_name: str, tests_dir: Path) -> bool: + """Check if a component has test files. + + Args: + component_name: Name of the component + tests_dir: Path to tests/components directory + + Returns: + True if the component has test.*.yaml files + """ + component_dir = tests_dir / component_name + if not component_dir.exists() or not component_dir.is_dir(): + return False + + # Check for test.*.yaml files + return any(component_dir.glob("test.*.yaml")) + + +def create_intelligent_batches( + components: list[str], + tests_dir: Path, + batch_size: int = 40, +) -> list[list[str]]: + """Create batches optimized for component grouping. + + Args: + components: List of component names to batch + tests_dir: Path to tests/components directory + batch_size: Target size for each batch + + Returns: + List of component batches (lists of component names) + """ + # Filter out components without test files + # Platform components like 'climate' and 'climate_ir' don't have test files + components_with_tests = [ + comp for comp in components if has_test_files(comp, tests_dir) + ] + + # Log filtered components to stderr for debugging + if len(components_with_tests) < len(components): + filtered_out = set(components) - set(components_with_tests) + print( + f"Note: Filtered {len(filtered_out)} components without test files: " + f"{', '.join(sorted(filtered_out))}", + file=sys.stderr, + ) + + # Analyze all components to get their bus signatures + component_buses, non_groupable, _direct_bus_components = analyze_all_components( + tests_dir + ) + + # Group components by their bus signature ONLY (ignore platform) + # All platforms will be tested by test_build_components.py for each batch + # Key: signature, Value: list of components + signature_groups: dict[str, list[str]] = defaultdict(list) + + for component in components_with_tests: + # Components that can't be grouped get unique signatures + # This includes both manually curated ISOLATED_COMPONENTS and + # automatically detected non_groupable components + # These can share a batch/runner but won't be grouped/merged + if component in ISOLATED_COMPONENTS or component in non_groupable: + signature_groups[f"isolated_{component}"].append(component) + continue + + # Get signature from any platform (they should all have the same buses) + # Components not in component_buses were filtered out by has_test_files check + comp_platforms = component_buses[component] + for platform, buses in comp_platforms.items(): + if buses: + signature = create_grouping_signature({platform: buses}, platform) + # Group by signature only - platform doesn't matter for batching + signature_groups[signature].append(component) + break # Only use first platform for grouping + else: + # No buses found for any platform - can be grouped together + signature_groups[NO_BUSES_SIGNATURE].append(component) + + # Create batches by keeping signature groups together + # Components with the same signature stay in the same batches + batches = [] + + # Sort signature groups to prioritize groupable components + # 1. Put "isolated_*" signatures last (can't be grouped with others) + # 2. Sort groupable signatures by size (largest first) + # 3. "no_buses" components CAN be grouped together + def sort_key(item): + signature, components = item + is_isolated = signature.startswith("isolated_") + # Put "isolated_*" last (1), groupable first (0) + # Within each category, sort by size (largest first) + return (is_isolated, -len(components)) + + sorted_groups = sorted(signature_groups.items(), key=sort_key) + + # Strategy: Create batches using weighted sizes + # - Isolated components count as 10x (since they can't be grouped/merged) + # - Groupable components count as 1x (can be merged into single builds) + # - This distributes isolated components across more runners + # - Ensures each runner has a good mix of groupable vs isolated components + + current_batch = [] + current_weight = 0 + + for signature, group_components in sorted_groups: + is_isolated = signature.startswith("isolated_") + weight_per_component = ISOLATED_WEIGHT if is_isolated else GROUPABLE_WEIGHT + + for component in group_components: + # Check if adding this component would exceed the batch size + if current_weight + weight_per_component > batch_size and current_batch: + # Start a new batch + batches.append(current_batch) + current_batch = [] + current_weight = 0 + + # Add component to current batch + current_batch.append(component) + current_weight += weight_per_component + + # Don't forget the last batch + if current_batch: + batches.append(current_batch) + + return batches + + +def main() -> int: + """Main entry point.""" + parser = argparse.ArgumentParser( + description="Split components into intelligent batches for CI testing" + ) + parser.add_argument( + "--components", + "-c", + required=True, + help="JSON array of component names", + ) + parser.add_argument( + "--batch-size", + "-b", + type=int, + default=40, + help="Target batch size (default: 40, weighted)", + ) + parser.add_argument( + "--tests-dir", + type=Path, + default=Path("tests/components"), + help="Path to tests/components directory", + ) + parser.add_argument( + "--output", + "-o", + choices=["json", "github"], + default="github", + help="Output format (json or github for GitHub Actions)", + ) + + args = parser.parse_args() + + # Parse component list from JSON + try: + components = json.loads(args.components) + except json.JSONDecodeError as e: + print(f"Error parsing components JSON: {e}", file=sys.stderr) + return 1 + + if not isinstance(components, list): + print("Components must be a JSON array", file=sys.stderr) + return 1 + + # Create intelligent batches + batches = create_intelligent_batches( + components=components, + tests_dir=args.tests_dir, + batch_size=args.batch_size, + ) + + # Convert batches to space-separated strings for CI + batch_strings = [" ".join(batch) for batch in batches] + + if args.output == "json": + # Output as JSON array + print(json.dumps(batch_strings)) + else: + # Output for GitHub Actions (set output) + output_json = json.dumps(batch_strings) + print(f"components={output_json}") + + # Print summary to stderr so it shows in CI logs + # Count actual components being batched + actual_components = sum(len(batch.split()) for batch in batch_strings) + + # Re-analyze to get isolated component counts for summary + _, non_groupable, _ = analyze_all_components(args.tests_dir) + + # Count isolated vs groupable components + all_batched_components = [comp for batch in batches for comp in batch] + isolated_count = sum( + 1 + for comp in all_batched_components + if comp in ISOLATED_COMPONENTS or comp in non_groupable + ) + groupable_count = actual_components - isolated_count + + print("\n=== Intelligent Batch Summary ===", file=sys.stderr) + print(f"Total components requested: {len(components)}", file=sys.stderr) + print(f"Components with test files: {actual_components}", file=sys.stderr) + print(f" - Groupable (weight=1): {groupable_count}", file=sys.stderr) + print(f" - Isolated (weight=10): {isolated_count}", file=sys.stderr) + if actual_components < len(components): + print( + f"Components skipped (no test files): {len(components) - actual_components}", + file=sys.stderr, + ) + print(f"Number of batches: {len(batches)}", file=sys.stderr) + print(f"Batch size target (weighted): {args.batch_size}", file=sys.stderr) + if len(batches) > 0: + print( + f"Average components per batch: {actual_components / len(batches):.1f}", + file=sys.stderr, + ) + print(file=sys.stderr) + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/script/test_build_components b/script/test_build_components deleted file mode 100755 index 3796280176..0000000000 --- a/script/test_build_components +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash - -set -e - -help() { - echo "Usage: $0 [-e ] [-c ] [-t ]" 1>&2 - echo 1>&2 - echo " - e - Parameter for esphome command. Default compile. Common alternative is config." 1>&2 - echo " - c - Component folder name to test. Default *. E.g. '-c logger'." 1>&2 - echo " - t - Target name to test. Put '-t list' to display all possibilities. E.g. '-t esp32-s2-idf-51'." 1>&2 - exit 1 -} - -# Parse parameter: -# - `e` - Parameter for `esphome` command. Default `compile`. Common alternative is `config`. -# - `c` - Component folder name to test. Default `*`. -esphome_command="compile" -target_component="*" -while getopts e:c:t: flag -do - case $flag in - e) esphome_command=${OPTARG};; - c) target_component=${OPTARG};; - t) requested_target_platform=${OPTARG};; - \?) help;; - esac -done - -cd "$(dirname "$0")/.." - -if ! [ -d "./tests/test_build_components/build" ]; then - mkdir ./tests/test_build_components/build -fi - -start_esphome() { - if [ -n "$requested_target_platform" ] && [ "$requested_target_platform" != "$target_platform_with_version" ]; then - echo "Skipping $target_platform_with_version" - return - fi - # create dynamic yaml file in `build` folder. - # `./tests/test_build_components/build/[target_component].[test_name].[target_platform_with_version].yaml` - component_test_file="./tests/test_build_components/build/$target_component.$test_name.$target_platform_with_version.yaml" - - cp $target_platform_file $component_test_file - if [[ "$OSTYPE" == "darwin"* ]]; then - # macOS sed is...different - sed -i '' "s!\$component_test_file!../../.$f!g" $component_test_file - else - sed -i "s!\$component_test_file!../../.$f!g" $component_test_file - fi - - # Start esphome process - echo "> [$target_component] [$test_name] [$target_platform_with_version]" - set -x - # TODO: Validate escape of Command line substitution value - python3 -m esphome -s component_name $target_component -s component_dir ../../components/$target_component -s test_name $test_name -s target_platform $target_platform $esphome_command $component_test_file - { set +x; } 2>/dev/null -} - -# Find all test yaml files. -# - `./tests/components/[target_component]/[test_name].[target_platform].yaml` -# - `./tests/components/[target_component]/[test_name].all.yaml` -for f in ./tests/components/$target_component/*.*.yaml; do - [ -f "$f" ] || continue - IFS='/' read -r -a folder_name <<< "$f" - target_component="${folder_name[3]}" - - IFS='.' read -r -a file_name <<< "${folder_name[4]}" - test_name="${file_name[0]}" - target_platform="${file_name[1]}" - file_name_parts=${#file_name[@]} - - if [ "$target_platform" = "all" ] || [ $file_name_parts = 2 ]; then - # Test has *not* defined a specific target platform. Need to run tests for all possible target platforms. - - for target_platform_file in ./tests/test_build_components/build_components_base.*.yaml; do - IFS='/' read -r -a folder_name <<< "$target_platform_file" - IFS='.' read -r -a file_name <<< "${folder_name[3]}" - target_platform="${file_name[1]}" - - start_esphome - done - - else - # Test has defined a specific target platform. - - # Validate we have a base test yaml for selected platform. - # The target_platform is sourced from the following location. - # 1. `./tests/test_build_components/build_components_base.[target_platform].yaml` - # 2. `./tests/test_build_components/build_components_base.[target_platform]-ard.yaml` - target_platform_file="./tests/test_build_components/build_components_base.$target_platform.yaml" - if ! [ -f "$target_platform_file" ]; then - echo "No base test file [./tests/test_build_components/build_components_base.$target_platform.yaml] for component test [$f] found." - exit 1 - fi - - for target_platform_file in ./tests/test_build_components/build_components_base.$target_platform*.yaml; do - # trim off "./tests/test_build_components/build_components_base." prefix - target_platform_with_version=${target_platform_file:52} - # ...now remove suffix starting with "." leaving just the test target hardware and software platform (possibly with version) - # For example: "esp32-s3-idf-50" - target_platform_with_version=${target_platform_with_version%.*} - start_esphome - done - fi -done diff --git a/script/test_build_components b/script/test_build_components new file mode 120000 index 0000000000..832a4a72c6 --- /dev/null +++ b/script/test_build_components @@ -0,0 +1 @@ +test_build_components.py \ No newline at end of file diff --git a/script/test_build_components.py b/script/test_build_components.py new file mode 100755 index 0000000000..e27bd695c1 --- /dev/null +++ b/script/test_build_components.py @@ -0,0 +1,931 @@ +#!/usr/bin/env python3 +"""Test ESPHome component builds with intelligent grouping. + +This script replaces the bash test_build_components script with Python, +adding support for intelligent component grouping based on shared bus +configurations to reduce CI build time. + +Features: +- Analyzes components for shared common bus configs +- Groups compatible components together +- Merges configs for grouped components +- Uses --testing-mode for grouped tests +- Maintains backward compatibility with single component testing +""" + +from __future__ import annotations + +import argparse +from collections import defaultdict +import hashlib +import os +from pathlib import Path +import subprocess +import sys + +# Add esphome to path +sys.path.insert(0, str(Path(__file__).parent.parent)) + +# pylint: disable=wrong-import-position +from script.analyze_component_buses import ( + BASE_BUS_COMPONENTS, + ISOLATED_COMPONENTS, + NO_BUSES_SIGNATURE, + analyze_all_components, + create_grouping_signature, + is_platform_component, + uses_local_file_references, +) +from script.merge_component_configs import merge_component_configs + +# Platform-specific maximum group sizes +# ESP8266 has limited IRAM and can't handle large component groups +PLATFORM_MAX_GROUP_SIZE = { + "esp8266-ard": 10, # ESP8266 Arduino has limited IRAM + "esp8266-idf": 10, # ESP8266 IDF also has limited IRAM + # BK72xx now uses BK7252 board (1.62MB flash vs 1.03MB) - no limit needed + # Other platforms can handle larger groups +} + + +def show_disk_space_if_ci(esphome_command: str) -> None: + """Show disk space usage if running in CI during compile. + + Args: + esphome_command: The esphome command being run (config/compile/clean) + """ + if os.environ.get("GITHUB_ACTIONS") and esphome_command == "compile": + print("\n" + "=" * 80) + print("Disk Space After Build:") + print("=" * 80) + subprocess.run(["df", "-h"], check=False) + print("=" * 80 + "\n") + + +def find_component_tests( + components_dir: Path, component_pattern: str = "*" +) -> dict[str, list[Path]]: + """Find all component test files. + + Args: + components_dir: Path to tests/components directory + component_pattern: Glob pattern for component names + + Returns: + Dictionary mapping component name to list of test files + """ + component_tests = defaultdict(list) + + for comp_dir in components_dir.glob(component_pattern): + if not comp_dir.is_dir(): + continue + + for test_file in comp_dir.glob("test.*.yaml"): + component_tests[comp_dir.name].append(test_file) + + return dict(component_tests) + + +def parse_test_filename(test_file: Path) -> tuple[str, str]: + """Parse test filename to extract test name and platform. + + Args: + test_file: Path to test file + + Returns: + Tuple of (test_name, platform) + """ + parts = test_file.stem.split(".") + if len(parts) == 2: + return parts[0], parts[1] # test, platform + return parts[0], "all" + + +def get_platform_base_files(base_dir: Path) -> dict[str, list[Path]]: + """Get all platform base files. + + Args: + base_dir: Path to test_build_components directory + + Returns: + Dictionary mapping platform to list of base files (for version variants) + """ + platform_files = defaultdict(list) + + for base_file in base_dir.glob("build_components_base.*.yaml"): + # Extract platform from filename + # e.g., build_components_base.esp32-idf.yaml -> esp32-idf + # or build_components_base.esp32-idf-50.yaml -> esp32-idf + filename = base_file.stem + parts = filename.replace("build_components_base.", "").split("-") + + # Platform is everything before version number (if present) + # Check if last part is a number (version) + platform = "-".join(parts[:-1]) if parts[-1].isdigit() else "-".join(parts) + + platform_files[platform].append(base_file) + + return dict(platform_files) + + +def extract_platform_with_version(base_file: Path) -> str: + """Extract platform with version from base filename. + + Args: + base_file: Path to base file + + Returns: + Platform with version (e.g., "esp32-idf-50" or "esp32-idf") + """ + # Remove "build_components_base." prefix and ".yaml" suffix + return base_file.stem.replace("build_components_base.", "") + + +def run_esphome_test( + component: str, + test_file: Path, + platform: str, + platform_with_version: str, + base_file: Path, + build_dir: Path, + esphome_command: str, + continue_on_fail: bool, + use_testing_mode: bool = False, +) -> tuple[bool, str]: + """Run esphome test for a single component. + + Args: + component: Component name + test_file: Path to component test file + platform: Platform name (e.g., "esp32-idf") + platform_with_version: Platform with version (e.g., "esp32-idf-50") + base_file: Path to platform base file + build_dir: Path to build directory + esphome_command: ESPHome command (config/compile) + continue_on_fail: Whether to continue on failure + use_testing_mode: Whether to use --testing-mode flag + + Returns: + Tuple of (success status, command string) + """ + test_name = test_file.stem.split(".")[0] + + # Create dynamic test file in build directory + output_file = build_dir / f"{component}.{test_name}.{platform_with_version}.yaml" + + # Copy base file and substitute component test file reference + base_content = base_file.read_text() + # Get relative path from build dir to test file + repo_root = Path(__file__).parent.parent + component_test_ref = f"../../{test_file.relative_to(repo_root / 'tests')}" + output_content = base_content.replace("$component_test_file", component_test_ref) + output_file.write_text(output_content) + + # Build esphome command + cmd = [ + sys.executable, + "-m", + "esphome", + ] + + # Add --testing-mode if needed (must be before subcommand) + if use_testing_mode: + cmd.append("--testing-mode") + + # Add substitutions + cmd.extend( + [ + "-s", + "component_name", + component, + "-s", + "component_dir", + f"../../components/{component}", + "-s", + "test_name", + test_name, + "-s", + "target_platform", + platform, + ] + ) + + # Add command and config file + cmd.extend([esphome_command, str(output_file)]) + + # Build command string for display/logging + cmd_str = " ".join(cmd) + + # Run command + print(f"> [{component}] [{test_name}] [{platform_with_version}]") + if use_testing_mode: + print(" (using --testing-mode)") + + try: + result = subprocess.run(cmd, check=False) + success = result.returncode == 0 + + # Show disk space after build in CI during compile + show_disk_space_if_ci(esphome_command) + + if not success and not continue_on_fail: + # Print command immediately for failed tests + print(f"\n{'=' * 80}") + print("FAILED - Command to reproduce:") + print(f"{'=' * 80}") + print(cmd_str) + print() + raise subprocess.CalledProcessError(result.returncode, cmd) + return success, cmd_str + except subprocess.CalledProcessError: + # Re-raise if we're not continuing on fail + if not continue_on_fail: + raise + return False, cmd_str + + +def run_grouped_test( + components: list[str], + platform: str, + platform_with_version: str, + base_file: Path, + build_dir: Path, + tests_dir: Path, + esphome_command: str, + continue_on_fail: bool, +) -> tuple[bool, str]: + """Run esphome test for a group of components with shared bus configs. + + Args: + components: List of component names to test together + platform: Platform name (e.g., "esp32-idf") + platform_with_version: Platform with version (e.g., "esp32-idf-50") + base_file: Path to platform base file + build_dir: Path to build directory + tests_dir: Path to tests/components directory + esphome_command: ESPHome command (config/compile) + continue_on_fail: Whether to continue on failure + + Returns: + Tuple of (success status, command string) + """ + # Create merged config + group_name = "_".join(components[:3]) # Use first 3 components for name + if len(components) > 3: + group_name += f"_plus_{len(components) - 3}" + + # Create unique device name by hashing sorted component list + platform + # This prevents conflicts when different component groups are tested + sorted_components = sorted(components) + hash_input = "_".join(sorted_components) + "_" + platform + group_hash = hashlib.md5(hash_input.encode()).hexdigest()[:8] + device_name = f"comptest{platform.replace('-', '')}{group_hash}" + + merged_config_file = build_dir / f"merged_{group_name}.{platform_with_version}.yaml" + + try: + merge_component_configs( + component_names=components, + platform=platform_with_version, + tests_dir=tests_dir, + output_file=merged_config_file, + ) + except Exception as e: # pylint: disable=broad-exception-caught + print(f"Error merging configs for {components}: {e}") + if not continue_on_fail: + raise + # Return empty command string since we failed before building the command + return False, f"# Failed during config merge: {e}" + + # Create test file that includes merged config + output_file = build_dir / f"test_{group_name}.{platform_with_version}.yaml" + base_content = base_file.read_text() + merged_ref = merged_config_file.name + output_content = base_content.replace("$component_test_file", merged_ref) + output_file.write_text(output_content) + + # Build esphome command with --testing-mode + cmd = [ + sys.executable, + "-m", + "esphome", + "--testing-mode", # Required for grouped tests + "-s", + "component_name", + device_name, # Use unique hash-based device name + "-s", + "component_dir", + "../../components", + "-s", + "test_name", + "merged", + "-s", + "target_platform", + platform, + esphome_command, + str(output_file), + ] + + # Build command string for display/logging + cmd_str = " ".join(cmd) + + # Run command + components_str = ", ".join(components) + print(f"> [GROUPED: {components_str}] [{platform_with_version}]") + print(" (using --testing-mode)") + + try: + result = subprocess.run(cmd, check=False) + success = result.returncode == 0 + + # Show disk space after build in CI during compile + show_disk_space_if_ci(esphome_command) + + if not success and not continue_on_fail: + # Print command immediately for failed tests + print(f"\n{'=' * 80}") + print("FAILED - Command to reproduce:") + print(f"{'=' * 80}") + print(cmd_str) + print() + raise subprocess.CalledProcessError(result.returncode, cmd) + return success, cmd_str + except subprocess.CalledProcessError: + # Re-raise if we're not continuing on fail + if not continue_on_fail: + raise + return False, cmd_str + + +def run_grouped_component_tests( + all_tests: dict[str, list[Path]], + platform_filter: str | None, + platform_bases: dict[str, list[Path]], + tests_dir: Path, + build_dir: Path, + esphome_command: str, + continue_on_fail: bool, +) -> tuple[set[tuple[str, str]], list[str], list[str], dict[str, str]]: + """Run grouped component tests. + + Args: + all_tests: Dictionary mapping component names to test files + platform_filter: Optional platform to filter by + platform_bases: Platform base files mapping + tests_dir: Path to tests/components directory + build_dir: Path to build directory + esphome_command: ESPHome command (config/compile) + continue_on_fail: Whether to continue on failure + + Returns: + Tuple of (tested_components, passed_tests, failed_tests, failed_commands) + """ + tested_components = set() + passed_tests = [] + failed_tests = [] + failed_commands = {} # Map test_id to command string + + # Group components by platform and bus signature + grouped_components: dict[tuple[str, str], list[str]] = defaultdict(list) + print("\n" + "=" * 80) + print("Analyzing components for intelligent grouping...") + print("=" * 80) + component_buses, non_groupable, direct_bus_components = analyze_all_components( + tests_dir + ) + + # Track why components can't be grouped (for detailed output) + non_groupable_reasons = {} + + # Group by (platform, bus_signature) + for component, platforms in component_buses.items(): + if component not in all_tests: + continue + + # Skip components that must be tested in isolation + # These are shown separately and should not be in non_groupable_reasons + if component in ISOLATED_COMPONENTS: + continue + + # Skip base bus components (these test the bus platforms themselves) + if component in BASE_BUS_COMPONENTS: + continue + + # Skip components that use local file references or direct bus configs + if component in non_groupable: + # Track the reason (using pre-calculated results to avoid expensive re-analysis) + if component not in non_groupable_reasons: + if component in direct_bus_components: + non_groupable_reasons[component] = ( + "Defines buses directly (not via packages) - NEEDS MIGRATION" + ) + elif uses_local_file_references(tests_dir / component): + non_groupable_reasons[component] = ( + "Uses local file references ($component_dir)" + ) + elif is_platform_component(tests_dir / component): + non_groupable_reasons[component] = ( + "Platform component (abstract base class)" + ) + else: + non_groupable_reasons[component] = ( + "Uses !extend or !remove directives" + ) + continue + + for platform, buses in platforms.items(): + # Skip if platform doesn't match filter + if platform_filter and not platform.startswith(platform_filter): + continue + + # Create signature for this component's bus configuration + # Components with no buses get NO_BUSES_SIGNATURE so they can be grouped together + if buses: + signature = create_grouping_signature({platform: buses}, platform) + else: + signature = NO_BUSES_SIGNATURE + + # Add to grouped components (including those with no buses) + if signature: + grouped_components[(platform, signature)].append(component) + + # Print detailed grouping plan + print("\nGrouping Plan:") + print("-" * 80) + + # Show isolated components (must test individually due to known issues) + isolated_in_tests = [c for c in ISOLATED_COMPONENTS if c in all_tests] + if isolated_in_tests: + print( + f"\n⚠ {len(isolated_in_tests)} components must be tested in isolation (known build issues):" + ) + for comp in sorted(isolated_in_tests): + reason = ISOLATED_COMPONENTS[comp] + print(f" - {comp}: {reason}") + + # Show base bus components (test the bus platform implementations) + base_bus_in_tests = [c for c in BASE_BUS_COMPONENTS if c in all_tests] + if base_bus_in_tests: + print( + f"\n○ {len(base_bus_in_tests)} base bus platform components (tested individually):" + ) + for comp in sorted(base_bus_in_tests): + print(f" - {comp}") + + # Show excluded components with detailed reasons + if non_groupable_reasons: + excluded_in_tests = [c for c in non_groupable_reasons if c in all_tests] + if excluded_in_tests: + print( + f"\n⚠ {len(excluded_in_tests)} components excluded from grouping (each needs individual build):" + ) + # Group by reason to show summary + direct_bus = [ + c + for c in excluded_in_tests + if "NEEDS MIGRATION" in non_groupable_reasons.get(c, "") + ] + if direct_bus: + print( + f"\n ⚠⚠⚠ {len(direct_bus)} DEFINE BUSES DIRECTLY - NEED MIGRATION TO PACKAGES:" + ) + for comp in sorted(direct_bus): + print(f" - {comp}") + + other_reasons = [ + c + for c in excluded_in_tests + if "NEEDS MIGRATION" not in non_groupable_reasons.get(c, "") + ] + if other_reasons and len(other_reasons) <= 10: + print("\n Other non-groupable components:") + for comp in sorted(other_reasons): + reason = non_groupable_reasons[comp] + print(f" - {comp}: {reason}") + elif other_reasons: + print( + f"\n Other non-groupable components: {len(other_reasons)} components" + ) + + # Distribute no_buses components into other groups to maximize efficiency + # Components with no buses can merge with any bus group since they have no conflicting requirements + no_buses_by_platform: dict[str, list[str]] = {} + for (platform, signature), components in list(grouped_components.items()): + if signature == NO_BUSES_SIGNATURE: + no_buses_by_platform[platform] = components + # Remove from grouped_components - we'll distribute them + del grouped_components[(platform, signature)] + + # Distribute no_buses components into existing groups for each platform + for platform, no_buses_comps in no_buses_by_platform.items(): + # Find all non-empty groups for this platform (excluding no_buses) + platform_groups = [ + (sig, comps) + for (plat, sig), comps in grouped_components.items() + if plat == platform and sig != NO_BUSES_SIGNATURE + ] + + if platform_groups: + # Distribute no_buses components round-robin across existing groups + for i, comp in enumerate(no_buses_comps): + sig, _ = platform_groups[i % len(platform_groups)] + grouped_components[(platform, sig)].append(comp) + else: + # No other groups for this platform - keep no_buses components together + grouped_components[(platform, NO_BUSES_SIGNATURE)] = no_buses_comps + + # Split groups that exceed platform-specific maximum sizes + # ESP8266 has limited IRAM and can't handle large component groups + split_groups = {} + for (platform, signature), components in list(grouped_components.items()): + max_size = PLATFORM_MAX_GROUP_SIZE.get(platform) + if max_size and len(components) > max_size: + # Split this group into smaller groups + print( + f"\n ℹ️ Splitting {platform} group (signature: {signature}) " + f"from {len(components)} to max {max_size} components per group" + ) + # Remove original group + del grouped_components[(platform, signature)] + # Create split groups + for i in range(0, len(components), max_size): + split_components = components[i : i + max_size] + # Create unique signature for each split group + split_signature = f"{signature}_split{i // max_size + 1}" + split_groups[(platform, split_signature)] = split_components + # Add split groups back + grouped_components.update(split_groups) + + groups_to_test = [] + individual_tests = set() # Use set to avoid duplicates + + for (platform, signature), components in sorted(grouped_components.items()): + if len(components) > 1: + groups_to_test.append((platform, signature, components)) + # Note: Don't add single-component groups to individual_tests here + # They'll be added below when we check for ungrouped components + + # Add components that weren't grouped on any platform + for component in all_tests: + if component not in [c for _, _, comps in groups_to_test for c in comps]: + individual_tests.add(component) + + if groups_to_test: + print(f"\n✓ {len(groups_to_test)} groups will be tested together:") + for platform, signature, components in groups_to_test: + component_list = ", ".join(sorted(components)) + print(f" [{platform}] [{signature}]: {component_list}") + print( + f" → {len(components)} components in 1 build (saves {len(components) - 1} builds)" + ) + + if individual_tests: + print(f"\n○ {len(individual_tests)} components will be tested individually:") + sorted_individual = sorted(individual_tests) + for comp in sorted_individual[:10]: + print(f" - {comp}") + if len(individual_tests) > 10: + print(f" ... and {len(individual_tests) - 10} more") + + # Calculate actual build counts based on test files, not component counts + # Without grouping: every test file would be built separately + total_test_files = sum(len(test_files) for test_files in all_tests.values()) + + # With grouping: + # - 1 build per group (regardless of how many components) + # - Individual components still need all their platform builds + individual_test_file_count = sum( + len(all_tests[comp]) for comp in individual_tests if comp in all_tests + ) + + total_grouped_components = sum(len(comps) for _, _, comps in groups_to_test) + total_builds_with_grouping = len(groups_to_test) + individual_test_file_count + builds_saved = total_test_files - total_builds_with_grouping + + print(f"\n{'=' * 80}") + print( + f"Summary: {total_builds_with_grouping} builds total (vs {total_test_files} without grouping)" + ) + print( + f" • {len(groups_to_test)} grouped builds ({total_grouped_components} components)" + ) + print( + f" • {individual_test_file_count} individual builds ({len(individual_tests)} components)" + ) + if total_test_files > 0: + reduction_pct = (builds_saved / total_test_files) * 100 + print(f" • Saves {builds_saved} builds ({reduction_pct:.1f}% reduction)") + print("=" * 80 + "\n") + + # Execute grouped tests + for (platform, signature), components in grouped_components.items(): + # Only group if we have multiple components with same signature + if len(components) <= 1: + continue + + # Filter out components not in our test list + components_to_group = [c for c in components if c in all_tests] + if len(components_to_group) <= 1: + continue + + # Get platform base files + if platform not in platform_bases: + continue + + for base_file in platform_bases[platform]: + platform_with_version = extract_platform_with_version(base_file) + + # Skip if platform filter doesn't match + if platform_filter and platform != platform_filter: + continue + if ( + platform_filter + and platform_with_version != platform_filter + and not platform_with_version.startswith(f"{platform_filter}-") + ): + continue + + # Run grouped test + success, cmd_str = run_grouped_test( + components=components_to_group, + platform=platform, + platform_with_version=platform_with_version, + base_file=base_file, + build_dir=build_dir, + tests_dir=tests_dir, + esphome_command=esphome_command, + continue_on_fail=continue_on_fail, + ) + + # Mark all components as tested + for comp in components_to_group: + tested_components.add((comp, platform_with_version)) + + # Record result for each component - show all components in grouped tests + test_id = ( + f"GROUPED[{','.join(components_to_group)}].{platform_with_version}" + ) + if success: + passed_tests.append(test_id) + else: + failed_tests.append(test_id) + failed_commands[test_id] = cmd_str + + return tested_components, passed_tests, failed_tests, failed_commands + + +def run_individual_component_test( + component: str, + test_file: Path, + platform: str, + platform_with_version: str, + base_file: Path, + build_dir: Path, + esphome_command: str, + continue_on_fail: bool, + tested_components: set[tuple[str, str]], + passed_tests: list[str], + failed_tests: list[str], + failed_commands: dict[str, str], +) -> None: + """Run an individual component test if not already tested in a group. + + Args: + component: Component name + test_file: Test file path + platform: Platform name + platform_with_version: Platform with version + base_file: Base file for platform + build_dir: Build directory + esphome_command: ESPHome command + continue_on_fail: Whether to continue on failure + tested_components: Set of already tested components + passed_tests: List to append passed test IDs + failed_tests: List to append failed test IDs + failed_commands: Dict to store failed test commands + """ + # Skip if already tested in a group + if (component, platform_with_version) in tested_components: + return + + test_name = test_file.stem.split(".")[0] + success, cmd_str = run_esphome_test( + component=component, + test_file=test_file, + platform=platform, + platform_with_version=platform_with_version, + base_file=base_file, + build_dir=build_dir, + esphome_command=esphome_command, + continue_on_fail=continue_on_fail, + ) + test_id = f"{component}.{test_name}.{platform_with_version}" + if success: + passed_tests.append(test_id) + else: + failed_tests.append(test_id) + failed_commands[test_id] = cmd_str + + +def test_components( + component_patterns: list[str], + platform_filter: str | None, + esphome_command: str, + continue_on_fail: bool, + enable_grouping: bool = True, +) -> int: + """Test components with optional intelligent grouping. + + Args: + component_patterns: List of component name patterns + platform_filter: Optional platform to filter by + esphome_command: ESPHome command (config/compile) + continue_on_fail: Whether to continue on failure + enable_grouping: Whether to enable component grouping + + Returns: + Exit code (0 for success, 1 for failure) + """ + # Setup paths + repo_root = Path(__file__).parent.parent + tests_dir = repo_root / "tests" / "components" + build_components_dir = repo_root / "tests" / "test_build_components" + build_dir = build_components_dir / "build" + build_dir.mkdir(parents=True, exist_ok=True) + + # Get platform base files + platform_bases = get_platform_base_files(build_components_dir) + + # Find all component tests + all_tests = {} + for pattern in component_patterns: + all_tests.update(find_component_tests(tests_dir, pattern)) + + if not all_tests: + print(f"No components found matching: {component_patterns}") + return 1 + + print(f"Found {len(all_tests)} components to test") + + # Run tests + failed_tests = [] + passed_tests = [] + tested_components = set() # Track which components were tested in groups + failed_commands = {} # Track commands for failed tests + + # First, run grouped tests if grouping is enabled + if enable_grouping: + ( + tested_components, + passed_tests, + failed_tests, + failed_commands, + ) = run_grouped_component_tests( + all_tests=all_tests, + platform_filter=platform_filter, + platform_bases=platform_bases, + tests_dir=tests_dir, + build_dir=build_dir, + esphome_command=esphome_command, + continue_on_fail=continue_on_fail, + ) + + # Then run individual tests for components not in groups + for component, test_files in sorted(all_tests.items()): + for test_file in test_files: + test_name, platform = parse_test_filename(test_file) + + # Handle "all" platform tests + if platform == "all": + # Run for all platforms + for plat, base_files in platform_bases.items(): + if platform_filter and plat != platform_filter: + continue + + for base_file in base_files: + platform_with_version = extract_platform_with_version(base_file) + run_individual_component_test( + component=component, + test_file=test_file, + platform=plat, + platform_with_version=platform_with_version, + base_file=base_file, + build_dir=build_dir, + esphome_command=esphome_command, + continue_on_fail=continue_on_fail, + tested_components=tested_components, + passed_tests=passed_tests, + failed_tests=failed_tests, + failed_commands=failed_commands, + ) + else: + # Platform-specific test + if platform_filter and platform != platform_filter: + continue + + if platform not in platform_bases: + print(f"No base file for platform: {platform}") + continue + + for base_file in platform_bases[platform]: + platform_with_version = extract_platform_with_version(base_file) + + # Skip if requested platform doesn't match + if ( + platform_filter + and platform_with_version != platform_filter + and not platform_with_version.startswith(f"{platform_filter}-") + ): + continue + + run_individual_component_test( + component=component, + test_file=test_file, + platform=platform, + platform_with_version=platform_with_version, + base_file=base_file, + build_dir=build_dir, + esphome_command=esphome_command, + continue_on_fail=continue_on_fail, + tested_components=tested_components, + passed_tests=passed_tests, + failed_tests=failed_tests, + failed_commands=failed_commands, + ) + + # Print summary + print("\n" + "=" * 80) + print(f"Test Summary: {len(passed_tests)} passed, {len(failed_tests)} failed") + print("=" * 80) + + if failed_tests: + print("\nFailed tests:") + for test in failed_tests: + print(f" - {test}") + + # Print failed commands at the end for easy copy-paste from CI logs + print("\n" + "=" * 80) + print("Failed test commands (copy-paste to reproduce locally):") + print("=" * 80) + for test in failed_tests: + if test in failed_commands: + print(f"\n# {test}") + print(failed_commands[test]) + print() + + return 1 + + return 0 + + +def main() -> int: + """Main entry point.""" + parser = argparse.ArgumentParser( + description="Test ESPHome component builds with intelligent grouping" + ) + parser.add_argument( + "-e", + "--esphome-command", + default="compile", + choices=["config", "compile", "clean"], + help="ESPHome command to run (default: compile)", + ) + parser.add_argument( + "-c", + "--components", + default="*", + help="Component pattern(s) to test (default: *). Comma-separated.", + ) + parser.add_argument( + "-t", + "--target", + help="Target platform to test (e.g., esp32-idf)", + ) + parser.add_argument( + "-f", + "--continue-on-fail", + action="store_true", + help="Continue testing even if a test fails", + ) + parser.add_argument( + "--no-grouping", + action="store_true", + help="Disable component grouping (test each component individually)", + ) + + args = parser.parse_args() + + # Parse component patterns + component_patterns = [p.strip() for p in args.components.split(",")] + + return test_components( + component_patterns=component_patterns, + platform_filter=args.target, + esphome_command=args.esphome_command, + continue_on_fail=args.continue_on_fail, + enable_grouping=not args.no_grouping, + ) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/script/test_component_grouping.py b/script/test_component_grouping.py new file mode 100755 index 0000000000..a2cee6e888 --- /dev/null +++ b/script/test_component_grouping.py @@ -0,0 +1,227 @@ +#!/usr/bin/env python3 +"""Test component grouping by finding and testing groups of components. + +This script analyzes components, finds groups that can be tested together, +and runs test builds for those groups. +""" + +from __future__ import annotations + +import argparse +from pathlib import Path +import subprocess +import sys + +# Add esphome to path +sys.path.insert(0, str(Path(__file__).parent.parent)) + +from script.analyze_component_buses import ( + analyze_all_components, + group_components_by_signature, +) + + +def test_component_group( + components: list[str], + platform: str, + esphome_command: str = "compile", + dry_run: bool = False, +) -> bool: + """Test a group of components together. + + Args: + components: List of component names to test together + platform: Platform to test on (e.g., "esp32-idf") + esphome_command: ESPHome command to run (config/compile/clean) + dry_run: If True, only print the command without running it + + Returns: + True if test passed, False otherwise + """ + components_str = ",".join(components) + cmd = [ + "./script/test_build_components", + "-c", + components_str, + "-t", + platform, + "-e", + esphome_command, + ] + + print(f"\n{'=' * 80}") + print(f"Testing {len(components)} components on {platform}:") + for comp in components: + print(f" - {comp}") + print(f"{'=' * 80}") + print(f"Command: {' '.join(cmd)}\n") + + if dry_run: + print("[DRY RUN] Skipping actual test") + return True + + try: + result = subprocess.run(cmd, check=False) + return result.returncode == 0 + except Exception as e: + print(f"Error running test: {e}") + return False + + +def main() -> None: + """Main entry point.""" + parser = argparse.ArgumentParser( + description="Test component grouping by finding and testing groups" + ) + parser.add_argument( + "--platform", + "-p", + default="esp32-idf", + help="Platform to test (default: esp32-idf)", + ) + parser.add_argument( + "-e", + "--esphome-command", + default="compile", + choices=["config", "compile", "clean"], + help="ESPHome command to run (default: compile)", + ) + parser.add_argument( + "--all", + action="store_true", + help="Test all components (sets --min-size=1, --max-size=10000, --max-groups=10000)", + ) + parser.add_argument( + "--min-size", + type=int, + default=3, + help="Minimum group size to test (default: 3)", + ) + parser.add_argument( + "--max-size", + type=int, + default=10, + help="Maximum group size to test (default: 10)", + ) + parser.add_argument( + "--max-groups", + type=int, + default=5, + help="Maximum number of groups to test (default: 5)", + ) + parser.add_argument( + "--signature", + "-s", + help="Only test groups with this bus signature (e.g., 'spi', 'i2c', 'uart')", + ) + parser.add_argument( + "--dry-run", + action="store_true", + help="Print commands without running them", + ) + + args = parser.parse_args() + + # If --all is specified, test all components without grouping + if args.all: + # Get all components from tests/components directory + components_dir = Path("tests/components") + all_components = sorted( + [d.name for d in components_dir.iterdir() if d.is_dir()] + ) + + if not all_components: + print(f"\nNo components found in {components_dir}") + return + + print(f"\nTesting all {len(all_components)} components together") + + success = test_component_group( + all_components, args.platform, args.esphome_command, args.dry_run + ) + + # Print summary + print(f"\n{'=' * 80}") + print("TEST SUMMARY") + print(f"{'=' * 80}") + status = "✅ PASS" if success else "❌ FAIL" + print(f"{status} All components: {len(all_components)} components") + + if not args.dry_run and not success: + sys.exit(1) + return + + print("Analyzing all components...") + components, non_groupable, _ = analyze_all_components(Path("tests/components")) + + print(f"Found {len(components)} components, {len(non_groupable)} non-groupable") + + # Group components by signature for the platform + groups = group_components_by_signature(components, args.platform) + + # Filter and sort groups + filtered_groups = [] + for signature, comp_list in groups.items(): + # Filter by signature if specified + if args.signature and signature != args.signature: + continue + + # Remove non-groupable components + comp_list = [c for c in comp_list if c not in non_groupable] + + # Filter by minimum size + if len(comp_list) < args.min_size: + continue + + # If group is larger than max_size, we'll take a subset later + filtered_groups.append((signature, comp_list)) + + # Sort by group size (largest first) + filtered_groups.sort(key=lambda x: len(x[1]), reverse=True) + + # Limit number of groups + filtered_groups = filtered_groups[: args.max_groups] + + if not filtered_groups: + print("\nNo groups found matching criteria:") + print(f" - Platform: {args.platform}") + print(f" - Size: {args.min_size}-{args.max_size}") + if args.signature: + print(f" - Signature: {args.signature}") + return + + print(f"\nFound {len(filtered_groups)} groups to test:") + for signature, comp_list in filtered_groups: + print(f" [{signature}]: {len(comp_list)} components") + + # Test each group + results = [] + for signature, comp_list in filtered_groups: + # Limit to max_size if group is larger + if len(comp_list) > args.max_size: + comp_list = comp_list[: args.max_size] + + success = test_component_group( + comp_list, args.platform, args.esphome_command, args.dry_run + ) + results.append((signature, comp_list, success)) + + if not args.dry_run and not success: + print(f"\n❌ FAILED: {signature} group") + break + + # Print summary + print(f"\n{'=' * 80}") + print("TEST SUMMARY") + print(f"{'=' * 80}") + for signature, comp_list, success in results: + status = "✅ PASS" if success else "❌ FAIL" + print(f"{status} [{signature}]: {len(comp_list)} components") + + # Exit with error if any tests failed + if not args.dry_run and any(not success for _, _, success in results): + sys.exit(1) + + +if __name__ == "__main__": + main() diff --git a/tests/components/a01nyub/common.yaml b/tests/components/a01nyub/common.yaml index 0717acfff7..fc0b2d3bfb 100644 --- a/tests/components/a01nyub/common.yaml +++ b/tests/components/a01nyub/common.yaml @@ -1,11 +1,4 @@ -uart: - - id: uart_a01nyub - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: a01nyub id: a01nyub_sensor name: a01nyub Distance - uart_id: uart_a01nyub diff --git a/tests/components/a01nyub/test.esp32-c3-idf.yaml b/tests/components/a01nyub/test.esp32-c3-idf.yaml index b516342f3b..2cda8deaf9 100644 --- a/tests/components/a01nyub/test.esp32-c3-idf.yaml +++ b/tests/components/a01nyub/test.esp32-c3-idf.yaml @@ -1,3 +1,6 @@ +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml + substitutions: tx_pin: GPIO4 rx_pin: GPIO5 diff --git a/tests/components/a01nyub/test.esp32-idf.yaml b/tests/components/a01nyub/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/a01nyub/test.esp32-idf.yaml +++ b/tests/components/a01nyub/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/a01nyub/test.esp8266-ard.yaml b/tests/components/a01nyub/test.esp8266-ard.yaml index b516342f3b..5a05efa259 100644 --- a/tests/components/a01nyub/test.esp8266-ard.yaml +++ b/tests/components/a01nyub/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/a01nyub/test.rp2040-ard.yaml b/tests/components/a01nyub/test.rp2040-ard.yaml index b516342f3b..f1df2daf83 100644 --- a/tests/components/a01nyub/test.rp2040-ard.yaml +++ b/tests/components/a01nyub/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/a02yyuw/common.yaml b/tests/components/a02yyuw/common.yaml index b2e5927ff4..4de8a6eb67 100644 --- a/tests/components/a02yyuw/common.yaml +++ b/tests/components/a02yyuw/common.yaml @@ -1,11 +1,4 @@ -uart: - - id: uart_a02yyuw - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: a02yyuw id: a02yyuw_sensor name: a02yyuw Distance - uart_id: uart_a02yyuw diff --git a/tests/components/a02yyuw/test.esp32-c3-idf.yaml b/tests/components/a02yyuw/test.esp32-c3-idf.yaml index b516342f3b..2cda8deaf9 100644 --- a/tests/components/a02yyuw/test.esp32-c3-idf.yaml +++ b/tests/components/a02yyuw/test.esp32-c3-idf.yaml @@ -1,3 +1,6 @@ +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml + substitutions: tx_pin: GPIO4 rx_pin: GPIO5 diff --git a/tests/components/a02yyuw/test.esp32-idf.yaml b/tests/components/a02yyuw/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/a02yyuw/test.esp32-idf.yaml +++ b/tests/components/a02yyuw/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/a02yyuw/test.esp8266-ard.yaml b/tests/components/a02yyuw/test.esp8266-ard.yaml index b516342f3b..5a05efa259 100644 --- a/tests/components/a02yyuw/test.esp8266-ard.yaml +++ b/tests/components/a02yyuw/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/a02yyuw/test.rp2040-ard.yaml b/tests/components/a02yyuw/test.rp2040-ard.yaml index b516342f3b..f1df2daf83 100644 --- a/tests/components/a02yyuw/test.rp2040-ard.yaml +++ b/tests/components/a02yyuw/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/a4988/test.esp32-idf.yaml b/tests/components/a4988/test.esp32-idf.yaml index 1ca8c0c084..7d46b048e1 100644 --- a/tests/components/a4988/test.esp32-idf.yaml +++ b/tests/components/a4988/test.esp32-idf.yaml @@ -1,6 +1,6 @@ substitutions: step_pin: GPIO22 - dir_pin: GPIO23 + dir_pin: GPIO4 sleep_pin: GPIO25 <<: !include common.yaml diff --git a/tests/components/a4988/test.esp8266-ard.yaml b/tests/components/a4988/test.esp8266-ard.yaml index 22b5677d27..5b1b1293be 100644 --- a/tests/components/a4988/test.esp8266-ard.yaml +++ b/tests/components/a4988/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: step_pin: GPIO1 dir_pin: GPIO2 - sleep_pin: GPIO5 + sleep_pin: GPIO0 <<: !include common.yaml diff --git a/tests/components/ac_dimmer/test.esp32-ard.yaml b/tests/components/ac_dimmer/test.esp32-ard.yaml index 3ec069f430..eaa4901f03 100644 --- a/tests/components/ac_dimmer/test.esp32-ard.yaml +++ b/tests/components/ac_dimmer/test.esp32-ard.yaml @@ -1,5 +1,5 @@ substitutions: - gate_pin: GPIO18 - zero_cross_pin: GPIO19 + gate_pin: GPIO4 + zero_cross_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/ac_dimmer/test.esp8266-ard.yaml b/tests/components/ac_dimmer/test.esp8266-ard.yaml index 5d2d42b713..2f50b04956 100644 --- a/tests/components/ac_dimmer/test.esp8266-ard.yaml +++ b/tests/components/ac_dimmer/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - gate_pin: GPIO5 - zero_cross_pin: GPIO4 + gate_pin: GPIO0 + zero_cross_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/adc/common.yaml b/tests/components/adc/common.yaml deleted file mode 100644 index ebdd1aece5..0000000000 --- a/tests/components/adc/common.yaml +++ /dev/null @@ -1,11 +0,0 @@ -sensor: - - id: my_sensor - platform: adc - name: ADC Test sensor - update_interval: "1:01" - attenuation: 2.5db - unit_of_measurement: "°C" - icon: "mdi:water-percent" - accuracy_decimals: 5 - setup_priority: -100 - force_update: true diff --git a/tests/components/adc/test.bk72xx-ard.yaml b/tests/components/adc/test.bk72xx-ard.yaml index 0a3d5d1fdc..0645333a81 100644 --- a/tests/components/adc/test.bk72xx-ard.yaml +++ b/tests/components/adc/test.bk72xx-ard.yaml @@ -1,7 +1,11 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor + - id: my_sensor + platform: adc pin: P23 - attenuation: !remove + name: ADC Test sensor + update_interval: "1:01" + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.esp32-c3-idf.yaml b/tests/components/adc/test.esp32-c3-idf.yaml index ea3b00a85f..e764f0fe21 100644 --- a/tests/components/adc/test.esp32-c3-idf.yaml +++ b/tests/components/adc/test.esp32-c3-idf.yaml @@ -1,6 +1,12 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor - pin: 4 + - id: my_sensor + platform: adc + pin: GPIO1 + name: ADC Test sensor + update_interval: "1:01" + attenuation: 2.5db + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.esp32-idf.yaml b/tests/components/adc/test.esp32-idf.yaml index e6a1fd3bd9..ff1e3bb919 100644 --- a/tests/components/adc/test.esp32-idf.yaml +++ b/tests/components/adc/test.esp32-idf.yaml @@ -1,6 +1,12 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor + - id: my_sensor + platform: adc pin: A0 + name: ADC Test sensor + update_interval: "1:01" + attenuation: 2.5db + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.esp32-p4-idf.yaml b/tests/components/adc/test.esp32-p4-idf.yaml index 97844cf398..b77dc299c2 100644 --- a/tests/components/adc/test.esp32-p4-idf.yaml +++ b/tests/components/adc/test.esp32-p4-idf.yaml @@ -1,6 +1,12 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor - pin: GPIO50 + - id: my_sensor + platform: adc + pin: GPIO16 + name: ADC Test sensor + update_interval: "1:01" + attenuation: 2.5db + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.esp32-s2-idf.yaml b/tests/components/adc/test.esp32-s2-idf.yaml index bbd91c5e5a..e764f0fe21 100644 --- a/tests/components/adc/test.esp32-s2-idf.yaml +++ b/tests/components/adc/test.esp32-s2-idf.yaml @@ -1,6 +1,12 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor - pin: 1 + - id: my_sensor + platform: adc + pin: GPIO1 + name: ADC Test sensor + update_interval: "1:01" + attenuation: 2.5db + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.esp32-s3-idf.yaml b/tests/components/adc/test.esp32-s3-idf.yaml index bbd91c5e5a..e764f0fe21 100644 --- a/tests/components/adc/test.esp32-s3-idf.yaml +++ b/tests/components/adc/test.esp32-s3-idf.yaml @@ -1,6 +1,12 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor - pin: 1 + - id: my_sensor + platform: adc + pin: GPIO1 + name: ADC Test sensor + update_interval: "1:01" + attenuation: 2.5db + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.esp8266-ard.yaml b/tests/components/adc/test.esp8266-ard.yaml index bcb3620cfc..4cc865bb5d 100644 --- a/tests/components/adc/test.esp8266-ard.yaml +++ b/tests/components/adc/test.esp8266-ard.yaml @@ -1,7 +1,11 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor + - id: my_sensor + platform: adc pin: VCC - attenuation: !remove + name: ADC Test sensor + update_interval: "1:01" + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.ln882x-ard.yaml b/tests/components/adc/test.ln882x-ard.yaml index 0622cd7b27..face38b647 100644 --- a/tests/components/adc/test.ln882x-ard.yaml +++ b/tests/components/adc/test.ln882x-ard.yaml @@ -1,7 +1,11 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor - pin: PA0 - attenuation: !remove + - id: my_sensor + platform: adc + pin: A5 + name: ADC Test sensor + update_interval: "1:01" + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc/test.rp2040-ard.yaml b/tests/components/adc/test.rp2040-ard.yaml index bcb3620cfc..4cc865bb5d 100644 --- a/tests/components/adc/test.rp2040-ard.yaml +++ b/tests/components/adc/test.rp2040-ard.yaml @@ -1,7 +1,11 @@ -packages: - base: !include common.yaml - sensor: - - id: !extend my_sensor + - id: my_sensor + platform: adc pin: VCC - attenuation: !remove + name: ADC Test sensor + update_interval: "1:01" + unit_of_measurement: "°C" + icon: "mdi:water-percent" + accuracy_decimals: 5 + setup_priority: -100 + force_update: true diff --git a/tests/components/adc128s102/common.yaml b/tests/components/adc128s102/common.yaml index 5f1638a7e2..b909310bdf 100644 --- a/tests/components/adc128s102/common.yaml +++ b/tests/components/adc128s102/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_adc128s102 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - adc128s102: cs_pin: ${cs_pin} id: adc128s102_adc diff --git a/tests/components/adc128s102/test.esp32-c3-idf.yaml b/tests/components/adc128s102/test.esp32-c3-idf.yaml index 24da4b5452..a60568a736 100644 --- a/tests/components/adc128s102/test.esp32-c3-idf.yaml +++ b/tests/components/adc128s102/test.esp32-c3-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO2 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/adc128s102/test.esp32-idf.yaml b/tests/components/adc128s102/test.esp32-idf.yaml index aba72f0614..9bb524aa65 100644 --- a/tests/components/adc128s102/test.esp32-idf.yaml +++ b/tests/components/adc128s102/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO12 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/adc128s102/test.esp8266-ard.yaml b/tests/components/adc128s102/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/adc128s102/test.esp8266-ard.yaml +++ b/tests/components/adc128s102/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/adc128s102/test.rp2040-ard.yaml b/tests/components/adc128s102/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/adc128s102/test.rp2040-ard.yaml +++ b/tests/components/adc128s102/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ade7880/common.yaml b/tests/components/ade7880/common.yaml index 0aa388a325..0b0b560282 100644 --- a/tests/components/ade7880/common.yaml +++ b/tests/components/ade7880/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_ade7880 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ade7880 - i2c_id: i2c_ade7880 + i2c_id: i2c_bus irq0_pin: ${irq0_pin} irq1_pin: ${irq1_pin} reset_pin: ${reset_pin} diff --git a/tests/components/ade7880/test.esp32-c3-idf.yaml b/tests/components/ade7880/test.esp32-c3-idf.yaml index 87db3e9427..7d5b41fc5a 100644 --- a/tests/components/ade7880/test.esp32-c3-idf.yaml +++ b/tests/components/ade7880/test.esp32-c3-idf.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq0_pin: GPIO6 irq1_pin: GPIO7 - reset_pin: GPIO10 + reset_pin: GPIO9 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ade7880/test.esp32-idf.yaml b/tests/components/ade7880/test.esp32-idf.yaml index 685b49ff32..9db2e50049 100644 --- a/tests/components/ade7880/test.esp32-idf.yaml +++ b/tests/components/ade7880/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq0_pin: GPIO13 irq1_pin: GPIO15 - reset_pin: GPIO16 + reset_pin: GPIO12 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ade7880/test.esp8266-ard.yaml b/tests/components/ade7880/test.esp8266-ard.yaml index 685b49ff32..81a04d0724 100644 --- a/tests/components/ade7880/test.esp8266-ard.yaml +++ b/tests/components/ade7880/test.esp8266-ard.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq0_pin: GPIO13 irq1_pin: GPIO15 reset_pin: GPIO16 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ade7880/test.rp2040-ard.yaml b/tests/components/ade7880/test.rp2040-ard.yaml index 685b49ff32..f531f852ae 100644 --- a/tests/components/ade7880/test.rp2040-ard.yaml +++ b/tests/components/ade7880/test.rp2040-ard.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq0_pin: GPIO13 irq1_pin: GPIO15 reset_pin: GPIO16 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_i2c/common.yaml b/tests/components/ade7953_i2c/common.yaml index a2d163567d..8b2a9588fe 100644 --- a/tests/components/ade7953_i2c/common.yaml +++ b/tests/components/ade7953_i2c/common.yaml @@ -1,20 +1,13 @@ -i2c: - - id: i2c_ade7953 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ade7953_i2c + i2c_id: i2c_bus irq_pin: ${irq_pin} voltage: name: ADE7953 Voltage - id: ade7953_voltage current_a: name: ADE7953 Current A - id: ade7953_current_a current_b: name: ADE7953 Current B - id: ade7953_current_b power_factor_a: name: ADE7953 Power Factor A power_factor_b: diff --git a/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml b/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml index 799acabd5a..59296a1e6e 100644 --- a/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ade7953_i2c/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.esp32-idf.yaml b/tests/components/ade7953_i2c/test.esp32-idf.yaml index 2c57d412f6..49629536e7 100644 --- a/tests/components/ade7953_i2c/test.esp32-idf.yaml +++ b/tests/components/ade7953_i2c/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 irq_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.esp8266-ard.yaml b/tests/components/ade7953_i2c/test.esp8266-ard.yaml index c8e6a43f44..dc7609ab37 100644 --- a/tests/components/ade7953_i2c/test.esp8266-ard.yaml +++ b/tests/components/ade7953_i2c/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_i2c/test.rp2040-ard.yaml b/tests/components/ade7953_i2c/test.rp2040-ard.yaml index 799acabd5a..b80562ad22 100644 --- a/tests/components/ade7953_i2c/test.rp2040-ard.yaml +++ b/tests/components/ade7953_i2c/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_spi/common.yaml b/tests/components/ade7953_spi/common.yaml index 706f31f22c..30b5258a2a 100644 --- a/tests/components/ade7953_spi/common.yaml +++ b/tests/components/ade7953_spi/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_ade7953 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: ade7953_spi cs_pin: ${cs_pin} diff --git a/tests/components/ade7953_spi/test.esp32-c3-idf.yaml b/tests/components/ade7953_spi/test.esp32-c3-idf.yaml index fcf35f528e..5e7e2dc82c 100644 --- a/tests/components/ade7953_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ade7953_spi/test.esp32-c3-idf.yaml @@ -1,8 +1,7 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 irq_pin: GPIO9 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.esp32-idf.yaml b/tests/components/ade7953_spi/test.esp32-idf.yaml index e00f522dd4..19791e24b7 100644 --- a/tests/components/ade7953_spi/test.esp32-idf.yaml +++ b/tests/components/ade7953_spi/test.esp32-idf.yaml @@ -1,8 +1,8 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 irq_pin: GPIO13 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.esp8266-ard.yaml b/tests/components/ade7953_spi/test.esp8266-ard.yaml index b90e661ec0..8475dc4c50 100644 --- a/tests/components/ade7953_spi/test.esp8266-ard.yaml +++ b/tests/components/ade7953_spi/test.esp8266-ard.yaml @@ -1,8 +1,11 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 irq_pin: GPIO5 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ade7953_spi/test.rp2040-ard.yaml b/tests/components/ade7953_spi/test.rp2040-ard.yaml index 8f5941e1b2..7c4a74a236 100644 --- a/tests/components/ade7953_spi/test.rp2040-ard.yaml +++ b/tests/components/ade7953_spi/test.rp2040-ard.yaml @@ -5,4 +5,7 @@ substitutions: irq_pin: GPIO5 cs_pin: GPIO6 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ads1115/common.yaml b/tests/components/ads1115/common.yaml index 297877d2d8..4724dc5a14 100644 --- a/tests/components/ads1115/common.yaml +++ b/tests/components/ads1115/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ads1115 - scl: ${scl_pin} - sda: ${sda_pin} - ads1115: + i2c_id: i2c_bus address: 0x48 sensor: diff --git a/tests/components/ads1115/test.esp32-c3-idf.yaml b/tests/components/ads1115/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ads1115/test.esp32-c3-idf.yaml +++ b/tests/components/ads1115/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ads1115/test.esp32-idf.yaml b/tests/components/ads1115/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ads1115/test.esp32-idf.yaml +++ b/tests/components/ads1115/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ads1115/test.esp8266-ard.yaml b/tests/components/ads1115/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ads1115/test.esp8266-ard.yaml +++ b/tests/components/ads1115/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ads1115/test.rp2040-ard.yaml b/tests/components/ads1115/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ads1115/test.rp2040-ard.yaml +++ b/tests/components/ads1115/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ags10/common.yaml b/tests/components/ags10/common.yaml index 0c4c3513cf..0551871e59 100644 --- a/tests/components/ags10/common.yaml +++ b/tests/components/ags10/common.yaml @@ -1,9 +1,3 @@ -i2c: - - id: i2c_ags10 - scl: ${scl_pin} - sda: ${sda_pin} - frequency: 10kHz - sensor: - platform: ags10 id: ags10_1 diff --git a/tests/components/ags10/test.esp32-c3-idf.yaml b/tests/components/ags10/test.esp32-c3-idf.yaml index ee2c29ca4e..72703301a1 100644 --- a/tests/components/ags10/test.esp32-c3-idf.yaml +++ b/tests/components/ags10/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ags10/test.esp32-idf.yaml b/tests/components/ags10/test.esp32-idf.yaml index 63c3bd6afd..7a5d01898a 100644 --- a/tests/components/ags10/test.esp32-idf.yaml +++ b/tests/components/ags10/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ags10/test.esp8266-ard.yaml b/tests/components/ags10/test.esp8266-ard.yaml index ee2c29ca4e..9e23bb3778 100644 --- a/tests/components/ags10/test.esp8266-ard.yaml +++ b/tests/components/ags10/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/aht10/common.yaml b/tests/components/aht10/common.yaml index 721af09bb4..d7c3f9364f 100644 --- a/tests/components/aht10/common.yaml +++ b/tests/components/aht10/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_aht10 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: aht10 + i2c_id: i2c_bus temperature: name: Temperature humidity: diff --git a/tests/components/aht10/test.esp32-c3-idf.yaml b/tests/components/aht10/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/aht10/test.esp32-c3-idf.yaml +++ b/tests/components/aht10/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/aht10/test.esp32-idf.yaml b/tests/components/aht10/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/aht10/test.esp32-idf.yaml +++ b/tests/components/aht10/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/aht10/test.esp8266-ard.yaml b/tests/components/aht10/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/aht10/test.esp8266-ard.yaml +++ b/tests/components/aht10/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/aht10/test.rp2040-ard.yaml b/tests/components/aht10/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/aht10/test.rp2040-ard.yaml +++ b/tests/components/aht10/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/aic3204/common.yaml b/tests/components/aic3204/common.yaml index 6e939bd260..5f175faee3 100644 --- a/tests/components/aic3204/common.yaml +++ b/tests/components/aic3204/common.yaml @@ -6,10 +6,6 @@ esphome: - audio_dac.set_volume: volume: 50% -i2c: - - id: i2c_aic3204 - scl: ${scl_pin} - sda: ${sda_pin} - audio_dac: - platform: aic3204 + i2c_id: i2c_bus diff --git a/tests/components/aic3204/test.esp32-c3-idf.yaml b/tests/components/aic3204/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/aic3204/test.esp32-c3-idf.yaml +++ b/tests/components/aic3204/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/aic3204/test.esp32-idf.yaml b/tests/components/aic3204/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/aic3204/test.esp32-idf.yaml +++ b/tests/components/aic3204/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/aic3204/test.esp8266-ard.yaml b/tests/components/aic3204/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/aic3204/test.esp8266-ard.yaml +++ b/tests/components/aic3204/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml b/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml +++ b/tests/components/airthings_wave_mini/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/airthings_wave_mini/test.esp32-idf.yaml b/tests/components/airthings_wave_mini/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/airthings_wave_mini/test.esp32-idf.yaml +++ b/tests/components/airthings_wave_mini/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml b/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml +++ b/tests/components/airthings_wave_plus/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/airthings_wave_plus/test.esp32-idf.yaml b/tests/components/airthings_wave_plus/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/airthings_wave_plus/test.esp32-idf.yaml +++ b/tests/components/airthings_wave_plus/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/alpha3/test.esp32-c3-idf.yaml b/tests/components/alpha3/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/alpha3/test.esp32-c3-idf.yaml +++ b/tests/components/alpha3/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/alpha3/test.esp32-idf.yaml b/tests/components/alpha3/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/alpha3/test.esp32-idf.yaml +++ b/tests/components/alpha3/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/am2315c/common.yaml b/tests/components/am2315c/common.yaml index ab4656c17d..362fe19e4d 100644 --- a/tests/components/am2315c/common.yaml +++ b/tests/components/am2315c/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_am2315c - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: am2315c + i2c_id: i2c_bus temperature: name: Temperature humidity: diff --git a/tests/components/am2315c/test.esp32-c3-idf.yaml b/tests/components/am2315c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/am2315c/test.esp32-c3-idf.yaml +++ b/tests/components/am2315c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/am2315c/test.esp32-idf.yaml b/tests/components/am2315c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/am2315c/test.esp32-idf.yaml +++ b/tests/components/am2315c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/am2315c/test.esp8266-ard.yaml b/tests/components/am2315c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/am2315c/test.esp8266-ard.yaml +++ b/tests/components/am2315c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/am2315c/test.rp2040-ard.yaml b/tests/components/am2315c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/am2315c/test.rp2040-ard.yaml +++ b/tests/components/am2315c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/am2320/common.yaml b/tests/components/am2320/common.yaml index c0982b8818..d67ca3e564 100644 --- a/tests/components/am2320/common.yaml +++ b/tests/components/am2320/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_am2320 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: am2320 + i2c_id: i2c_bus temperature: name: Temperature humidity: diff --git a/tests/components/am2320/test.esp32-c3-idf.yaml b/tests/components/am2320/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/am2320/test.esp32-c3-idf.yaml +++ b/tests/components/am2320/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/am2320/test.esp32-idf.yaml b/tests/components/am2320/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/am2320/test.esp32-idf.yaml +++ b/tests/components/am2320/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/am2320/test.esp8266-ard.yaml b/tests/components/am2320/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/am2320/test.esp8266-ard.yaml +++ b/tests/components/am2320/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/am2320/test.rp2040-ard.yaml b/tests/components/am2320/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/am2320/test.rp2040-ard.yaml +++ b/tests/components/am2320/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/am43/test.esp32-c3-idf.yaml b/tests/components/am43/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/am43/test.esp32-c3-idf.yaml +++ b/tests/components/am43/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/am43/test.esp32-idf.yaml b/tests/components/am43/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/am43/test.esp32-idf.yaml +++ b/tests/components/am43/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/animation/test.esp32-c3-idf.yaml b/tests/components/animation/test.esp32-c3-idf.yaml index 18aa2a5b06..a08a683333 100644 --- a/tests/components/animation/test.esp32-c3-idf.yaml +++ b/tests/components/animation/test.esp32-c3-idf.yaml @@ -1,17 +1,13 @@ -spi: - - id: spi_main_lcd - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + animation: !include common.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 cs_pin: 8 dc_pin: 9 reset_pin: 10 invert_colors: false - -packages: - animation: !include common.yaml diff --git a/tests/components/animation/test.esp32-idf.yaml b/tests/components/animation/test.esp32-idf.yaml index 7d9fe45bff..c28e9584dd 100644 --- a/tests/components/animation/test.esp32-idf.yaml +++ b/tests/components/animation/test.esp32-idf.yaml @@ -1,17 +1,13 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + animation: !include common.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 cs_pin: 12 dc_pin: 13 reset_pin: 21 invert_colors: false - -packages: - animation: !include common.yaml diff --git a/tests/components/animation/test.esp8266-ard.yaml b/tests/components/animation/test.esp8266-ard.yaml index 9548c7fbeb..11a7117d91 100644 --- a/tests/components/animation/test.esp8266-ard.yaml +++ b/tests/components/animation/test.esp8266-ard.yaml @@ -1,17 +1,13 @@ -spi: - - id: spi_main_lcd - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + animation: !include common.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 cs_pin: 5 dc_pin: 15 reset_pin: 16 invert_colors: false - -packages: - animation: !include common.yaml diff --git a/tests/components/animation/test.rp2040-ard.yaml b/tests/components/animation/test.rp2040-ard.yaml index efb3f2907c..32fb4efb04 100644 --- a/tests/components/animation/test.rp2040-ard.yaml +++ b/tests/components/animation/test.rp2040-ard.yaml @@ -1,17 +1,13 @@ -spi: - - id: spi_main_lcd - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + animation: !include common.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 cs_pin: 20 dc_pin: 21 reset_pin: 22 invert_colors: false - -packages: - animation: !include common.yaml diff --git a/tests/components/anova/test.esp32-c3-idf.yaml b/tests/components/anova/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/anova/test.esp32-c3-idf.yaml +++ b/tests/components/anova/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/anova/test.esp32-idf.yaml b/tests/components/anova/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/anova/test.esp32-idf.yaml +++ b/tests/components/anova/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/apds9306/common.yaml b/tests/components/apds9306/common.yaml index b3828e62ff..dc34f47645 100644 --- a/tests/components/apds9306/common.yaml +++ b/tests/components/apds9306/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_apds9306 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: apds9306 + i2c_id: i2c_bus name: "APDS9306 Light Level" gain: 3 bit_width: 16 diff --git a/tests/components/apds9306/test.esp32-c3-idf.yaml b/tests/components/apds9306/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/apds9306/test.esp32-c3-idf.yaml +++ b/tests/components/apds9306/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/apds9306/test.esp32-idf.yaml b/tests/components/apds9306/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/apds9306/test.esp32-idf.yaml +++ b/tests/components/apds9306/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/apds9306/test.esp8266-ard.yaml b/tests/components/apds9306/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/apds9306/test.esp8266-ard.yaml +++ b/tests/components/apds9306/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/apds9306/test.rp2040-ard.yaml b/tests/components/apds9306/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/apds9306/test.rp2040-ard.yaml +++ b/tests/components/apds9306/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/apds9960/common.yaml b/tests/components/apds9960/common.yaml index de7706648a..c14212d263 100644 --- a/tests/components/apds9960/common.yaml +++ b/tests/components/apds9960/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_apds9960 - scl: ${scl_pin} - sda: ${sda_pin} - apds9960: + i2c_id: i2c_bus address: 0x20 update_interval: 60s diff --git a/tests/components/apds9960/test.esp32-c3-idf.yaml b/tests/components/apds9960/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/apds9960/test.esp32-c3-idf.yaml +++ b/tests/components/apds9960/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/apds9960/test.esp32-idf.yaml b/tests/components/apds9960/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/apds9960/test.esp32-idf.yaml +++ b/tests/components/apds9960/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/apds9960/test.esp8266-ard.yaml b/tests/components/apds9960/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/apds9960/test.esp8266-ard.yaml +++ b/tests/components/apds9960/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/apds9960/test.rp2040-ard.yaml b/tests/components/apds9960/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/apds9960/test.rp2040-ard.yaml +++ b/tests/components/apds9960/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/api/common-base.yaml b/tests/components/api/common-base.yaml new file mode 100644 index 0000000000..6483d5a997 --- /dev/null +++ b/tests/components/api/common-base.yaml @@ -0,0 +1,89 @@ +esphome: + on_boot: + then: + - homeassistant.event: + event: esphome.button_pressed + data: + message: Button was pressed + - homeassistant.action: + action: notify.html5 + data: + message: Button was pressed + - homeassistant.tag_scanned: pulse + - homeassistant.action: + action: weather.get_forecasts + data: + entity_id: weather.forecast_home + type: hourly + capture_response: true + on_success: + - lambda: |- + JsonObjectConst next_hour = response["response"]["weather.forecast_home"]["forecast"][0]; + float next_temperature = next_hour["temperature"].as(); + ESP_LOGD("main", "Next hour temperature: %f", next_temperature); + on_error: + - lambda: |- + ESP_LOGE("main", "Action failed with error: %s", error.c_str()); + - homeassistant.action: + action: weather.get_forecasts + data: + entity_id: weather.forecast_home + type: hourly + capture_response: true + response_template: "{{ response['weather.forecast_home']['forecast'][0]['temperature'] }}" + on_success: + - lambda: |- + float temperature = response["response"].as(); + ESP_LOGD("main", "Next hour temperature: %f", temperature); + - homeassistant.action: + action: light.toggle + data: + entity_id: light.demo_light + on_success: + - logger.log: "Toggled demo light" + on_error: + - logger.log: "Failed to toggle demo light" + +api: + port: 8000 + reboot_timeout: 0min + actions: + - action: hello_world + variables: + name: string + then: + - logger.log: + format: Hello World %s! + args: + - name.c_str() + - action: empty_action + then: + - logger.log: Action Called + - action: all_types + variables: + bool_: bool + int_: int + float_: float + string_: string + then: + - logger.log: Something happened + - action: array_types + variables: + bool_arr: bool[] + int_arr: int[] + float_arr: float[] + string_arr: string[] + then: + - logger.log: + # yamllint disable rule:line-length + format: "Bool: %s (%u), Int: %ld (%u), Float: %f (%u), String: %s (%u)" + # yamllint enable rule:line-length + args: + - YESNO(bool_arr[0]) + - bool_arr.size() + - (long) int_arr[0] + - int_arr.size() + - float_arr[0] + - float_arr.size() + - string_arr[0].c_str() + - string_arr.size() diff --git a/tests/components/api/common.yaml b/tests/components/api/common.yaml index d87ae56ec2..6115838b6d 100644 --- a/tests/components/api/common.yaml +++ b/tests/components/api/common.yaml @@ -1,91 +1,5 @@ -esphome: - on_boot: - then: - - homeassistant.event: - event: esphome.button_pressed - data: - message: Button was pressed - - homeassistant.action: - action: notify.html5 - data: - message: Button was pressed - - homeassistant.tag_scanned: pulse - - homeassistant.action: - action: weather.get_forecasts - data: - entity_id: weather.forecast_home - type: hourly - capture_response: true - on_success: - - lambda: |- - JsonObjectConst next_hour = response["response"]["weather.forecast_home"]["forecast"][0]; - float next_temperature = next_hour["temperature"].as(); - ESP_LOGD("main", "Next hour temperature: %f", next_temperature); - on_error: - - lambda: |- - ESP_LOGE("main", "Action failed with error: %s", error.c_str()); - - homeassistant.action: - action: weather.get_forecasts - data: - entity_id: weather.forecast_home - type: hourly - capture_response: true - response_template: "{{ response['weather.forecast_home']['forecast'][0]['temperature'] }}" - on_success: - - lambda: |- - float temperature = response["response"].as(); - ESP_LOGD("main", "Next hour temperature: %f", temperature); - - homeassistant.action: - action: light.toggle - data: - entity_id: light.demo_light - on_success: - - logger.log: "Toggled demo light" - on_error: - - logger.log: "Failed to toggle demo light" +<<: !include common-base.yaml api: - port: 8000 - reboot_timeout: 0min encryption: key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU= - actions: - - action: hello_world - variables: - name: string - then: - - logger.log: - format: Hello World %s! - args: - - name.c_str() - - action: empty_action - then: - - logger.log: Action Called - - action: all_types - variables: - bool_: bool - int_: int - float_: float - string_: string - then: - - logger.log: Something happened - - action: array_types - variables: - bool_arr: bool[] - int_arr: int[] - float_arr: float[] - string_arr: string[] - then: - - logger.log: - # yamllint disable rule:line-length - format: "Bool: %s (%u), Int: %ld (%u), Float: %f (%u), String: %s (%u)" - # yamllint enable rule:line-length - args: - - YESNO(bool_arr[0]) - - bool_arr.size() - - (long) int_arr[0] - - int_arr.size() - - float_arr[0] - - float_arr.size() - - string_arr[0].c_str() - - string_arr.size() diff --git a/tests/components/api/test-dynamic-encryption.esp32-idf.yaml b/tests/components/api/test-dynamic-encryption.esp32-idf.yaml index d8f8c247f4..504871716b 100644 --- a/tests/components/api/test-dynamic-encryption.esp32-idf.yaml +++ b/tests/components/api/test-dynamic-encryption.esp32-idf.yaml @@ -1,10 +1,5 @@ -packages: - common: !include common.yaml +<<: !include common-base.yaml wifi: ssid: MySSID password: password1 - -api: - encryption: - key: !remove diff --git a/tests/components/as3935_i2c/common.yaml b/tests/components/as3935_i2c/common.yaml index d76cc37fc1..a758bb7f56 100644 --- a/tests/components/as3935_i2c/common.yaml +++ b/tests/components/as3935_i2c/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_as3935 - scl: ${scl_pin} - sda: ${sda_pin} - as3935_i2c: + i2c_id: i2c_bus irq_pin: ${irq_pin} binary_sensor: diff --git a/tests/components/as3935_i2c/test.esp32-c3-idf.yaml b/tests/components/as3935_i2c/test.esp32-c3-idf.yaml index 799acabd5a..59296a1e6e 100644 --- a/tests/components/as3935_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/as3935_i2c/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.esp32-idf.yaml b/tests/components/as3935_i2c/test.esp32-idf.yaml index 2c57d412f6..49629536e7 100644 --- a/tests/components/as3935_i2c/test.esp32-idf.yaml +++ b/tests/components/as3935_i2c/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 irq_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.esp8266-ard.yaml b/tests/components/as3935_i2c/test.esp8266-ard.yaml index c8e6a43f44..dc7609ab37 100644 --- a/tests/components/as3935_i2c/test.esp8266-ard.yaml +++ b/tests/components/as3935_i2c/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/as3935_i2c/test.rp2040-ard.yaml b/tests/components/as3935_i2c/test.rp2040-ard.yaml index 799acabd5a..b80562ad22 100644 --- a/tests/components/as3935_i2c/test.rp2040-ard.yaml +++ b/tests/components/as3935_i2c/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/as3935_spi/common.yaml b/tests/components/as3935_spi/common.yaml index c3fb93dff1..5898d5d365 100644 --- a/tests/components/as3935_spi/common.yaml +++ b/tests/components/as3935_spi/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_as3935 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - as3935_spi: cs_pin: ${cs_pin} irq_pin: ${irq_pin} diff --git a/tests/components/as3935_spi/test.esp32-c3-idf.yaml b/tests/components/as3935_spi/test.esp32-c3-idf.yaml index fcf35f528e..5e7e2dc82c 100644 --- a/tests/components/as3935_spi/test.esp32-c3-idf.yaml +++ b/tests/components/as3935_spi/test.esp32-c3-idf.yaml @@ -1,8 +1,7 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 irq_pin: GPIO9 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/as3935_spi/test.esp32-idf.yaml b/tests/components/as3935_spi/test.esp32-idf.yaml index e00f522dd4..19791e24b7 100644 --- a/tests/components/as3935_spi/test.esp32-idf.yaml +++ b/tests/components/as3935_spi/test.esp32-idf.yaml @@ -1,8 +1,8 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 irq_pin: GPIO13 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/as3935_spi/test.esp8266-ard.yaml b/tests/components/as3935_spi/test.esp8266-ard.yaml index b90e661ec0..8475dc4c50 100644 --- a/tests/components/as3935_spi/test.esp8266-ard.yaml +++ b/tests/components/as3935_spi/test.esp8266-ard.yaml @@ -1,8 +1,11 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 irq_pin: GPIO5 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/as3935_spi/test.rp2040-ard.yaml b/tests/components/as3935_spi/test.rp2040-ard.yaml index 8f5941e1b2..7c4a74a236 100644 --- a/tests/components/as3935_spi/test.rp2040-ard.yaml +++ b/tests/components/as3935_spi/test.rp2040-ard.yaml @@ -5,4 +5,7 @@ substitutions: irq_pin: GPIO5 cs_pin: GPIO6 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/as5600/common.yaml b/tests/components/as5600/common.yaml index 860f5bf803..d867c66a21 100644 --- a/tests/components/as5600/common.yaml +++ b/tests/components/as5600/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_as5600 - scl: ${scl_pin} - sda: ${sda_pin} - as5600: + i2c_id: i2c_bus dir_pin: ${dir_pin} direction: clockwise start_position: 90deg diff --git a/tests/components/as5600/test.esp32-c3-idf.yaml b/tests/components/as5600/test.esp32-c3-idf.yaml index a0623c91e5..03a87ed6c4 100644 --- a/tests/components/as5600/test.esp32-c3-idf.yaml +++ b/tests/components/as5600/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 dir_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/as5600/test.esp32-idf.yaml b/tests/components/as5600/test.esp32-idf.yaml index fa08763501..9d25a7f09a 100644 --- a/tests/components/as5600/test.esp32-idf.yaml +++ b/tests/components/as5600/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 dir_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/as5600/test.esp8266-ard.yaml b/tests/components/as5600/test.esp8266-ard.yaml index 5e27f8c134..8d18740b95 100644 --- a/tests/components/as5600/test.esp8266-ard.yaml +++ b/tests/components/as5600/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 dir_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/as5600/test.rp2040-ard.yaml b/tests/components/as5600/test.rp2040-ard.yaml index a0623c91e5..4bcbb99c81 100644 --- a/tests/components/as5600/test.rp2040-ard.yaml +++ b/tests/components/as5600/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 dir_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/as7341/common.yaml b/tests/components/as7341/common.yaml index 0351b344c6..3f94656c74 100644 --- a/tests/components/as7341/common.yaml +++ b/tests/components/as7341/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_as7341 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: as7341 + i2c_id: i2c_bus update_interval: 15s gain: X8 atime: 120 diff --git a/tests/components/as7341/test.esp32-c3-idf.yaml b/tests/components/as7341/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/as7341/test.esp32-c3-idf.yaml +++ b/tests/components/as7341/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/as7341/test.esp32-idf.yaml b/tests/components/as7341/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/as7341/test.esp32-idf.yaml +++ b/tests/components/as7341/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/as7341/test.esp8266-ard.yaml b/tests/components/as7341/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/as7341/test.esp8266-ard.yaml +++ b/tests/components/as7341/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/as7341/test.rp2040-ard.yaml b/tests/components/as7341/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/as7341/test.rp2040-ard.yaml +++ b/tests/components/as7341/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/at581x/common.yaml b/tests/components/at581x/common.yaml index 018a0fded1..425be47c42 100644 --- a/tests/components/at581x/common.yaml +++ b/tests/components/at581x/common.yaml @@ -16,13 +16,9 @@ esphome: id: waveradar at581x: + i2c_id: i2c_bus id: waveradar -i2c: - - id: i2c_at581x - scl: ${scl_pin} - sda: ${sda_pin} - switch: - platform: at581x name: Enable Radar diff --git a/tests/components/at581x/test.esp32-c3-idf.yaml b/tests/components/at581x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/at581x/test.esp32-c3-idf.yaml +++ b/tests/components/at581x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/at581x/test.esp32-idf.yaml b/tests/components/at581x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/at581x/test.esp32-idf.yaml +++ b/tests/components/at581x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/at581x/test.esp8266-ard.yaml b/tests/components/at581x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/at581x/test.esp8266-ard.yaml +++ b/tests/components/at581x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/at581x/test.rp2040-ard.yaml b/tests/components/at581x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/at581x/test.rp2040-ard.yaml +++ b/tests/components/at581x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml b/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml +++ b/tests/components/atc_mithermometer/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/atc_mithermometer/test.esp32-idf.yaml b/tests/components/atc_mithermometer/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/atc_mithermometer/test.esp32-idf.yaml +++ b/tests/components/atc_mithermometer/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/atm90e26/common.yaml b/tests/components/atm90e26/common.yaml index 49c3a73ec8..478be7b8b3 100644 --- a/tests/components/atm90e26/common.yaml +++ b/tests/components/atm90e26/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_atm90e26 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: atm90e26 cs_pin: ${cs_pin} diff --git a/tests/components/atm90e26/test.esp32-c3-idf.yaml b/tests/components/atm90e26/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/atm90e26/test.esp32-c3-idf.yaml +++ b/tests/components/atm90e26/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/atm90e26/test.esp32-idf.yaml b/tests/components/atm90e26/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/atm90e26/test.esp32-idf.yaml +++ b/tests/components/atm90e26/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/atm90e26/test.esp8266-ard.yaml b/tests/components/atm90e26/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/atm90e26/test.esp8266-ard.yaml +++ b/tests/components/atm90e26/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/atm90e26/test.rp2040-ard.yaml b/tests/components/atm90e26/test.rp2040-ard.yaml index c8bfab0023..5d0c35c2d2 100644 --- a/tests/components/atm90e26/test.rp2040-ard.yaml +++ b/tests/components/atm90e26/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO6 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/atm90e32/common.yaml b/tests/components/atm90e32/common.yaml index 3eeed8395f..b8b480ab62 100644 --- a/tests/components/atm90e32/common.yaml +++ b/tests/components/atm90e32/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_atm90e32 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: atm90e32 cs_pin: ${cs_pin} diff --git a/tests/components/atm90e32/test.esp32-c3-idf.yaml b/tests/components/atm90e32/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/atm90e32/test.esp32-c3-idf.yaml +++ b/tests/components/atm90e32/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/atm90e32/test.esp32-idf.yaml b/tests/components/atm90e32/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/atm90e32/test.esp32-idf.yaml +++ b/tests/components/atm90e32/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/atm90e32/test.esp8266-ard.yaml b/tests/components/atm90e32/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/atm90e32/test.esp8266-ard.yaml +++ b/tests/components/atm90e32/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/atm90e32/test.rp2040-ard.yaml b/tests/components/atm90e32/test.rp2040-ard.yaml index c8bfab0023..5d0c35c2d2 100644 --- a/tests/components/atm90e32/test.rp2040-ard.yaml +++ b/tests/components/atm90e32/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO6 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/axs15231/common.yaml b/tests/components/axs15231/common.yaml index 1c0c79975f..3f07af80ea 100644 --- a/tests/components/axs15231/common.yaml +++ b/tests/components/axs15231/common.yaml @@ -1,20 +1,18 @@ -i2c: - - id: i2c_axs15231 - scl: 3 - sda: 21 - display: - platform: ssd1306_i2c + i2c_id: i2c_bus id: ssd1306_display model: SSD1306_128X64 reset_pin: 19 pages: - - id: page1 + - id: axs15231_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: axs15231 + i2c_id: i2c_bus + id: axs15231_touchscreen display: ssd1306_display interrupt_pin: 20 reset_pin: 18 diff --git a/tests/components/axs15231/test.esp32-c3-idf.yaml b/tests/components/axs15231/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/axs15231/test.esp32-c3-idf.yaml +++ b/tests/components/axs15231/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/axs15231/test.esp32-idf.yaml b/tests/components/axs15231/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/axs15231/test.esp32-idf.yaml +++ b/tests/components/axs15231/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/axs15231/test.esp8266-ard.yaml b/tests/components/axs15231/test.esp8266-ard.yaml index c09d139574..eb599da773 100644 --- a/tests/components/axs15231/test.esp8266-ard.yaml +++ b/tests/components/axs15231/test.esp8266-ard.yaml @@ -1,10 +1,9 @@ -i2c: - - id: i2c_axs15231 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml display: - platform: ssd1306_i2c + i2c_id: i2c_bus id: ssd1306_display model: SSD1306_128X64 reset_pin: 13 @@ -15,5 +14,6 @@ display: touchscreen: - platform: axs15231 + i2c_id: i2c_bus display: ssd1306_display interrupt_pin: 12 diff --git a/tests/components/axs15231/test.rp2040-ard.yaml b/tests/components/axs15231/test.rp2040-ard.yaml index dade44d145..319a7c71a6 100644 --- a/tests/components/axs15231/test.rp2040-ard.yaml +++ b/tests/components/axs15231/test.rp2040-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/b_parasite/test.esp32-c3-idf.yaml b/tests/components/b_parasite/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/b_parasite/test.esp32-c3-idf.yaml +++ b/tests/components/b_parasite/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/b_parasite/test.esp32-idf.yaml b/tests/components/b_parasite/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/b_parasite/test.esp32-idf.yaml +++ b/tests/components/b_parasite/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bedjet/test.esp32-c3-idf.yaml b/tests/components/bedjet/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/bedjet/test.esp32-c3-idf.yaml +++ b/tests/components/bedjet/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bedjet/test.esp32-idf.yaml b/tests/components/bedjet/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/bedjet/test.esp32-idf.yaml +++ b/tests/components/bedjet/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bh1750/common.yaml b/tests/components/bh1750/common.yaml index c0e0bc1c59..46ea99b7e3 100644 --- a/tests/components/bh1750/common.yaml +++ b/tests/components/bh1750/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_bh1750 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bh1750 + i2c_id: i2c_bus name: Living Room Brightness address: 0x23 update_interval: 30s diff --git a/tests/components/bh1750/test.esp32-c3-idf.yaml b/tests/components/bh1750/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bh1750/test.esp32-c3-idf.yaml +++ b/tests/components/bh1750/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bh1750/test.esp32-idf.yaml b/tests/components/bh1750/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/bh1750/test.esp32-idf.yaml +++ b/tests/components/bh1750/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bh1750/test.esp8266-ard.yaml b/tests/components/bh1750/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bh1750/test.esp8266-ard.yaml +++ b/tests/components/bh1750/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bh1750/test.rp2040-ard.yaml b/tests/components/bh1750/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bh1750/test.rp2040-ard.yaml +++ b/tests/components/bh1750/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bl0906/common.yaml b/tests/components/bl0906/common.yaml index 29b82a5958..006aa682f1 100644 --- a/tests/components/bl0906/common.yaml +++ b/tests/components/bl0906/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_bl0906 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 19200 - sensor: - platform: bl0906 id: bl diff --git a/tests/components/bl0906/test.esp32-c3-idf.yaml b/tests/components/bl0906/test.esp32-c3-idf.yaml index c79d14c740..147d967dd4 100644 --- a/tests/components/bl0906/test.esp32-c3-idf.yaml +++ b/tests/components/bl0906/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bl0906/test.esp32-idf.yaml b/tests/components/bl0906/test.esp32-idf.yaml index 811f6b72a6..76222997a8 100644 --- a/tests/components/bl0906/test.esp32-idf.yaml +++ b/tests/components/bl0906/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO12 - rx_pin: GPIO14 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bl0906/test.esp8266-ard.yaml b/tests/components/bl0906/test.esp8266-ard.yaml index 3b44f9c9c3..ac781ea834 100644 --- a/tests/components/bl0906/test.esp8266-ard.yaml +++ b/tests/components/bl0906/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0906/test.rp2040-ard.yaml b/tests/components/bl0906/test.rp2040-ard.yaml index b516342f3b..f4dada6605 100644 --- a/tests/components/bl0906/test.rp2040-ard.yaml +++ b/tests/components/bl0906/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0939/common.yaml b/tests/components/bl0939/common.yaml index 7a6b635b70..a47aa05606 100644 --- a/tests/components/bl0939/common.yaml +++ b/tests/components/bl0939/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_bl0939 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: bl0939 voltage: diff --git a/tests/components/bl0939/test.esp32-c3-idf.yaml b/tests/components/bl0939/test.esp32-c3-idf.yaml index c79d14c740..4b7c8351a7 100644 --- a/tests/components/bl0939/test.esp32-c3-idf.yaml +++ b/tests/components/bl0939/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bl0939/test.esp32-idf.yaml b/tests/components/bl0939/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/bl0939/test.esp32-idf.yaml +++ b/tests/components/bl0939/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bl0939/test.esp8266-ard.yaml b/tests/components/bl0939/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/bl0939/test.esp8266-ard.yaml +++ b/tests/components/bl0939/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0939/test.rp2040-ard.yaml b/tests/components/bl0939/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/bl0939/test.rp2040-ard.yaml +++ b/tests/components/bl0939/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0940/common.yaml b/tests/components/bl0940/common.yaml index 443f3b0ff0..0b73fd6d55 100644 --- a/tests/components/bl0940/common.yaml +++ b/tests/components/bl0940/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_bl0939 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - button: - platform: bl0940 bl0940_id: test_id diff --git a/tests/components/bl0940/test.esp32-c3-idf.yaml b/tests/components/bl0940/test.esp32-c3-idf.yaml index c79d14c740..4b7c8351a7 100644 --- a/tests/components/bl0940/test.esp32-c3-idf.yaml +++ b/tests/components/bl0940/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bl0940/test.esp32-idf.yaml b/tests/components/bl0940/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/bl0940/test.esp32-idf.yaml +++ b/tests/components/bl0940/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bl0940/test.esp8266-ard.yaml b/tests/components/bl0940/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/bl0940/test.esp8266-ard.yaml +++ b/tests/components/bl0940/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0940/test.rp2040-ard.yaml b/tests/components/bl0940/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/bl0940/test.rp2040-ard.yaml +++ b/tests/components/bl0940/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0942/common.yaml b/tests/components/bl0942/common.yaml index 32da24885f..1aaab8bb86 100644 --- a/tests/components/bl0942/common.yaml +++ b/tests/components/bl0942/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_bl0939 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: bl0942 reset: true diff --git a/tests/components/bl0942/test.bk72xx-ard.yaml b/tests/components/bl0942/test.bk72xx-ard.yaml index 96e13c83a9..0caf71ba1f 100644 --- a/tests/components/bl0942/test.bk72xx-ard.yaml +++ b/tests/components/bl0942/test.bk72xx-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: TX1 - rx_pin: RX1 +packages: + uart: !include ../../test_build_components/common/uart/bk72xx-ard.yaml <<: !include common.yaml diff --git a/tests/components/bl0942/test.esp32-c3-idf.yaml b/tests/components/bl0942/test.esp32-c3-idf.yaml index c79d14c740..4b7c8351a7 100644 --- a/tests/components/bl0942/test.esp32-c3-idf.yaml +++ b/tests/components/bl0942/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bl0942/test.esp32-idf.yaml b/tests/components/bl0942/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/bl0942/test.esp32-idf.yaml +++ b/tests/components/bl0942/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bl0942/test.esp8266-ard.yaml b/tests/components/bl0942/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/bl0942/test.esp8266-ard.yaml +++ b/tests/components/bl0942/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bl0942/test.rp2040-ard.yaml b/tests/components/bl0942/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/bl0942/test.rp2040-ard.yaml +++ b/tests/components/bl0942/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ble_client/test.esp32-c3-idf.yaml b/tests/components/ble_client/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/ble_client/test.esp32-c3-idf.yaml +++ b/tests/components/ble_client/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_client/test.esp32-idf.yaml b/tests/components/ble_client/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/ble_client/test.esp32-idf.yaml +++ b/tests/components/ble_client/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_presence/test.esp32-c3-idf.yaml b/tests/components/ble_presence/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/ble_presence/test.esp32-c3-idf.yaml +++ b/tests/components/ble_presence/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_presence/test.esp32-idf.yaml b/tests/components/ble_presence/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/ble_presence/test.esp32-idf.yaml +++ b/tests/components/ble_presence/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_rssi/test.esp32-c3-idf.yaml b/tests/components/ble_rssi/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/ble_rssi/test.esp32-c3-idf.yaml +++ b/tests/components/ble_rssi/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_rssi/test.esp32-idf.yaml b/tests/components/ble_rssi/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/ble_rssi/test.esp32-idf.yaml +++ b/tests/components/ble_rssi/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_scanner/test.esp32-c3-idf.yaml b/tests/components/ble_scanner/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/ble_scanner/test.esp32-c3-idf.yaml +++ b/tests/components/ble_scanner/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ble_scanner/test.esp32-idf.yaml b/tests/components/ble_scanner/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/ble_scanner/test.esp32-idf.yaml +++ b/tests/components/ble_scanner/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bme280_i2c/common.yaml b/tests/components/bme280_i2c/common.yaml index e74ce9bf6d..e6d41d209c 100644 --- a/tests/components/bme280_i2c/common.yaml +++ b/tests/components/bme280_i2c/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_bme280 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bme280_i2c - i2c_id: i2c_bme280 + i2c_id: i2c_bus address: 0x76 temperature: id: bme280_temperature diff --git a/tests/components/bme280_i2c/test.esp32-c3-idf.yaml b/tests/components/bme280_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bme280_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/bme280_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme280_i2c/test.esp32-idf.yaml b/tests/components/bme280_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/bme280_i2c/test.esp32-idf.yaml +++ b/tests/components/bme280_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme280_i2c/test.esp8266-ard.yaml b/tests/components/bme280_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bme280_i2c/test.esp8266-ard.yaml +++ b/tests/components/bme280_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme280_i2c/test.rp2040-ard.yaml b/tests/components/bme280_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bme280_i2c/test.rp2040-ard.yaml +++ b/tests/components/bme280_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme280_spi/common.yaml b/tests/components/bme280_spi/common.yaml index 303ecf9f73..9a50b410fb 100644 --- a/tests/components/bme280_spi/common.yaml +++ b/tests/components/bme280_spi/common.yaml @@ -1,12 +1,5 @@ -spi: - - id: spi_bme280 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: bme280_spi - spi_id: spi_bme280 cs_pin: ${cs_pin} temperature: id: bme280_temperature diff --git a/tests/components/bme280_spi/test.esp32-c3-idf.yaml b/tests/components/bme280_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/bme280_spi/test.esp32-c3-idf.yaml +++ b/tests/components/bme280_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme280_spi/test.esp32-idf.yaml b/tests/components/bme280_spi/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/bme280_spi/test.esp32-idf.yaml +++ b/tests/components/bme280_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bme280_spi/test.esp8266-ard.yaml b/tests/components/bme280_spi/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/bme280_spi/test.esp8266-ard.yaml +++ b/tests/components/bme280_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bme280_spi/test.rp2040-ard.yaml b/tests/components/bme280_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/bme280_spi/test.rp2040-ard.yaml +++ b/tests/components/bme280_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bme680/common.yaml b/tests/components/bme680/common.yaml index 13a42488f2..d5a7267060 100644 --- a/tests/components/bme680/common.yaml +++ b/tests/components/bme680/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_bme680 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bme680 + i2c_id: i2c_bus temperature: name: BME680 Temperature oversampling: 16x diff --git a/tests/components/bme680/test.esp32-c3-idf.yaml b/tests/components/bme680/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bme680/test.esp32-c3-idf.yaml +++ b/tests/components/bme680/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme680/test.esp32-idf.yaml b/tests/components/bme680/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/bme680/test.esp32-idf.yaml +++ b/tests/components/bme680/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme680/test.esp8266-ard.yaml b/tests/components/bme680/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bme680/test.esp8266-ard.yaml +++ b/tests/components/bme680/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme680/test.rp2040-ard.yaml b/tests/components/bme680/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bme680/test.rp2040-ard.yaml +++ b/tests/components/bme680/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme680_bsec/common.yaml b/tests/components/bme680_bsec/common.yaml index 7d2e9e210b..1a78ab2ae0 100644 --- a/tests/components/bme680_bsec/common.yaml +++ b/tests/components/bme680_bsec/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_bme680 - scl: ${scl_pin} - sda: ${sda_pin} - bme680_bsec: + i2c_id: i2c_bus address: 0x77 sensor: diff --git a/tests/components/bme680_bsec/test.esp32-ard.yaml b/tests/components/bme680_bsec/test.esp32-ard.yaml index 3b761d3fc1..7c503b0ccb 100644 --- a/tests/components/bme680_bsec/test.esp32-ard.yaml +++ b/tests/components/bme680_bsec/test.esp32-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme680_bsec/test.esp8266-ard.yaml b/tests/components/bme680_bsec/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bme680_bsec/test.esp8266-ard.yaml +++ b/tests/components/bme680_bsec/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme68x_bsec2_i2c/common.yaml b/tests/components/bme68x_bsec2_i2c/common.yaml index b8a16ee7bb..bee964f433 100644 --- a/tests/components/bme68x_bsec2_i2c/common.yaml +++ b/tests/components/bme68x_bsec2_i2c/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_bme68x - scl: ${scl_pin} - sda: ${sda_pin} - bme68x_bsec2_i2c: + i2c_id: i2c_bus address: 0x76 model: bme688 algorithm_output: classification diff --git a/tests/components/bme68x_bsec2_i2c/test.esp32-c3-idf.yaml b/tests/components/bme68x_bsec2_i2c/test.esp32-c3-idf.yaml index 84a9dd4bb4..9990d96d29 100644 --- a/tests/components/bme68x_bsec2_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/bme68x_bsec2_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO6 - sda_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme68x_bsec2_i2c/test.esp32-idf.yaml b/tests/components/bme68x_bsec2_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/bme68x_bsec2_i2c/test.esp32-idf.yaml +++ b/tests/components/bme68x_bsec2_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme68x_bsec2_i2c/test.esp32-s2-idf.yaml b/tests/components/bme68x_bsec2_i2c/test.esp32-s2-idf.yaml index 63c3bd6afd..54f59a59fc 100644 --- a/tests/components/bme68x_bsec2_i2c/test.esp32-s2-idf.yaml +++ b/tests/components/bme68x_bsec2_i2c/test.esp32-s2-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s2-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme68x_bsec2_i2c/test.esp32-s3-idf.yaml b/tests/components/bme68x_bsec2_i2c/test.esp32-s3-idf.yaml index 63c3bd6afd..0fd8684a2c 100644 --- a/tests/components/bme68x_bsec2_i2c/test.esp32-s3-idf.yaml +++ b/tests/components/bme68x_bsec2_i2c/test.esp32-s3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bme68x_bsec2_i2c/test.esp8266-ard.yaml b/tests/components/bme68x_bsec2_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bme68x_bsec2_i2c/test.esp8266-ard.yaml +++ b/tests/components/bme68x_bsec2_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bme68x_bsec2_i2c/test.rp2040-ard.yaml b/tests/components/bme68x_bsec2_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bme68x_bsec2_i2c/test.rp2040-ard.yaml +++ b/tests/components/bme68x_bsec2_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmi160/common.yaml b/tests/components/bmi160/common.yaml index 6aa9aa6ed0..7375732db2 100644 --- a/tests/components/bmi160/common.yaml +++ b/tests/components/bmi160/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_bmi160 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bmi160 + i2c_id: i2c_bus address: 0x68 acceleration_x: name: BMI160 Accel X diff --git a/tests/components/bmi160/test.esp32-c3-idf.yaml b/tests/components/bmi160/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bmi160/test.esp32-c3-idf.yaml +++ b/tests/components/bmi160/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmi160/test.esp32-idf.yaml b/tests/components/bmi160/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/bmi160/test.esp32-idf.yaml +++ b/tests/components/bmi160/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmi160/test.esp8266-ard.yaml b/tests/components/bmi160/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bmi160/test.esp8266-ard.yaml +++ b/tests/components/bmi160/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmi160/test.rp2040-ard.yaml b/tests/components/bmi160/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bmi160/test.rp2040-ard.yaml +++ b/tests/components/bmi160/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp085/common.yaml b/tests/components/bmp085/common.yaml index 219bc51fbb..ad358f4409 100644 --- a/tests/components/bmp085/common.yaml +++ b/tests/components/bmp085/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_bmp085 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bmp085 + i2c_id: i2c_bus temperature: name: Outside Temperature pressure: diff --git a/tests/components/bmp085/test.esp32-c3-idf.yaml b/tests/components/bmp085/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bmp085/test.esp32-c3-idf.yaml +++ b/tests/components/bmp085/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp085/test.esp32-idf.yaml b/tests/components/bmp085/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/bmp085/test.esp32-idf.yaml +++ b/tests/components/bmp085/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp085/test.esp8266-ard.yaml b/tests/components/bmp085/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bmp085/test.esp8266-ard.yaml +++ b/tests/components/bmp085/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp085/test.rp2040-ard.yaml b/tests/components/bmp085/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bmp085/test.rp2040-ard.yaml +++ b/tests/components/bmp085/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp280_i2c/common.yaml b/tests/components/bmp280_i2c/common.yaml index edf52b2cd4..785343de7d 100644 --- a/tests/components/bmp280_i2c/common.yaml +++ b/tests/components/bmp280_i2c/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_bmp280 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bmp280_i2c - i2c_id: i2c_bmp280 + i2c_id: i2c_bus address: 0x77 temperature: id: bmp280_temperature diff --git a/tests/components/bmp280_i2c/test.esp32-c3-idf.yaml b/tests/components/bmp280_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bmp280_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/bmp280_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp280_i2c/test.esp32-idf.yaml b/tests/components/bmp280_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/bmp280_i2c/test.esp32-idf.yaml +++ b/tests/components/bmp280_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp280_i2c/test.esp8266-ard.yaml b/tests/components/bmp280_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bmp280_i2c/test.esp8266-ard.yaml +++ b/tests/components/bmp280_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp280_i2c/test.rp2040-ard.yaml b/tests/components/bmp280_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bmp280_i2c/test.rp2040-ard.yaml +++ b/tests/components/bmp280_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp280_spi/common.yaml b/tests/components/bmp280_spi/common.yaml index 798804de5b..fa88967ca4 100644 --- a/tests/components/bmp280_spi/common.yaml +++ b/tests/components/bmp280_spi/common.yaml @@ -1,12 +1,5 @@ -spi: - - id: spi_bmp280 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: bmp280_spi - spi_id: spi_bmp280 cs_pin: ${cs_pin} temperature: id: bmp280_temperature diff --git a/tests/components/bmp280_spi/test.esp32-c3-idf.yaml b/tests/components/bmp280_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/bmp280_spi/test.esp32-c3-idf.yaml +++ b/tests/components/bmp280_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp280_spi/test.esp32-idf.yaml b/tests/components/bmp280_spi/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/bmp280_spi/test.esp32-idf.yaml +++ b/tests/components/bmp280_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bmp280_spi/test.esp8266-ard.yaml b/tests/components/bmp280_spi/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/bmp280_spi/test.esp8266-ard.yaml +++ b/tests/components/bmp280_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bmp280_spi/test.rp2040-ard.yaml b/tests/components/bmp280_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/bmp280_spi/test.rp2040-ard.yaml +++ b/tests/components/bmp280_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bmp3xx_i2c/common.yaml b/tests/components/bmp3xx_i2c/common.yaml index 6641b7a1b8..ebc4921b84 100644 --- a/tests/components/bmp3xx_i2c/common.yaml +++ b/tests/components/bmp3xx_i2c/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_bmp3xx - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bmp3xx_i2c - i2c_id: i2c_bmp3xx + i2c_id: i2c_bus address: 0x77 temperature: name: BMP Temperature diff --git a/tests/components/bmp3xx_i2c/test.esp32-c3-idf.yaml b/tests/components/bmp3xx_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bmp3xx_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/bmp3xx_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp3xx_i2c/test.esp32-idf.yaml b/tests/components/bmp3xx_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/bmp3xx_i2c/test.esp32-idf.yaml +++ b/tests/components/bmp3xx_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp3xx_i2c/test.esp8266-ard.yaml b/tests/components/bmp3xx_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bmp3xx_i2c/test.esp8266-ard.yaml +++ b/tests/components/bmp3xx_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp3xx_i2c/test.rp2040-ard.yaml b/tests/components/bmp3xx_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bmp3xx_i2c/test.rp2040-ard.yaml +++ b/tests/components/bmp3xx_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp3xx_spi/common.yaml b/tests/components/bmp3xx_spi/common.yaml index 8d5f897661..d6acef1833 100644 --- a/tests/components/bmp3xx_spi/common.yaml +++ b/tests/components/bmp3xx_spi/common.yaml @@ -1,12 +1,5 @@ -spi: - - id: spi_bmp3xx - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: bmp3xx_spi - spi_id: spi_bmp3xx cs_pin: ${cs_pin} temperature: name: BMP Temperature diff --git a/tests/components/bmp3xx_spi/test.esp32-c3-idf.yaml b/tests/components/bmp3xx_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/bmp3xx_spi/test.esp32-c3-idf.yaml +++ b/tests/components/bmp3xx_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp3xx_spi/test.esp32-idf.yaml b/tests/components/bmp3xx_spi/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/bmp3xx_spi/test.esp32-idf.yaml +++ b/tests/components/bmp3xx_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/bmp3xx_spi/test.esp8266-ard.yaml b/tests/components/bmp3xx_spi/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/bmp3xx_spi/test.esp8266-ard.yaml +++ b/tests/components/bmp3xx_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bmp3xx_spi/test.rp2040-ard.yaml b/tests/components/bmp3xx_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/bmp3xx_spi/test.rp2040-ard.yaml +++ b/tests/components/bmp3xx_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/bmp581/common.yaml b/tests/components/bmp581/common.yaml index 71ad4bfb1a..250b1f5857 100644 --- a/tests/components/bmp581/common.yaml +++ b/tests/components/bmp581/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_bmp581 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: bmp581 + i2c_id: i2c_bus temperature: name: BMP581 Temperature iir_filter: 2x diff --git a/tests/components/bmp581/test.esp32-c3-idf.yaml b/tests/components/bmp581/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/bmp581/test.esp32-c3-idf.yaml +++ b/tests/components/bmp581/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp581/test.esp32-idf.yaml b/tests/components/bmp581/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/bmp581/test.esp32-idf.yaml +++ b/tests/components/bmp581/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/bmp581/test.esp8266-ard.yaml b/tests/components/bmp581/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/bmp581/test.esp8266-ard.yaml +++ b/tests/components/bmp581/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/bmp581/test.rp2040-ard.yaml b/tests/components/bmp581/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/bmp581/test.rp2040-ard.yaml +++ b/tests/components/bmp581/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/bp1658cj/test.esp32-idf.yaml b/tests/components/bp1658cj/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/bp1658cj/test.esp32-idf.yaml +++ b/tests/components/bp1658cj/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/bp1658cj/test.esp8266-ard.yaml b/tests/components/bp1658cj/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/bp1658cj/test.esp8266-ard.yaml +++ b/tests/components/bp1658cj/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/bp5758d/test.esp32-idf.yaml b/tests/components/bp5758d/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/bp5758d/test.esp32-idf.yaml +++ b/tests/components/bp5758d/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/bp5758d/test.esp8266-ard.yaml b/tests/components/bp5758d/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/bp5758d/test.esp8266-ard.yaml +++ b/tests/components/bp5758d/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/camera/common.yaml b/tests/components/camera/common.yaml index 3daf1e8565..76cca4cf94 100644 --- a/tests/components/camera/common.yaml +++ b/tests/components/camera/common.yaml @@ -1,18 +1,2 @@ -esphome: - includes: - - ../../../esphome/components/camera/ - -script: - - id: interface_compile_check - then: - - lambda: |- - using namespace esphome::camera; - class MockCamera : public Camera { - public: - void add_image_callback(std::function)> &&callback) override {} - CameraImageReader *create_image_reader() override { return 0; } - void request_image(CameraRequester requester) override {} - void start_stream(CameraRequester requester) override {} - void stop_stream(CameraRequester requester) override {} - }; - MockCamera* camera = new MockCamera(); +# Camera is a base component auto-loaded by esp32_camera +# The hardware configuration comes from the camera package diff --git a/tests/components/camera/test.esp32-idf.yaml b/tests/components/camera/test.esp32-idf.yaml index dade44d145..3d93dd6418 100644 --- a/tests/components/camera/test.esp32-idf.yaml +++ b/tests/components/camera/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + camera: !include ../../test_build_components/common/camera/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/camera_encoder/test.esp32-idf.yaml b/tests/components/camera_encoder/test.esp32-idf.yaml index dade44d145..3d93dd6418 100644 --- a/tests/components/camera_encoder/test.esp32-idf.yaml +++ b/tests/components/camera_encoder/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + camera: !include ../../test_build_components/common/camera/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/canbus/test.esp32-idf.yaml b/tests/components/canbus/test.esp32-idf.yaml index dade44d145..2d29656c94 100644 --- a/tests/components/canbus/test.esp32-idf.yaml +++ b/tests/components/canbus/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/cap1188/common.yaml b/tests/components/cap1188/common.yaml index e83bf5d5d2..3e4ed972ff 100644 --- a/tests/components/cap1188/common.yaml +++ b/tests/components/cap1188/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_cap1188 - scl: ${scl_pin} - sda: ${sda_pin} - cap1188: id: cap1188_component + i2c_id: i2c_bus address: 0x29 reset_pin: ${reset_pin} touch_threshold: 0x20 diff --git a/tests/components/cap1188/test.esp32-c3-idf.yaml b/tests/components/cap1188/test.esp32-c3-idf.yaml index 1e6670c196..c97f30d52c 100644 --- a/tests/components/cap1188/test.esp32-c3-idf.yaml +++ b/tests/components/cap1188/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/cap1188/test.esp32-idf.yaml b/tests/components/cap1188/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/cap1188/test.esp32-idf.yaml +++ b/tests/components/cap1188/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/cap1188/test.esp8266-ard.yaml b/tests/components/cap1188/test.esp8266-ard.yaml index dfdc12a3d1..b8bb94edde 100644 --- a/tests/components/cap1188/test.esp8266-ard.yaml +++ b/tests/components/cap1188/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cap1188/test.rp2040-ard.yaml b/tests/components/cap1188/test.rp2040-ard.yaml index 1e6670c196..1bf10642c5 100644 --- a/tests/components/cap1188/test.rp2040-ard.yaml +++ b/tests/components/cap1188/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ccs811/common.yaml b/tests/components/ccs811/common.yaml index a781996c66..0d912fd3ac 100644 --- a/tests/components/ccs811/common.yaml +++ b/tests/components/ccs811/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ccs811 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ccs811 + i2c_id: i2c_bus eco2: name: CCS811 eCO2 tvoc: diff --git a/tests/components/ccs811/test.esp32-c3-idf.yaml b/tests/components/ccs811/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ccs811/test.esp32-c3-idf.yaml +++ b/tests/components/ccs811/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ccs811/test.esp32-idf.yaml b/tests/components/ccs811/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ccs811/test.esp32-idf.yaml +++ b/tests/components/ccs811/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ccs811/test.esp8266-ard.yaml b/tests/components/ccs811/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ccs811/test.esp8266-ard.yaml +++ b/tests/components/ccs811/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ccs811/test.rp2040-ard.yaml b/tests/components/ccs811/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ccs811/test.rp2040-ard.yaml +++ b/tests/components/ccs811/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ch422g/common.yaml b/tests/components/ch422g/common.yaml index d65956ecac..ad3707eee0 100644 --- a/tests/components/ch422g/common.yaml +++ b/tests/components/ch422g/common.yaml @@ -1,5 +1,6 @@ ch422g: - id: ch422g_hub + i2c_id: i2c_bus binary_sensor: - platform: gpio diff --git a/tests/components/ch422g/test.esp32-c3-idf.yaml b/tests/components/ch422g/test.esp32-c3-idf.yaml index cd822cb308..9990d96d29 100644 --- a/tests/components/ch422g/test.esp32-c3-idf.yaml +++ b/tests/components/ch422g/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ch422g - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ch422g/test.esp32-idf.yaml b/tests/components/ch422g/test.esp32-idf.yaml index cd3f1bbeef..b47e39c389 100644 --- a/tests/components/ch422g/test.esp32-idf.yaml +++ b/tests/components/ch422g/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ch422g - scl: 16 - sda: 17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ch422g/test.esp8266-ard.yaml b/tests/components/ch422g/test.esp8266-ard.yaml index cd822cb308..4a98b9388a 100644 --- a/tests/components/ch422g/test.esp8266-ard.yaml +++ b/tests/components/ch422g/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ch422g - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ch422g/test.rp2040-ard.yaml b/tests/components/ch422g/test.rp2040-ard.yaml index cd822cb308..319a7c71a6 100644 --- a/tests/components/ch422g/test.rp2040-ard.yaml +++ b/tests/components/ch422g/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ch422g - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/chsc6x/test.esp32-c3-idf.yaml b/tests/components/chsc6x/test.esp32-c3-idf.yaml index b0f55eb2e6..f32f147a44 100644 --- a/tests/components/chsc6x/test.esp32-c3-idf.yaml +++ b/tests/components/chsc6x/test.esp32-c3-idf.yaml @@ -1,19 +1,14 @@ -i2c: - - id: i2c_chsc6x - scl: 3 - sda: 9 - -spi: - clk_pin: 5 - mosi_pin: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml display: - platform: ili9xxx id: ili9xxx_display model: GC9A01A invert_colors: True - cs_pin: 18 - dc_pin: 19 + cs_pin: 10 + dc_pin: 6 pages: - id: page1 lambda: |- diff --git a/tests/components/chsc6x/test.esp32-idf.yaml b/tests/components/chsc6x/test.esp32-idf.yaml index 9bc58b66f6..ea3686d8bd 100644 --- a/tests/components/chsc6x/test.esp32-idf.yaml +++ b/tests/components/chsc6x/test.esp32-idf.yaml @@ -1,19 +1,14 @@ -i2c: - - id: i2c_chsc6x - scl: 3 - sda: 21 - -spi: - clk_pin: 16 - mosi_pin: 17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml display: - platform: ili9xxx id: ili9xxx_display model: GC9A01A invert_colors: True - cs_pin: 18 - dc_pin: 19 + cs_pin: 22 + dc_pin: 21 pages: - id: page1 lambda: |- diff --git a/tests/components/chsc6x/test.rp2040-ard.yaml b/tests/components/chsc6x/test.rp2040-ard.yaml index dbd0d59fc4..89cc1b7477 100644 --- a/tests/components/chsc6x/test.rp2040-ard.yaml +++ b/tests/components/chsc6x/test.rp2040-ard.yaml @@ -1,19 +1,14 @@ -i2c: - - id: i2c_chsc6x - scl: 1 - sda: 0 - -spi: - clk_pin: 2 - mosi_pin: 3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml display: - platform: ili9xxx id: ili9xxx_display model: GC9A01A invert_colors: True - cs_pin: 18 - dc_pin: 19 + cs_pin: 20 + dc_pin: 21 pages: - id: page1 lambda: |- @@ -22,4 +17,4 @@ display: touchscreen: - platform: chsc6x display: ili9xxx_display - interrupt_pin: 20 + interrupt_pin: 22 diff --git a/tests/components/cm1106/common.yaml b/tests/components/cm1106/common.yaml index a01e78024e..ed2fd67007 100644 --- a/tests/components/cm1106/common.yaml +++ b/tests/components/cm1106/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_cm1106 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: cm1106 co2: diff --git a/tests/components/cm1106/test.esp32-c3-idf.yaml b/tests/components/cm1106/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/cm1106/test.esp32-c3-idf.yaml +++ b/tests/components/cm1106/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/cm1106/test.esp32-idf.yaml b/tests/components/cm1106/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/cm1106/test.esp32-idf.yaml +++ b/tests/components/cm1106/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/cm1106/test.esp8266-ard.yaml b/tests/components/cm1106/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/cm1106/test.esp8266-ard.yaml +++ b/tests/components/cm1106/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/cm1106/test.rp2040-ard.yaml b/tests/components/cm1106/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/cm1106/test.rp2040-ard.yaml +++ b/tests/components/cm1106/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/const/common.yaml b/tests/components/const/common.yaml index f4b15f2b90..109db65b63 100644 --- a/tests/components/const/common.yaml +++ b/tests/components/const/common.yaml @@ -1,9 +1,3 @@ -spi: - id: quad_spi - clk_pin: 15 - type: quad - data_pins: [14, 10, 16, 12] - display: - platform: qspi_dbi model: RM690B0 diff --git a/tests/components/const/test.esp32-s3-idf.yaml b/tests/components/const/test.esp32-s3-idf.yaml index dade44d145..c335dee1f3 100644 --- a/tests/components/const/test.esp32-s3-idf.yaml +++ b/tests/components/const/test.esp32-s3-idf.yaml @@ -1 +1,4 @@ +packages: + qspi: !include ../../test_build_components/common/qspi/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/cs5460a/common.yaml b/tests/components/cs5460a/common.yaml index d97b01716b..9ecd934eda 100644 --- a/tests/components/cs5460a/common.yaml +++ b/tests/components/cs5460a/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_cs5460a - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: cs5460a id: cs5460a1 diff --git a/tests/components/cs5460a/test.esp32-c3-idf.yaml b/tests/components/cs5460a/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/cs5460a/test.esp32-c3-idf.yaml +++ b/tests/components/cs5460a/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/cs5460a/test.esp32-idf.yaml b/tests/components/cs5460a/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/cs5460a/test.esp32-idf.yaml +++ b/tests/components/cs5460a/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/cs5460a/test.esp8266-ard.yaml b/tests/components/cs5460a/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/cs5460a/test.esp8266-ard.yaml +++ b/tests/components/cs5460a/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cs5460a/test.rp2040-ard.yaml b/tests/components/cs5460a/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/cs5460a/test.rp2040-ard.yaml +++ b/tests/components/cs5460a/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cse7761/common.yaml b/tests/components/cse7761/common.yaml index 60cce3864a..77b19957b4 100644 --- a/tests/components/cse7761/common.yaml +++ b/tests/components/cse7761/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_cse7761 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 38400 - sensor: - platform: cse7761 voltage: diff --git a/tests/components/cse7761/test.esp32-c3-idf.yaml b/tests/components/cse7761/test.esp32-c3-idf.yaml index c79d14c740..4e11c6e7cb 100644 --- a/tests/components/cse7761/test.esp32-c3-idf.yaml +++ b/tests/components/cse7761/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart_38400: !include ../../test_build_components/common/uart_38400/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/cse7761/test.esp32-idf.yaml b/tests/components/cse7761/test.esp32-idf.yaml index 811f6b72a6..a6a8fee7e9 100644 --- a/tests/components/cse7761/test.esp32-idf.yaml +++ b/tests/components/cse7761/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart_38400: !include ../../test_build_components/common/uart_38400/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/cse7761/test.esp8266-ard.yaml b/tests/components/cse7761/test.esp8266-ard.yaml index 3b44f9c9c3..134274ffb8 100644 --- a/tests/components/cse7761/test.esp8266-ard.yaml +++ b/tests/components/cse7761/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart_38400: !include ../../test_build_components/common/uart_38400/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cse7761/test.rp2040-ard.yaml b/tests/components/cse7761/test.rp2040-ard.yaml index b516342f3b..b813e0f7f1 100644 --- a/tests/components/cse7761/test.rp2040-ard.yaml +++ b/tests/components/cse7761/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart_38400: !include ../../test_build_components/common/uart_38400/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cse7766/common.yaml b/tests/components/cse7766/common.yaml index f12b135a77..6db19691f1 100644 --- a/tests/components/cse7766/common.yaml +++ b/tests/components/cse7766/common.yaml @@ -1,10 +1,3 @@ -uart: - - id: uart_cse7766 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 4800 - parity: EVEN - sensor: - platform: cse7766 voltage: diff --git a/tests/components/cse7766/test.esp32-c3-idf.yaml b/tests/components/cse7766/test.esp32-c3-idf.yaml index c79d14c740..dc95c985c7 100644 --- a/tests/components/cse7766/test.esp32-c3-idf.yaml +++ b/tests/components/cse7766/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart_4800_even: !include ../../test_build_components/common/uart_4800_even/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/cse7766/test.esp32-idf.yaml b/tests/components/cse7766/test.esp32-idf.yaml index 811f6b72a6..911b867708 100644 --- a/tests/components/cse7766/test.esp32-idf.yaml +++ b/tests/components/cse7766/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO12 - rx_pin: GPIO14 +packages: + uart_4800_even: !include ../../test_build_components/common/uart_4800_even/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/cse7766/test.esp8266-ard.yaml b/tests/components/cse7766/test.esp8266-ard.yaml index 3b44f9c9c3..77e529ca48 100644 --- a/tests/components/cse7766/test.esp8266-ard.yaml +++ b/tests/components/cse7766/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart_4800_even: !include ../../test_build_components/common/uart_4800_even/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cse7766/test.rp2040-ard.yaml b/tests/components/cse7766/test.rp2040-ard.yaml index b516342f3b..b7056670ef 100644 --- a/tests/components/cse7766/test.rp2040-ard.yaml +++ b/tests/components/cse7766/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart_4800_even: !include ../../test_build_components/common/uart_4800_even/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cst226/common.yaml b/tests/components/cst226/common.yaml index d0b8ea3a86..79d7e7fd53 100644 --- a/tests/components/cst226/common.yaml +++ b/tests/components/cst226/common.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_cst226 - scl: ${scl_pin} - sda: ${sda_pin} - -spi: - - id: spi_ili9xxx - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - - id: my_display + - id: cst226_display platform: ili9xxx model: ili9342 cs_pin: ${cs_pin} @@ -19,7 +9,9 @@ display: touchscreen: - id: ts_cst226 + i2c_id: i2c_bus platform: cst226 + display: cst226_display interrupt_pin: ${interrupt_pin} reset_pin: ${reset_pin} diff --git a/tests/components/cst226/test.esp32-c3-idf.yaml b/tests/components/cst226/test.esp32-c3-idf.yaml index 2f9bd72882..ffc12867d0 100644 --- a/tests/components/cst226/test.esp32-c3-idf.yaml +++ b/tests/components/cst226/test.esp32-c3-idf.yaml @@ -1,12 +1,11 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - cs_pin: GPIO8 + cs_pin: GPIO7 dc_pin: GPIO9 - disp_reset_pin: GPIO10 - scl_pin: GPIO0 - sda_pin: GPIO1 + disp_reset_pin: GPIO18 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/cst226/test.esp32-idf.yaml b/tests/components/cst226/test.esp32-idf.yaml index 11e2c4fd43..984f08db47 100644 --- a/tests/components/cst226/test.esp32-idf.yaml +++ b/tests/components/cst226/test.esp32-idf.yaml @@ -1,12 +1,12 @@ substitutions: - clk_pin: GPIO0 - mosi_pin: GPIO2 cs_pin: GPIO4 dc_pin: GPIO5 disp_reset_pin: GPIO12 - scl_pin: GPIO13 - sda_pin: GPIO14 interrupt_pin: GPIO15 - reset_pin: GPIO16 + reset_pin: GPIO25 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/cst816/common.yaml b/tests/components/cst816/common.yaml index 9400e4eef0..889a477dd2 100644 --- a/tests/components/cst816/common.yaml +++ b/tests/components/cst816/common.yaml @@ -1,15 +1,5 @@ -i2c: - - id: i2c_cst816 - scl: ${scl_pin} - sda: ${sda_pin} - -spi: - - id: spi_ili9xxx - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - - id: my_display + - id: cst816_display platform: ili9xxx dimensions: 480x320 model: ST7796 @@ -25,7 +15,9 @@ display: touchscreen: - id: ts_cst816 + i2c_id: i2c_bus platform: cst816 + display: cst816_display interrupt_pin: ${interrupt_pin} reset_pin: ${reset_pin} skip_probe: false @@ -36,6 +28,7 @@ touchscreen: binary_sensor: - platform: touchscreen + touchscreen_id: ts_cst816 name: Home Button use_raw: true x_min: 0 diff --git a/tests/components/cst816/test.esp32-c3-idf.yaml b/tests/components/cst816/test.esp32-c3-idf.yaml index 2f9bd72882..ffc12867d0 100644 --- a/tests/components/cst816/test.esp32-c3-idf.yaml +++ b/tests/components/cst816/test.esp32-c3-idf.yaml @@ -1,12 +1,11 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - cs_pin: GPIO8 + cs_pin: GPIO7 dc_pin: GPIO9 - disp_reset_pin: GPIO10 - scl_pin: GPIO0 - sda_pin: GPIO1 + disp_reset_pin: GPIO18 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/cst816/test.esp32-idf.yaml b/tests/components/cst816/test.esp32-idf.yaml index 11e2c4fd43..984f08db47 100644 --- a/tests/components/cst816/test.esp32-idf.yaml +++ b/tests/components/cst816/test.esp32-idf.yaml @@ -1,12 +1,12 @@ substitutions: - clk_pin: GPIO0 - mosi_pin: GPIO2 cs_pin: GPIO4 dc_pin: GPIO5 disp_reset_pin: GPIO12 - scl_pin: GPIO13 - sda_pin: GPIO14 interrupt_pin: GPIO15 - reset_pin: GPIO16 + reset_pin: GPIO25 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/current_based/common.yaml b/tests/components/current_based/common.yaml index 25dc9671b7..503c4596e9 100644 --- a/tests/components/current_based/common.yaml +++ b/tests/components/current_based/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ade7953 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ade7953_i2c + i2c_id: i2c_bus irq_pin: ${irq_pin} voltage: name: ADE7953 Voltage diff --git a/tests/components/current_based/test.esp32-c3-idf.yaml b/tests/components/current_based/test.esp32-c3-idf.yaml index 799acabd5a..59296a1e6e 100644 --- a/tests/components/current_based/test.esp32-c3-idf.yaml +++ b/tests/components/current_based/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/current_based/test.esp32-idf.yaml b/tests/components/current_based/test.esp32-idf.yaml index 2c57d412f6..49629536e7 100644 --- a/tests/components/current_based/test.esp32-idf.yaml +++ b/tests/components/current_based/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 irq_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/current_based/test.esp8266-ard.yaml b/tests/components/current_based/test.esp8266-ard.yaml index c8e6a43f44..dc7609ab37 100644 --- a/tests/components/current_based/test.esp8266-ard.yaml +++ b/tests/components/current_based/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/current_based/test.rp2040-ard.yaml b/tests/components/current_based/test.rp2040-ard.yaml index 799acabd5a..b80562ad22 100644 --- a/tests/components/current_based/test.rp2040-ard.yaml +++ b/tests/components/current_based/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/cwww/common.yaml b/tests/components/cwww/common.yaml index 0ad5beeaae..7fa5ab668c 100644 --- a/tests/components/cwww/common.yaml +++ b/tests/components/cwww/common.yaml @@ -1,11 +1,3 @@ -output: - - platform: ${light_platform} - id: light_output_1 - pin: ${pin_o1} - - platform: ${light_platform} - id: light_output_2 - pin: ${pin_o2} - light: - platform: cwww name: CWWW Light diff --git a/tests/components/cwww/test.esp32-c3-idf.yaml b/tests/components/cwww/test.esp32-c3-idf.yaml index 982394ded6..51571b34cf 100644 --- a/tests/components/cwww/test.esp32-c3-idf.yaml +++ b/tests/components/cwww/test.esp32-c3-idf.yaml @@ -3,12 +3,15 @@ substitutions: pin_o1: GPIO6 pin_o2: GPIO7 -packages: - device_base: !include common.yaml - output: - - id: !extend light_output_1 + - platform: ${light_platform} + id: light_output_1 + pin: ${pin_o1} channel: 0 - - id: !extend light_output_2 + - platform: ${light_platform} + id: light_output_2 + pin: ${pin_o2} channel: 1 phase_angle: 180° + +<<: !include common.yaml diff --git a/tests/components/cwww/test.esp32-idf.yaml b/tests/components/cwww/test.esp32-idf.yaml index d2a998e6b3..01edf0b0b5 100644 --- a/tests/components/cwww/test.esp32-idf.yaml +++ b/tests/components/cwww/test.esp32-idf.yaml @@ -3,12 +3,15 @@ substitutions: pin_o1: GPIO16 pin_o2: GPIO17 -packages: - device_base: !include common.yaml - output: - - id: !extend light_output_1 + - platform: ${light_platform} + id: light_output_1 + pin: ${pin_o1} channel: 0 - - id: !extend light_output_2 + - platform: ${light_platform} + id: light_output_2 + pin: ${pin_o2} channel: 1 phase_angle: 180° + +<<: !include common.yaml diff --git a/tests/components/cwww/test.esp8266-ard.yaml b/tests/components/cwww/test.esp8266-ard.yaml index 75a5b9d64d..49d73b7d3d 100644 --- a/tests/components/cwww/test.esp8266-ard.yaml +++ b/tests/components/cwww/test.esp8266-ard.yaml @@ -3,4 +3,12 @@ substitutions: pin_o1: GPIO12 pin_o2: GPIO13 +output: + - platform: ${light_platform} + id: light_output_1 + pin: ${pin_o1} + - platform: ${light_platform} + id: light_output_2 + pin: ${pin_o2} + <<: !include common.yaml diff --git a/tests/components/cwww/test.rp2040-ard.yaml b/tests/components/cwww/test.rp2040-ard.yaml index 537177aca1..ba8e0ad071 100644 --- a/tests/components/cwww/test.rp2040-ard.yaml +++ b/tests/components/cwww/test.rp2040-ard.yaml @@ -3,4 +3,12 @@ substitutions: pin_o1: GPIO12 pin_o2: GPIO13 +output: + - platform: ${light_platform} + id: light_output_1 + pin: ${pin_o1} + - platform: ${light_platform} + id: light_output_2 + pin: ${pin_o2} + <<: !include common.yaml diff --git a/tests/components/dac7678/common.yaml b/tests/components/dac7678/common.yaml index efad81a5ff..6c9c032686 100644 --- a/tests/components/dac7678/common.yaml +++ b/tests/components/dac7678/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_dac7678 - scl: ${scl_pin} - sda: ${sda_pin} - dac7678: + i2c_id: i2c_bus address: 0x4A id: dac7678_hub internal_reference: true diff --git a/tests/components/dac7678/test.esp32-c3-idf.yaml b/tests/components/dac7678/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/dac7678/test.esp32-c3-idf.yaml +++ b/tests/components/dac7678/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/dac7678/test.esp32-idf.yaml b/tests/components/dac7678/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/dac7678/test.esp32-idf.yaml +++ b/tests/components/dac7678/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/dac7678/test.esp8266-ard.yaml b/tests/components/dac7678/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/dac7678/test.esp8266-ard.yaml +++ b/tests/components/dac7678/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/dac7678/test.rp2040-ard.yaml b/tests/components/dac7678/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/dac7678/test.rp2040-ard.yaml +++ b/tests/components/dac7678/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/daikin_arc/test.esp8266-ard.yaml b/tests/components/daikin_arc/test.esp8266-ard.yaml index 8e08490d0c..5698a7ef5f 100644 --- a/tests/components/daikin_arc/test.esp8266-ard.yaml +++ b/tests/components/daikin_arc/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO5 - rx_pin: GPIO4 + tx_pin: GPIO0 + rx_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/dallas_temp/common.yaml b/tests/components/dallas_temp/common.yaml index fb51f4818e..6d865d8e93 100644 --- a/tests/components/dallas_temp/common.yaml +++ b/tests/components/dallas_temp/common.yaml @@ -1,6 +1,6 @@ one_wire: - platform: gpio - pin: 4 + pin: ${one_wire_pin} sensor: - platform: dallas_temp diff --git a/tests/components/dallas_temp/test.esp32-c3-idf.yaml b/tests/components/dallas_temp/test.esp32-c3-idf.yaml index dade44d145..49bf988eb4 100644 --- a/tests/components/dallas_temp/test.esp32-c3-idf.yaml +++ b/tests/components/dallas_temp/test.esp32-c3-idf.yaml @@ -1 +1,7 @@ +substitutions: + one_wire_pin: "4" + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/dallas_temp/test.esp32-idf.yaml b/tests/components/dallas_temp/test.esp32-idf.yaml index dade44d145..7f9a7d4c2c 100644 --- a/tests/components/dallas_temp/test.esp32-idf.yaml +++ b/tests/components/dallas_temp/test.esp32-idf.yaml @@ -1 +1,7 @@ +substitutions: + one_wire_pin: "4" + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/dallas_temp/test.esp8266-ard.yaml b/tests/components/dallas_temp/test.esp8266-ard.yaml index dade44d145..f58b3e0ff3 100644 --- a/tests/components/dallas_temp/test.esp8266-ard.yaml +++ b/tests/components/dallas_temp/test.esp8266-ard.yaml @@ -1 +1,7 @@ +substitutions: + one_wire_pin: "13" + +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dallas_temp/test.rp2040-ard.yaml b/tests/components/dallas_temp/test.rp2040-ard.yaml index dade44d145..d86645aa64 100644 --- a/tests/components/dallas_temp/test.rp2040-ard.yaml +++ b/tests/components/dallas_temp/test.rp2040-ard.yaml @@ -1 +1,7 @@ +substitutions: + one_wire_pin: "10" + +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/daly_bms/common.yaml b/tests/components/daly_bms/common.yaml index a4cb849f9f..222999e25e 100644 --- a/tests/components/daly_bms/common.yaml +++ b/tests/components/daly_bms/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_daly_bms - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 4800 - daly_bms: update_interval: 20s diff --git a/tests/components/daly_bms/test.esp32-c3-idf.yaml b/tests/components/daly_bms/test.esp32-c3-idf.yaml index c79d14c740..4b7c8351a7 100644 --- a/tests/components/daly_bms/test.esp32-c3-idf.yaml +++ b/tests/components/daly_bms/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/daly_bms/test.esp32-idf.yaml b/tests/components/daly_bms/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/daly_bms/test.esp32-idf.yaml +++ b/tests/components/daly_bms/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/daly_bms/test.esp8266-ard.yaml b/tests/components/daly_bms/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/daly_bms/test.esp8266-ard.yaml +++ b/tests/components/daly_bms/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/daly_bms/test.rp2040-ard.yaml b/tests/components/daly_bms/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/daly_bms/test.rp2040-ard.yaml +++ b/tests/components/daly_bms/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dfplayer/common.yaml b/tests/components/dfplayer/common.yaml index d7446141c3..5d2540c275 100644 --- a/tests/components/dfplayer/common.yaml +++ b/tests/components/dfplayer/common.yaml @@ -26,12 +26,6 @@ esphome: - dfplayer.volume_down - dfplayer.sleep -uart: - - id: uart_dfplayer - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - dfplayer: on_finished_playback: then: diff --git a/tests/components/dfplayer/test.esp32-c3-idf.yaml b/tests/components/dfplayer/test.esp32-c3-idf.yaml index c79d14c740..4b7c8351a7 100644 --- a/tests/components/dfplayer/test.esp32-c3-idf.yaml +++ b/tests/components/dfplayer/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/dfplayer/test.esp32-idf.yaml b/tests/components/dfplayer/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/dfplayer/test.esp32-idf.yaml +++ b/tests/components/dfplayer/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/dfplayer/test.esp8266-ard.yaml b/tests/components/dfplayer/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/dfplayer/test.esp8266-ard.yaml +++ b/tests/components/dfplayer/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dfplayer/test.rp2040-ard.yaml b/tests/components/dfplayer/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/dfplayer/test.rp2040-ard.yaml +++ b/tests/components/dfplayer/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/common.yaml b/tests/components/dfrobot_sen0395/common.yaml index 8c349911d3..7f980574ed 100644 --- a/tests/components/dfrobot_sen0395/common.yaml +++ b/tests/components/dfrobot_sen0395/common.yaml @@ -14,12 +14,6 @@ esphome: sensitivity: 6 - dfrobot_sen0395.reset -uart: - - id: uart_dfrobot_sen0395 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - dfrobot_sen0395: - id: mmwave diff --git a/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml b/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml index c79d14c740..4b7c8351a7 100644 --- a/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml +++ b/tests/components/dfrobot_sen0395/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO7 - rx_pin: GPIO8 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.esp32-idf.yaml b/tests/components/dfrobot_sen0395/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/dfrobot_sen0395/test.esp32-idf.yaml +++ b/tests/components/dfrobot_sen0395/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml b/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml +++ b/tests/components/dfrobot_sen0395/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml b/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml +++ b/tests/components/dfrobot_sen0395/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dht12/common.yaml b/tests/components/dht12/common.yaml index 91346e0e27..2602ae13cf 100644 --- a/tests/components/dht12/common.yaml +++ b/tests/components/dht12/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_dht12 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: dht12 + i2c_id: i2c_bus temperature: name: DHT12 Temperature humidity: diff --git a/tests/components/dht12/test.esp32-c3-idf.yaml b/tests/components/dht12/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/dht12/test.esp32-c3-idf.yaml +++ b/tests/components/dht12/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/dht12/test.esp32-idf.yaml b/tests/components/dht12/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/dht12/test.esp32-idf.yaml +++ b/tests/components/dht12/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/dht12/test.esp8266-ard.yaml b/tests/components/dht12/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/dht12/test.esp8266-ard.yaml +++ b/tests/components/dht12/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/dht12/test.rp2040-ard.yaml b/tests/components/dht12/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/dht12/test.rp2040-ard.yaml +++ b/tests/components/dht12/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/display/common.yaml b/tests/components/display/common.yaml index 4fc4fafa25..27abb23e03 100644 --- a/tests/components/display/common.yaml +++ b/tests/components/display/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 - display: - platform: ili9xxx id: main_lcd diff --git a/tests/components/dps310/common.yaml b/tests/components/dps310/common.yaml index e6c0c9fab8..847a79f2e6 100644 --- a/tests/components/dps310/common.yaml +++ b/tests/components/dps310/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_dps310 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: dps310 + i2c_id: i2c_bus temperature: name: DPS310 Temperature pressure: diff --git a/tests/components/dps310/test.esp32-c3-idf.yaml b/tests/components/dps310/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/dps310/test.esp32-c3-idf.yaml +++ b/tests/components/dps310/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/dps310/test.esp32-idf.yaml b/tests/components/dps310/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/dps310/test.esp32-idf.yaml +++ b/tests/components/dps310/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/dps310/test.esp8266-ard.yaml b/tests/components/dps310/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/dps310/test.esp8266-ard.yaml +++ b/tests/components/dps310/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/dps310/test.rp2040-ard.yaml b/tests/components/dps310/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/dps310/test.rp2040-ard.yaml +++ b/tests/components/dps310/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ds1307/common.yaml b/tests/components/ds1307/common.yaml index 3466a9eec8..cdd2b9cf56 100644 --- a/tests/components/ds1307/common.yaml +++ b/tests/components/ds1307/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ds1307 - scl: ${scl_pin} - sda: ${sda_pin} - time: - platform: ds1307 + i2c_id: i2c_bus id: ds1307_time update_interval: never diff --git a/tests/components/ds1307/test.esp32-c3-idf.yaml b/tests/components/ds1307/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ds1307/test.esp32-c3-idf.yaml +++ b/tests/components/ds1307/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ds1307/test.esp32-idf.yaml b/tests/components/ds1307/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ds1307/test.esp32-idf.yaml +++ b/tests/components/ds1307/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ds1307/test.esp8266-ard.yaml b/tests/components/ds1307/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ds1307/test.esp8266-ard.yaml +++ b/tests/components/ds1307/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ds1307/test.rp2040-ard.yaml b/tests/components/ds1307/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ds1307/test.rp2040-ard.yaml +++ b/tests/components/ds1307/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ds2484/common.yaml b/tests/components/ds2484/common.yaml index 9d2882a3c0..1e5dcd7dba 100644 --- a/tests/components/ds2484/common.yaml +++ b/tests/components/ds2484/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_ds2484 - scl: ${scl_pin} - sda: ${sda_pin} - one_wire: platform: ds2484 - i2c_id: i2c_ds2484 + i2c_id: i2c_bus address: 0x18 active_pullup: true strong_pullup: false diff --git a/tests/components/ds2484/test.esp32-c3-idf.yaml b/tests/components/ds2484/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ds2484/test.esp32-c3-idf.yaml +++ b/tests/components/ds2484/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ds2484/test.esp32-idf.yaml b/tests/components/ds2484/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ds2484/test.esp32-idf.yaml +++ b/tests/components/ds2484/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ds2484/test.esp8266-ard.yaml b/tests/components/ds2484/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ds2484/test.esp8266-ard.yaml +++ b/tests/components/ds2484/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ds2484/test.rp2040-ard.yaml b/tests/components/ds2484/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ds2484/test.rp2040-ard.yaml +++ b/tests/components/ds2484/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/dsmr/common.yaml b/tests/components/dsmr/common.yaml index 2901b811fe..038bf2806b 100644 --- a/tests/components/dsmr/common.yaml +++ b/tests/components/dsmr/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_dsmr - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - dsmr: decryption_key: 00112233445566778899aabbccddeeff max_telegram_length: 1000 diff --git a/tests/components/dsmr/test.esp32-ard.yaml b/tests/components/dsmr/test.esp32-ard.yaml index 7a65a48ec0..f218b297aa 100644 --- a/tests/components/dsmr/test.esp32-ard.yaml +++ b/tests/components/dsmr/test.esp32-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO12 - rx_pin: GPIO14 request_pin: GPIO15 +packages: + uart: !include ../../test_build_components/common/uart/esp32-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dsmr/test.esp8266-ard.yaml b/tests/components/dsmr/test.esp8266-ard.yaml index a47bd58806..08bcf16fc9 100644 --- a/tests/components/dsmr/test.esp8266-ard.yaml +++ b/tests/components/dsmr/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 request_pin: GPIO15 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/dsmr/test.rp2040-ard.yaml b/tests/components/dsmr/test.rp2040-ard.yaml index 72998506ac..8684cb76aa 100644 --- a/tests/components/dsmr/test.rp2040-ard.yaml +++ b/tests/components/dsmr/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 request_pin: GPIO6 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ee895/common.yaml b/tests/components/ee895/common.yaml index 63d77abcaf..f1b17ca9d9 100644 --- a/tests/components/ee895/common.yaml +++ b/tests/components/ee895/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ee895 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ee895 + i2c_id: i2c_bus address: 0x5F co2: name: EE895 CO2 diff --git a/tests/components/ee895/test.esp32-c3-idf.yaml b/tests/components/ee895/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ee895/test.esp32-c3-idf.yaml +++ b/tests/components/ee895/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ee895/test.esp32-idf.yaml b/tests/components/ee895/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ee895/test.esp32-idf.yaml +++ b/tests/components/ee895/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ee895/test.esp8266-ard.yaml b/tests/components/ee895/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ee895/test.esp8266-ard.yaml +++ b/tests/components/ee895/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ee895/test.rp2040-ard.yaml b/tests/components/ee895/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ee895/test.rp2040-ard.yaml +++ b/tests/components/ee895/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ektf2232/common.yaml b/tests/components/ektf2232/common.yaml index 91f09b4710..8ab57be46f 100644 --- a/tests/components/ektf2232/common.yaml +++ b/tests/components/ektf2232/common.yaml @@ -1,20 +1,18 @@ -i2c: - - id: i2c_ektf2232 - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c + i2c_id: i2c_bus id: ssd1306_display model: SSD1306_128X64 reset_pin: ${display_reset_pin} pages: - - id: page1 + - id: ektf2232_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: ektf2232 + i2c_id: i2c_bus + id: ektf2232_touchscreen interrupt_pin: ${interrupt_pin} reset_pin: ${touch_reset_pin} display: ssd1306_display diff --git a/tests/components/ektf2232/test.esp32-c3-idf.yaml b/tests/components/ektf2232/test.esp32-c3-idf.yaml index 4d793a3242..708d352a59 100644 --- a/tests/components/ektf2232/test.esp32-c3-idf.yaml +++ b/tests/components/ektf2232/test.esp32-c3-idf.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 display_reset_pin: GPIO3 interrupt_pin: GPIO6 touch_reset_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ektf2232/test.esp32-idf.yaml b/tests/components/ektf2232/test.esp32-idf.yaml index 7d3f2ca7a2..3fab081bed 100644 --- a/tests/components/ektf2232/test.esp32-idf.yaml +++ b/tests/components/ektf2232/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 display_reset_pin: GPIO13 interrupt_pin: GPIO14 touch_reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ektf2232/test.esp8266-ard.yaml b/tests/components/ektf2232/test.esp8266-ard.yaml index a87e9dfd45..38a3894deb 100644 --- a/tests/components/ektf2232/test.esp8266-ard.yaml +++ b/tests/components/ektf2232/test.esp8266-ard.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 display_reset_pin: GPIO3 - interrupt_pin: GPIO12 - touch_reset_pin: GPIO13 + interrupt_pin: GPIO15 + touch_reset_pin: GPIO16 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ektf2232/test.rp2040-ard.yaml b/tests/components/ektf2232/test.rp2040-ard.yaml index 4d793a3242..cda1b67715 100644 --- a/tests/components/ektf2232/test.rp2040-ard.yaml +++ b/tests/components/ektf2232/test.rp2040-ard.yaml @@ -1,8 +1,9 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 display_reset_pin: GPIO3 interrupt_pin: GPIO6 touch_reset_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/emc2101/common.yaml b/tests/components/emc2101/common.yaml index 795b02c6d3..d9e6fe2b96 100644 --- a/tests/components/emc2101/common.yaml +++ b/tests/components/emc2101/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_emc2101 - scl: ${scl_pin} - sda: ${sda_pin} - emc2101: + i2c_id: i2c_bus pwm: resolution: 8 diff --git a/tests/components/emc2101/test.esp32-c3-idf.yaml b/tests/components/emc2101/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/emc2101/test.esp32-c3-idf.yaml +++ b/tests/components/emc2101/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/emc2101/test.esp32-idf.yaml b/tests/components/emc2101/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/emc2101/test.esp32-idf.yaml +++ b/tests/components/emc2101/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/emc2101/test.esp8266-ard.yaml b/tests/components/emc2101/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/emc2101/test.esp8266-ard.yaml +++ b/tests/components/emc2101/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/emc2101/test.rp2040-ard.yaml b/tests/components/emc2101/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/emc2101/test.rp2040-ard.yaml +++ b/tests/components/emc2101/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/emmeti/test.esp8266-ard.yaml b/tests/components/emmeti/test.esp8266-ard.yaml index 2fb00aea61..1c9baa4ea3 100644 --- a/tests/components/emmeti/test.esp8266-ard.yaml +++ b/tests/components/emmeti/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - remote_transmitter_pin: GPIO4 - remote_receiver_pin: GPIO5 + remote_transmitter_pin: GPIO0 + remote_receiver_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/ens160_i2c/common.yaml b/tests/components/ens160_i2c/common.yaml index 39a5b35067..685c8d3fee 100644 --- a/tests/components/ens160_i2c/common.yaml +++ b/tests/components/ens160_i2c/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_ens160 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ens160_i2c - i2c_id: i2c_ens160 + i2c_id: i2c_bus address: 0x53 eco2: name: "ENS160 eCO2" diff --git a/tests/components/ens160_i2c/test.esp32-c3-idf.yaml b/tests/components/ens160_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ens160_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ens160_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ens160_i2c/test.esp32-idf.yaml b/tests/components/ens160_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ens160_i2c/test.esp32-idf.yaml +++ b/tests/components/ens160_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ens160_i2c/test.esp8266-ard.yaml b/tests/components/ens160_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ens160_i2c/test.esp8266-ard.yaml +++ b/tests/components/ens160_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ens160_i2c/test.rp2040-ard.yaml b/tests/components/ens160_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ens160_i2c/test.rp2040-ard.yaml +++ b/tests/components/ens160_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ens160_spi/common.yaml b/tests/components/ens160_spi/common.yaml index c8b663272f..53000a5e96 100644 --- a/tests/components/ens160_spi/common.yaml +++ b/tests/components/ens160_spi/common.yaml @@ -1,12 +1,5 @@ -spi: - - id: spi_ens160 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: ens160_spi - spi_id: spi_ens160 cs_pin: ${cs_pin} eco2: name: "ENS160 eCO2" diff --git a/tests/components/ens160_spi/test.esp32-c3-idf.yaml b/tests/components/ens160_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/ens160_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ens160_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ens160_spi/test.esp32-idf.yaml b/tests/components/ens160_spi/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/ens160_spi/test.esp32-idf.yaml +++ b/tests/components/ens160_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ens160_spi/test.esp8266-ard.yaml b/tests/components/ens160_spi/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/ens160_spi/test.esp8266-ard.yaml +++ b/tests/components/ens160_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ens160_spi/test.rp2040-ard.yaml b/tests/components/ens160_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/ens160_spi/test.rp2040-ard.yaml +++ b/tests/components/ens160_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ens210/common.yaml b/tests/components/ens210/common.yaml index b276154449..6bc8f824cc 100644 --- a/tests/components/ens210/common.yaml +++ b/tests/components/ens210/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ens210 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ens210 + i2c_id: i2c_bus temperature: name: ENS210 Temperature humidity: diff --git a/tests/components/ens210/test.esp32-c3-idf.yaml b/tests/components/ens210/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ens210/test.esp32-c3-idf.yaml +++ b/tests/components/ens210/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ens210/test.esp32-idf.yaml b/tests/components/ens210/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ens210/test.esp32-idf.yaml +++ b/tests/components/ens210/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ens210/test.esp8266-ard.yaml b/tests/components/ens210/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ens210/test.esp8266-ard.yaml +++ b/tests/components/ens210/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ens210/test.rp2040-ard.yaml b/tests/components/ens210/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ens210/test.rp2040-ard.yaml +++ b/tests/components/ens210/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/epaper_spi/test.esp32-s3-idf.yaml b/tests/components/epaper_spi/test.esp32-s3-idf.yaml index 3d8d62a7ca..34aefb82b4 100644 --- a/tests/components/epaper_spi/test.esp32-s3-idf.yaml +++ b/tests/components/epaper_spi/test.esp32-s3-idf.yaml @@ -1,9 +1,9 @@ -spi: - clk_pin: GPIO7 - mosi_pin: GPIO9 +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml display: - platform: epaper_spi + spi_id: spi_bus model: 7.3in-spectra-e6 cs_pin: GPIO5 dc_pin: GPIO17 diff --git a/tests/components/es7210/common.yaml b/tests/components/es7210/common.yaml index 3fab177cb3..b9f0b0c3e9 100644 --- a/tests/components/es7210/common.yaml +++ b/tests/components/es7210/common.yaml @@ -4,13 +4,9 @@ esphome: - audio_adc.set_mic_gain: 0db - audio_adc.set_mic_gain: !lambda 'return 4;' -i2c: - - id: i2c_aic3204 - scl: ${scl_pin} - sda: ${sda_pin} - audio_adc: - platform: es7210 + i2c_id: i2c_bus id: es7210_adc bits_per_sample: 16bit sample_rate: 16000 diff --git a/tests/components/es7210/test.esp32-c3-idf.yaml b/tests/components/es7210/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/es7210/test.esp32-c3-idf.yaml +++ b/tests/components/es7210/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/es7210/test.esp32-idf.yaml b/tests/components/es7210/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/es7210/test.esp32-idf.yaml +++ b/tests/components/es7210/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/es7243e/common.yaml b/tests/components/es7243e/common.yaml index 3de76909e9..0fcfb97273 100644 --- a/tests/components/es7243e/common.yaml +++ b/tests/components/es7243e/common.yaml @@ -4,11 +4,7 @@ esphome: - audio_adc.set_mic_gain: 0db - audio_adc.set_mic_gain: !lambda 'return 4;' -i2c: - - id: i2c_es7243e - scl: ${scl_pin} - sda: ${sda_pin} - audio_adc: - platform: es7243e + i2c_id: i2c_bus id: es7243e_adc diff --git a/tests/components/es7243e/test.esp32-c3-idf.yaml b/tests/components/es7243e/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/es7243e/test.esp32-c3-idf.yaml +++ b/tests/components/es7243e/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/es7243e/test.esp32-idf.yaml b/tests/components/es7243e/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/es7243e/test.esp32-idf.yaml +++ b/tests/components/es7243e/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8156/common.yaml b/tests/components/es8156/common.yaml index addaa0b70a..c41a332bd7 100644 --- a/tests/components/es8156/common.yaml +++ b/tests/components/es8156/common.yaml @@ -6,10 +6,6 @@ esphome: - audio_dac.set_volume: volume: 50% -i2c: - - id: i2c_es8156 - scl: ${scl_pin} - sda: ${sda_pin} - audio_dac: - platform: es8156 + i2c_id: i2c_bus diff --git a/tests/components/es8156/test.esp32-c3-idf.yaml b/tests/components/es8156/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/es8156/test.esp32-c3-idf.yaml +++ b/tests/components/es8156/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8156/test.esp32-idf.yaml b/tests/components/es8156/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/es8156/test.esp32-idf.yaml +++ b/tests/components/es8156/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8156/test.esp8266-ard.yaml b/tests/components/es8156/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/es8156/test.esp8266-ard.yaml +++ b/tests/components/es8156/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/es8311/common.yaml b/tests/components/es8311/common.yaml index d833d1c043..e855761ef4 100644 --- a/tests/components/es8311/common.yaml +++ b/tests/components/es8311/common.yaml @@ -6,10 +6,6 @@ esphome: - audio_dac.set_volume: volume: 50% -i2c: - - id: i2c_aic3204 - scl: ${scl_pin} - sda: ${sda_pin} - audio_dac: - platform: es8311 + i2c_id: i2c_bus diff --git a/tests/components/es8311/test.esp32-c3-idf.yaml b/tests/components/es8311/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/es8311/test.esp32-c3-idf.yaml +++ b/tests/components/es8311/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8311/test.esp32-idf.yaml b/tests/components/es8311/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/es8311/test.esp32-idf.yaml +++ b/tests/components/es8311/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8311/test.esp8266-ard.yaml b/tests/components/es8311/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/es8311/test.esp8266-ard.yaml +++ b/tests/components/es8311/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/es8388/common.yaml b/tests/components/es8388/common.yaml index 6a63de5aa1..cc7465ab93 100644 --- a/tests/components/es8388/common.yaml +++ b/tests/components/es8388/common.yaml @@ -7,13 +7,9 @@ esphome: - audio_dac.set_volume: volume: 50% -i2c: - - id: i2c_es8388 - scl: ${scl_pin} - sda: ${sda_pin} - audio_dac: - platform: es8388 + i2c_id: i2c_bus id: es8388_parent select: diff --git a/tests/components/es8388/test.esp32-c3-idf.yaml b/tests/components/es8388/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/es8388/test.esp32-c3-idf.yaml +++ b/tests/components/es8388/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8388/test.esp32-idf.yaml b/tests/components/es8388/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/es8388/test.esp32-idf.yaml +++ b/tests/components/es8388/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/es8388/test.esp8266-ard.yaml b/tests/components/es8388/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/es8388/test.esp8266-ard.yaml +++ b/tests/components/es8388/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml b/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble_client/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/esp32_ble_client/test.esp32-idf.yaml b/tests/components/esp32_ble_client/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/esp32_ble_client/test.esp32-idf.yaml +++ b/tests/components/esp32_ble_client/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml b/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml index b71896bad5..ea6f0d4022 100644 --- a/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_ble_tracker/test.esp32-c3-idf.yaml @@ -1,3 +1,6 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml esp32_ble_tracker: diff --git a/tests/components/esp32_ble_tracker/test.esp32-idf.yaml b/tests/components/esp32_ble_tracker/test.esp32-idf.yaml index 1ffcfb9988..8f6e3c5731 100644 --- a/tests/components/esp32_ble_tracker/test.esp32-idf.yaml +++ b/tests/components/esp32_ble_tracker/test.esp32-idf.yaml @@ -1,3 +1,6 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml esp32_ble_tracker: diff --git a/tests/components/esp32_camera/common.yaml b/tests/components/esp32_camera/common.yaml index 64f75c699a..eac5109bc8 100644 --- a/tests/components/esp32_camera/common.yaml +++ b/tests/components/esp32_camera/common.yaml @@ -1,29 +1 @@ -esp32_camera: - name: ESP32 Camera - data_pins: - - number: 17 - - number: 35 - - number: 34 - - number: 5 - - number: 39 - - number: 18 - - number: 36 - - number: 19 - vsync_pin: 22 - href_pin: 26 - pixel_clock_pin: 21 - external_clock: - pin: 27 - frequency: 20MHz - i2c_pins: - sda: 25 - scl: 23 - reset_pin: 15 - power_down_pin: 1 - resolution: 640x480 - jpeg_quality: 10 - frame_buffer_location: PSRAM - on_image: - then: - - lambda: |- - ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); +# ESP32 camera hardware configuration comes from the camera package diff --git a/tests/components/esp32_camera/test.esp32-idf.yaml b/tests/components/esp32_camera/test.esp32-idf.yaml index dade44d145..3d93dd6418 100644 --- a/tests/components/esp32_camera/test.esp32-idf.yaml +++ b/tests/components/esp32_camera/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + camera: !include ../../test_build_components/common/camera/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/esp32_camera_web_server/common.yaml b/tests/components/esp32_camera_web_server/common.yaml index fe2a6a2739..2a1858f681 100644 --- a/tests/components/esp32_camera_web_server/common.yaml +++ b/tests/components/esp32_camera_web_server/common.yaml @@ -1,32 +1,3 @@ -esp32_camera: - name: ESP32 Camera - data_pins: - - number: 17 - - number: 35 - - number: 34 - - number: 5 - - number: 39 - - number: 18 - - number: 36 - - number: 19 - vsync_pin: 22 - href_pin: 26 - pixel_clock_pin: 21 - external_clock: - pin: 27 - frequency: 20MHz - i2c_pins: - sda: 25 - scl: 23 - reset_pin: 15 - power_down_pin: 1 - resolution: 640x480 - jpeg_quality: 10 - on_image: - then: - - lambda: |- - ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); - esp32_camera_web_server: - port: 8080 mode: stream diff --git a/tests/components/esp32_camera_web_server/test.esp32-idf.yaml b/tests/components/esp32_camera_web_server/test.esp32-idf.yaml index dade44d145..3d93dd6418 100644 --- a/tests/components/esp32_camera_web_server/test.esp32-idf.yaml +++ b/tests/components/esp32_camera_web_server/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + camera: !include ../../test_build_components/common/camera/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/esp32_can/test.esp32-c3-idf.yaml b/tests/components/esp32_can/test.esp32-c3-idf.yaml index c79d14c740..22effb1bd0 100644 --- a/tests/components/esp32_can/test.esp32-c3-idf.yaml +++ b/tests/components/esp32_can/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: tx_pin: GPIO7 - rx_pin: GPIO8 + rx_pin: GPIO9 <<: !include common.yaml diff --git a/tests/components/esp32_rmt_led_strip/test.esp32-s3-idf.yaml b/tests/components/esp32_rmt_led_strip/test.esp32-s3-idf.yaml index ad273903b2..6bf0639a52 100644 --- a/tests/components/esp32_rmt_led_strip/test.esp32-s3-idf.yaml +++ b/tests/components/esp32_rmt_led_strip/test.esp32-s3-idf.yaml @@ -2,11 +2,22 @@ substitutions: pin1: GPIO3 pin2: GPIO4 -packages: - common: !include common.yaml - +# WARNING: Using !extend or !remove prevents automatic component grouping in CI, making builds slower. light: - - id: !extend led_strip1 + - platform: esp32_rmt_led_strip + id: led_strip1 + pin: ${pin1} + num_leds: 60 + rgb_order: GRB + chipset: ws2812 use_dma: "true" - - id: !extend led_strip2 + - platform: esp32_rmt_led_strip + id: led_strip2 + pin: ${pin2} + num_leds: 60 + rgb_order: RGB + bit0_high: 100us + bit0_low: 100us + bit1_high: 100us + bit1_low: 100us use_dma: "false" diff --git a/tests/components/espnow/test.esp32-idf.yaml b/tests/components/espnow/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/espnow/test.esp32-idf.yaml +++ b/tests/components/espnow/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ethernet_info/test.esp32-idf.yaml b/tests/components/ethernet_info/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/ethernet_info/test.esp32-idf.yaml +++ b/tests/components/ethernet_info/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/exposure_notifications/test.esp32-c3-idf.yaml b/tests/components/exposure_notifications/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/exposure_notifications/test.esp32-c3-idf.yaml +++ b/tests/components/exposure_notifications/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/exposure_notifications/test.esp32-idf.yaml b/tests/components/exposure_notifications/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/exposure_notifications/test.esp32-idf.yaml +++ b/tests/components/exposure_notifications/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ezo/common.yaml b/tests/components/ezo/common.yaml index edeebd1a12..79afbb8aa6 100644 --- a/tests/components/ezo/common.yaml +++ b/tests/components/ezo/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ezo - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ezo + i2c_id: i2c_bus id: ph_ezo address: 99 unit_of_measurement: pH diff --git a/tests/components/ezo/test.esp32-c3-idf.yaml b/tests/components/ezo/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ezo/test.esp32-c3-idf.yaml +++ b/tests/components/ezo/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ezo/test.esp32-idf.yaml b/tests/components/ezo/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ezo/test.esp32-idf.yaml +++ b/tests/components/ezo/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ezo/test.esp8266-ard.yaml b/tests/components/ezo/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ezo/test.esp8266-ard.yaml +++ b/tests/components/ezo/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ezo/test.rp2040-ard.yaml b/tests/components/ezo/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ezo/test.rp2040-ard.yaml +++ b/tests/components/ezo/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ezo_pmp/common.yaml b/tests/components/ezo_pmp/common.yaml index 00919797be..bd2fd9193c 100644 --- a/tests/components/ezo_pmp/common.yaml +++ b/tests/components/ezo_pmp/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ezo_pmp - scl: ${scl_pin} - sda: ${sda_pin} - ezo_pmp: + i2c_id: i2c_bus id: hcl_pump update_interval: 1s diff --git a/tests/components/ezo_pmp/test.esp32-c3-idf.yaml b/tests/components/ezo_pmp/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ezo_pmp/test.esp32-c3-idf.yaml +++ b/tests/components/ezo_pmp/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ezo_pmp/test.esp32-idf.yaml b/tests/components/ezo_pmp/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ezo_pmp/test.esp32-idf.yaml +++ b/tests/components/ezo_pmp/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ezo_pmp/test.esp8266-ard.yaml b/tests/components/ezo_pmp/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ezo_pmp/test.esp8266-ard.yaml +++ b/tests/components/ezo_pmp/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ezo_pmp/test.rp2040-ard.yaml b/tests/components/ezo_pmp/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ezo_pmp/test.rp2040-ard.yaml +++ b/tests/components/ezo_pmp/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/fingerprint_grow/common.yaml b/tests/components/fingerprint_grow/common.yaml index e759ea5a02..2d2fc61437 100644 --- a/tests/components/fingerprint_grow/common.yaml +++ b/tests/components/fingerprint_grow/common.yaml @@ -9,12 +9,6 @@ esphome: finger_id: 2 - fingerprint_grow.delete_all: -uart: - - id: uart_fingerprint_grow - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 57600 - fingerprint_grow: sensing_pin: ${sensing_pin} password: 0x12FE37DC diff --git a/tests/components/fingerprint_grow/test.esp32-c3-idf.yaml b/tests/components/fingerprint_grow/test.esp32-c3-idf.yaml index faab50e152..dff4f7fd92 100644 --- a/tests/components/fingerprint_grow/test.esp32-c3-idf.yaml +++ b/tests/components/fingerprint_grow/test.esp32-c3-idf.yaml @@ -1,6 +1,6 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 sensing_pin: GPIO6 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/fingerprint_grow/test.esp32-idf.yaml b/tests/components/fingerprint_grow/test.esp32-idf.yaml index 4aef3d8be6..7149f07d16 100644 --- a/tests/components/fingerprint_grow/test.esp32-idf.yaml +++ b/tests/components/fingerprint_grow/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO14 sensing_pin: GPIO15 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/fingerprint_grow/test.esp8266-ard.yaml b/tests/components/fingerprint_grow/test.esp8266-ard.yaml index f2a864596a..204fdf0302 100644 --- a/tests/components/fingerprint_grow/test.esp8266-ard.yaml +++ b/tests/components/fingerprint_grow/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 sensing_pin: GPIO15 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/fingerprint_grow/test.rp2040-ard.yaml b/tests/components/fingerprint_grow/test.rp2040-ard.yaml index faab50e152..80ea1d22ca 100644 --- a/tests/components/fingerprint_grow/test.rp2040-ard.yaml +++ b/tests/components/fingerprint_grow/test.rp2040-ard.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO5 sensing_pin: GPIO6 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/font/common.yaml b/tests/components/font/common.yaml index fb50fc3336..2d2e970536 100644 --- a/tests/components/font/common.yaml +++ b/tests/components/font/common.yaml @@ -47,10 +47,6 @@ font: id: bdf_font size: 7 -i2c: - scl: ${i2c_scl} - sda: ${i2c_sda} - display: - platform: ssd1306_i2c id: ssd1306_display diff --git a/tests/components/font/test.esp32-c3-idf.yaml b/tests/components/font/test.esp32-c3-idf.yaml index ad14a2e9a6..2090db7e6d 100644 --- a/tests/components/font/test.esp32-c3-idf.yaml +++ b/tests/components/font/test.esp32-c3-idf.yaml @@ -1,7 +1,7 @@ substitutions: - i2c_scl: GPIO5 - i2c_sda: GPIO4 display_reset_pin: GPIO3 packages: - common: !include common.yaml + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + +<<: !include common.yaml diff --git a/tests/components/font/test.esp32-idf.yaml b/tests/components/font/test.esp32-idf.yaml index d98600a51b..a6a94a39da 100644 --- a/tests/components/font/test.esp32-idf.yaml +++ b/tests/components/font/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - i2c_scl: GPIO16 - i2c_sda: GPIO17 display_reset_pin: GPIO13 packages: - common: !include common.yaml + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + +<<: !include common.yaml diff --git a/tests/components/font/test.esp8266-ard.yaml b/tests/components/font/test.esp8266-ard.yaml index ad14a2e9a6..173f7dfaa5 100644 --- a/tests/components/font/test.esp8266-ard.yaml +++ b/tests/components/font/test.esp8266-ard.yaml @@ -1,7 +1,7 @@ substitutions: - i2c_scl: GPIO5 - i2c_sda: GPIO4 display_reset_pin: GPIO3 packages: - common: !include common.yaml + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + +<<: !include common.yaml diff --git a/tests/components/font/test.rp2040-ard.yaml b/tests/components/font/test.rp2040-ard.yaml index ad14a2e9a6..aeecf352b4 100644 --- a/tests/components/font/test.rp2040-ard.yaml +++ b/tests/components/font/test.rp2040-ard.yaml @@ -1,7 +1,7 @@ substitutions: - i2c_scl: GPIO5 - i2c_sda: GPIO4 display_reset_pin: GPIO3 packages: - common: !include common.yaml + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + +<<: !include common.yaml diff --git a/tests/components/fs3000/common.yaml b/tests/components/fs3000/common.yaml index e87ac28aa9..e8ec4d0773 100644 --- a/tests/components/fs3000/common.yaml +++ b/tests/components/fs3000/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_fs3000 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: fs3000 + i2c_id: i2c_bus name: Air Velocity model: 1005 update_interval: 60s diff --git a/tests/components/fs3000/test.esp32-c3-idf.yaml b/tests/components/fs3000/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/fs3000/test.esp32-c3-idf.yaml +++ b/tests/components/fs3000/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/fs3000/test.esp32-idf.yaml b/tests/components/fs3000/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/fs3000/test.esp32-idf.yaml +++ b/tests/components/fs3000/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/fs3000/test.esp8266-ard.yaml b/tests/components/fs3000/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/fs3000/test.esp8266-ard.yaml +++ b/tests/components/fs3000/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/fs3000/test.rp2040-ard.yaml b/tests/components/fs3000/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/fs3000/test.rp2040-ard.yaml +++ b/tests/components/fs3000/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ft5x06/common.yaml b/tests/components/ft5x06/common.yaml index 322ee88b6d..b1f7ca4cc9 100644 --- a/tests/components/ft5x06/common.yaml +++ b/tests/components/ft5x06/common.yaml @@ -1,20 +1,19 @@ -i2c: - - id: i2c_ft5x06 - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c - id: ssd1306_display + i2c_id: i2c_bus + id: ft5x06_display model: SSD1306_128X64 reset_pin: ${reset_pin} pages: - - id: page1 + - id: ft5x06_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: ft5x06 + i2c_id: i2c_bus + display: ft5x06_display + id: ft5x06_touchscreen on_touch: - logger.log: format: Touch at (%d, %d) diff --git a/tests/components/ft5x06/test.esp32-c3-idf.yaml b/tests/components/ft5x06/test.esp32-c3-idf.yaml index 1e6670c196..c97f30d52c 100644 --- a/tests/components/ft5x06/test.esp32-c3-idf.yaml +++ b/tests/components/ft5x06/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ft5x06/test.esp32-idf.yaml b/tests/components/ft5x06/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/ft5x06/test.esp32-idf.yaml +++ b/tests/components/ft5x06/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ft5x06/test.esp8266-ard.yaml b/tests/components/ft5x06/test.esp8266-ard.yaml index dfdc12a3d1..b8bb94edde 100644 --- a/tests/components/ft5x06/test.esp8266-ard.yaml +++ b/tests/components/ft5x06/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ft5x06/test.rp2040-ard.yaml b/tests/components/ft5x06/test.rp2040-ard.yaml index 1e6670c196..1bf10642c5 100644 --- a/tests/components/ft5x06/test.rp2040-ard.yaml +++ b/tests/components/ft5x06/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ft63x6/common.yaml b/tests/components/ft63x6/common.yaml index 1fae6da5f4..ea5a60a2f6 100644 --- a/tests/components/ft63x6/common.yaml +++ b/tests/components/ft63x6/common.yaml @@ -1,25 +1,19 @@ -spi: - - id: spi_ft63x6 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - -i2c: - - id: i2c_ft63x6 - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c - id: ssd1306_display + i2c_id: i2c_bus + id: ft63x6_display model: SSD1306_128X64 reset_pin: ${reset_pin} pages: - - id: page1 + - id: ft63x6_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: ft63x6 + i2c_id: i2c_bus + display: ft63x6_display + id: ft63x6_touchscreen interrupt_pin: ${interrupt_pin} transform: swap_xy: true @@ -42,6 +36,7 @@ touchscreen: binary_sensor: - platform: touchscreen + touchscreen_id: ft63x6_touchscreen name: Bottom Left Touch use_raw: true x_min: 0 diff --git a/tests/components/ft63x6/test.esp32-c3-idf.yaml b/tests/components/ft63x6/test.esp32-c3-idf.yaml index 397ac1e464..febf38d8e1 100644 --- a/tests/components/ft63x6/test.esp32-c3-idf.yaml +++ b/tests/components/ft63x6/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - scl_pin: GPIO0 - sda_pin: GPIO1 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ft63x6/test.esp32-idf.yaml b/tests/components/ft63x6/test.esp32-idf.yaml index 47b5796e8b..590f6a919c 100644 --- a/tests/components/ft63x6/test.esp32-idf.yaml +++ b/tests/components/ft63x6/test.esp32-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO0 - mosi_pin: GPIO2 - scl_pin: GPIO13 - sda_pin: GPIO14 interrupt_pin: GPIO15 - reset_pin: GPIO16 + reset_pin: GPIO4 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ft63x6/test.esp8266-ard.yaml b/tests/components/ft63x6/test.esp8266-ard.yaml index a4223733af..d6b6903029 100644 --- a/tests/components/ft63x6/test.esp8266-ard.yaml +++ b/tests/components/ft63x6/test.esp8266-ard.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - scl_pin: GPIO5 - sda_pin: GPIO4 interrupt_pin: GPIO12 reset_pin: GPIO16 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ft63x6/test.rp2040-ard.yaml b/tests/components/ft63x6/test.rp2040-ard.yaml index 397ac1e464..2dd70ff33a 100644 --- a/tests/components/ft63x6/test.rp2040-ard.yaml +++ b/tests/components/ft63x6/test.rp2040-ard.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - scl_pin: GPIO0 - sda_pin: GPIO1 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/gcja5/common.yaml b/tests/components/gcja5/common.yaml index 8f6250045d..64374c0e50 100644 --- a/tests/components/gcja5/common.yaml +++ b/tests/components/gcja5/common.yaml @@ -1,12 +1,6 @@ -uart: - - id: uart_gcja5 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - parity: EVEN - sensor: - platform: gcja5 + uart_id: uart_bus pm_1_0: name: "Particulate Matter <1.0µm Concentration" pm_2_5: diff --git a/tests/components/gcja5/test.esp32-c3-idf.yaml b/tests/components/gcja5/test.esp32-c3-idf.yaml index b516342f3b..236529042f 100644 --- a/tests/components/gcja5/test.esp32-c3-idf.yaml +++ b/tests/components/gcja5/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_9600_even: !include ../../test_build_components/common/uart_9600_even/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/gcja5/test.esp32-idf.yaml b/tests/components/gcja5/test.esp32-idf.yaml index 811f6b72a6..5ce1861902 100644 --- a/tests/components/gcja5/test.esp32-idf.yaml +++ b/tests/components/gcja5/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO12 - rx_pin: GPIO14 +packages: + uart_9600_even: !include ../../test_build_components/common/uart_9600_even/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/gcja5/test.esp8266-ard.yaml b/tests/components/gcja5/test.esp8266-ard.yaml index b516342f3b..a3f8cf43d4 100644 --- a/tests/components/gcja5/test.esp8266-ard.yaml +++ b/tests/components/gcja5/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_9600_even: !include ../../test_build_components/common/uart_9600_even/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/gcja5/test.rp2040-ard.yaml b/tests/components/gcja5/test.rp2040-ard.yaml index b516342f3b..7c1f4f41e2 100644 --- a/tests/components/gcja5/test.rp2040-ard.yaml +++ b/tests/components/gcja5/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_9600_even: !include ../../test_build_components/common/uart_9600_even/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/gdk101/common.yaml b/tests/components/gdk101/common.yaml index 7805ad43f0..4eb5586ade 100644 --- a/tests/components/gdk101/common.yaml +++ b/tests/components/gdk101/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_gdk101 - scl: ${scl_pin} - sda: ${sda_pin} - gdk101: + i2c_id: i2c_bus id: my_gdk101 sensor: diff --git a/tests/components/gdk101/test.esp32-idf.yaml b/tests/components/gdk101/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/gdk101/test.esp32-idf.yaml +++ b/tests/components/gdk101/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/gdk101/test.esp8266-ard.yaml b/tests/components/gdk101/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/gdk101/test.esp8266-ard.yaml +++ b/tests/components/gdk101/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/gdk101/test.rp2040-ard.yaml b/tests/components/gdk101/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/gdk101/test.rp2040-ard.yaml +++ b/tests/components/gdk101/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/gl_r01_i2c/common.yaml b/tests/components/gl_r01_i2c/common.yaml index fe0705bdc6..272a94d349 100644 --- a/tests/components/gl_r01_i2c/common.yaml +++ b/tests/components/gl_r01_i2c/common.yaml @@ -1,12 +1,7 @@ -i2c: - - id: i2c_gl_r01_i2c - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: gl_r01_i2c + i2c_id: i2c_bus id: tof name: "ToF sensor" - i2c_id: i2c_gl_r01_i2c address: 0x74 update_interval: 15s diff --git a/tests/components/gl_r01_i2c/test.esp32-c3-idf.yaml b/tests/components/gl_r01_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/gl_r01_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/gl_r01_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/gl_r01_i2c/test.esp32-idf.yaml b/tests/components/gl_r01_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/gl_r01_i2c/test.esp32-idf.yaml +++ b/tests/components/gl_r01_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/gl_r01_i2c/test.esp8266-ard.yaml b/tests/components/gl_r01_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/gl_r01_i2c/test.esp8266-ard.yaml +++ b/tests/components/gl_r01_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/gl_r01_i2c/test.rp2040-ard.yaml b/tests/components/gl_r01_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/gl_r01_i2c/test.rp2040-ard.yaml +++ b/tests/components/gl_r01_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/gp2y1010au0f/test.esp8266-ard.yaml b/tests/components/gp2y1010au0f/test.esp8266-ard.yaml index a61053426a..c6a7c7bf13 100644 --- a/tests/components/gp2y1010au0f/test.esp8266-ard.yaml +++ b/tests/components/gp2y1010au0f/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: adc_pin: A0 - output_pin: GPIO5 + output_pin: GPIO0 <<: !include common.yaml diff --git a/tests/components/gp8403/common.yaml b/tests/components/gp8403/common.yaml index 7074185273..b04fbc4fbc 100644 --- a/tests/components/gp8403/common.yaml +++ b/tests/components/gp8403/common.yaml @@ -1,12 +1,9 @@ -i2c: - - id: i2c_gp8403 - scl: ${scl_pin} - sda: ${sda_pin} - gp8403: - id: gp8403_5v + i2c_id: i2c_bus voltage: 5V - id: gp8403_10v + i2c_id: i2c_bus voltage: 10V output: diff --git a/tests/components/gp8403/test.esp32-c3-idf.yaml b/tests/components/gp8403/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/gp8403/test.esp32-c3-idf.yaml +++ b/tests/components/gp8403/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/gp8403/test.esp32-idf.yaml b/tests/components/gp8403/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/gp8403/test.esp32-idf.yaml +++ b/tests/components/gp8403/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/gp8403/test.esp8266-ard.yaml b/tests/components/gp8403/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/gp8403/test.esp8266-ard.yaml +++ b/tests/components/gp8403/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/gp8403/test.rp2040-ard.yaml b/tests/components/gp8403/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/gp8403/test.rp2040-ard.yaml +++ b/tests/components/gp8403/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/gpio/test.esp8266-ard.yaml b/tests/components/gpio/test.esp8266-ard.yaml index 09f41abb79..e1660ec47c 100644 --- a/tests/components/gpio/test.esp8266-ard.yaml +++ b/tests/components/gpio/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - binary_sensor_pin: GPIO12 - output_pin: GPIO13 - switch_pin: GPIO14 + binary_sensor_pin: GPIO0 + output_pin: GPIO2 + switch_pin: GPIO15 <<: !include common.yaml diff --git a/tests/components/gps/common.yaml b/tests/components/gps/common.yaml index 53dc67e457..a99e3ef7e0 100644 --- a/tests/components/gps/common.yaml +++ b/tests/components/gps/common.yaml @@ -1,10 +1,3 @@ -uart: - - id: uart_gps - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - parity: EVEN - gps: latitude: name: "Latitude" diff --git a/tests/components/gps/test.esp32-c3-idf.yaml b/tests/components/gps/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/gps/test.esp32-c3-idf.yaml +++ b/tests/components/gps/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/gps/test.esp32-idf.yaml b/tests/components/gps/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/gps/test.esp32-idf.yaml +++ b/tests/components/gps/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/gps/test.esp8266-ard.yaml b/tests/components/gps/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/gps/test.esp8266-ard.yaml +++ b/tests/components/gps/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/gps/test.rp2040-ard.yaml b/tests/components/gps/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/gps/test.rp2040-ard.yaml +++ b/tests/components/gps/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/graph/common.yaml b/tests/components/graph/common.yaml index d2a6a9422d..578de5a60c 100644 --- a/tests/components/graph/common.yaml +++ b/tests/components/graph/common.yaml @@ -1,8 +1,3 @@ -i2c: - - id: i2c_graph - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: template id: some_sensor @@ -20,6 +15,6 @@ display: model: SSD1306_128X64 reset_pin: ${reset_pin} pages: - - id: page1 + - id: graph_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); diff --git a/tests/components/graph/test.esp32-c3-idf.yaml b/tests/components/graph/test.esp32-c3-idf.yaml index 1e6670c196..c97f30d52c 100644 --- a/tests/components/graph/test.esp32-c3-idf.yaml +++ b/tests/components/graph/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/graph/test.esp32-idf.yaml b/tests/components/graph/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/graph/test.esp32-idf.yaml +++ b/tests/components/graph/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/graph/test.esp8266-ard.yaml b/tests/components/graph/test.esp8266-ard.yaml index dfdc12a3d1..b8bb94edde 100644 --- a/tests/components/graph/test.esp8266-ard.yaml +++ b/tests/components/graph/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/graph/test.rp2040-ard.yaml b/tests/components/graph/test.rp2040-ard.yaml index 1e6670c196..1bf10642c5 100644 --- a/tests/components/graph/test.rp2040-ard.yaml +++ b/tests/components/graph/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/graphical_display_menu/common.yaml b/tests/components/graphical_display_menu/common.yaml index d979a6a30e..0b8f20d64b 100644 --- a/tests/components/graphical_display_menu/common.yaml +++ b/tests/components/graphical_display_menu/common.yaml @@ -1,15 +1,10 @@ -i2c: - - id: i2c_graphical_display_menu - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c id: ssd1306_display model: SSD1306_128X64 reset_pin: ${reset_pin} pages: - - id: page1 + - id: graphical_display_menu_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); diff --git a/tests/components/graphical_display_menu/test.esp32-c3-idf.yaml b/tests/components/graphical_display_menu/test.esp32-c3-idf.yaml index 1e6670c196..c97f30d52c 100644 --- a/tests/components/graphical_display_menu/test.esp32-c3-idf.yaml +++ b/tests/components/graphical_display_menu/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/graphical_display_menu/test.esp32-idf.yaml b/tests/components/graphical_display_menu/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/graphical_display_menu/test.esp32-idf.yaml +++ b/tests/components/graphical_display_menu/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/graphical_display_menu/test.esp8266-ard.yaml b/tests/components/graphical_display_menu/test.esp8266-ard.yaml index dfdc12a3d1..b8bb94edde 100644 --- a/tests/components/graphical_display_menu/test.esp8266-ard.yaml +++ b/tests/components/graphical_display_menu/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/graphical_display_menu/test.rp2040-ard.yaml b/tests/components/graphical_display_menu/test.rp2040-ard.yaml index 1e6670c196..1bf10642c5 100644 --- a/tests/components/graphical_display_menu/test.rp2040-ard.yaml +++ b/tests/components/graphical_display_menu/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/grove_gas_mc_v2/common.yaml b/tests/components/grove_gas_mc_v2/common.yaml index dbdb950033..0729e6b9c7 100644 --- a/tests/components/grove_gas_mc_v2/common.yaml +++ b/tests/components/grove_gas_mc_v2/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_grove_gas_mc_v2 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: grove_gas_mc_v2 + i2c_id: i2c_bus nitrogen_dioxide: name: "Nitrogen Dioxide" ethanol: diff --git a/tests/components/grove_gas_mc_v2/test.esp32-c3-idf.yaml b/tests/components/grove_gas_mc_v2/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/grove_gas_mc_v2/test.esp32-c3-idf.yaml +++ b/tests/components/grove_gas_mc_v2/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/grove_gas_mc_v2/test.esp32-idf.yaml b/tests/components/grove_gas_mc_v2/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/grove_gas_mc_v2/test.esp32-idf.yaml +++ b/tests/components/grove_gas_mc_v2/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/grove_gas_mc_v2/test.esp8266-ard.yaml b/tests/components/grove_gas_mc_v2/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/grove_gas_mc_v2/test.esp8266-ard.yaml +++ b/tests/components/grove_gas_mc_v2/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/grove_gas_mc_v2/test.rp2040-ard.yaml b/tests/components/grove_gas_mc_v2/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/grove_gas_mc_v2/test.rp2040-ard.yaml +++ b/tests/components/grove_gas_mc_v2/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/grove_tb6612fng/common.yaml b/tests/components/grove_tb6612fng/common.yaml index 0db6c00bf7..52d5ead96e 100644 --- a/tests/components/grove_tb6612fng/common.yaml +++ b/tests/components/grove_tb6612fng/common.yaml @@ -13,11 +13,7 @@ esphome: channel: 1 id: test_motor -i2c: - - id: i2c_grove_tb6612fng - scl: ${scl_pin} - sda: ${sda_pin} - grove_tb6612fng: id: test_motor + i2c_id: i2c_bus address: 0x14 diff --git a/tests/components/grove_tb6612fng/test.esp32-c3-idf.yaml b/tests/components/grove_tb6612fng/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/grove_tb6612fng/test.esp32-c3-idf.yaml +++ b/tests/components/grove_tb6612fng/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/grove_tb6612fng/test.esp32-idf.yaml b/tests/components/grove_tb6612fng/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/grove_tb6612fng/test.esp32-idf.yaml +++ b/tests/components/grove_tb6612fng/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/grove_tb6612fng/test.esp8266-ard.yaml b/tests/components/grove_tb6612fng/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/grove_tb6612fng/test.esp8266-ard.yaml +++ b/tests/components/grove_tb6612fng/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/grove_tb6612fng/test.rp2040-ard.yaml b/tests/components/grove_tb6612fng/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/grove_tb6612fng/test.rp2040-ard.yaml +++ b/tests/components/grove_tb6612fng/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/growatt_solar/common.yaml b/tests/components/growatt_solar/common.yaml index 7cc6b2a139..f304e84fcf 100644 --- a/tests/components/growatt_solar/common.yaml +++ b/tests/components/growatt_solar/common.yaml @@ -1,14 +1,6 @@ -uart: - - id: uart_growatt_solar - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - -modbus: - flow_control_pin: ${flow_control_pin} - sensor: - platform: growatt_solar + modbus_id: modbus_bus update_interval: 10s protocol_version: RTU inverter_status: diff --git a/tests/components/growatt_solar/test.esp32-c3-idf.yaml b/tests/components/growatt_solar/test.esp32-c3-idf.yaml index 452031a5aa..17940aafcf 100644 --- a/tests/components/growatt_solar/test.esp32-c3-idf.yaml +++ b/tests/components/growatt_solar/test.esp32-c3-idf.yaml @@ -1,6 +1,6 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/growatt_solar/test.esp32-idf.yaml b/tests/components/growatt_solar/test.esp32-idf.yaml index bd767a8ece..a755bfa66a 100644 --- a/tests/components/growatt_solar/test.esp32-idf.yaml +++ b/tests/components/growatt_solar/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO14 flow_control_pin: GPIO13 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/growatt_solar/test.esp8266-ard.yaml b/tests/components/growatt_solar/test.esp8266-ard.yaml index 29c98d0957..6daa08c22b 100644 --- a/tests/components/growatt_solar/test.esp8266-ard.yaml +++ b/tests/components/growatt_solar/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - flow_control_pin: GPIO13 + tx_pin: GPIO0 + rx_pin: GPIO2 + flow_control_pin: GPIO15 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/growatt_solar/test.rp2040-ard.yaml b/tests/components/growatt_solar/test.rp2040-ard.yaml index 452031a5aa..a00283a9e0 100644 --- a/tests/components/growatt_solar/test.rp2040-ard.yaml +++ b/tests/components/growatt_solar/test.rp2040-ard.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/gt911/common.yaml b/tests/components/gt911/common.yaml index 7bb88108da..5f9748afb6 100644 --- a/tests/components/gt911/common.yaml +++ b/tests/components/gt911/common.yaml @@ -1,23 +1,21 @@ -i2c: - - id: i2c_gt911 - scl: 5 - sda: 4 - display: - platform: ssd1306_i2c + i2c_id: i2c_bus id: ssd1306_display model: SSD1306_128X64 - reset_pin: 10 + reset_pin: ${display_reset_pin} pages: - - id: page1 + - id: gt911_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: gt911 + i2c_id: i2c_bus + id: gt911_touchscreen display: ssd1306_display - interrupt_pin: 20 - reset_pin: 21 + interrupt_pin: ${interrupt_pin} + reset_pin: ${reset_pin} binary_sensor: - platform: gt911 diff --git a/tests/components/gt911/test.esp32-c3-idf.yaml b/tests/components/gt911/test.esp32-c3-idf.yaml index dade44d145..5e15963b7e 100644 --- a/tests/components/gt911/test.esp32-c3-idf.yaml +++ b/tests/components/gt911/test.esp32-c3-idf.yaml @@ -1 +1,9 @@ +substitutions: + display_reset_pin: "18" + interrupt_pin: "20" + reset_pin: "21" + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/gt911/test.esp32-idf.yaml b/tests/components/gt911/test.esp32-idf.yaml index dade44d145..3bce86d9a3 100644 --- a/tests/components/gt911/test.esp32-idf.yaml +++ b/tests/components/gt911/test.esp32-idf.yaml @@ -1 +1,9 @@ +substitutions: + display_reset_pin: "10" + interrupt_pin: "20" + reset_pin: "21" + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/gt911/test.esp8266-ard.yaml b/tests/components/gt911/test.esp8266-ard.yaml index 8b76eff29e..c3bc159b5b 100644 --- a/tests/components/gt911/test.esp8266-ard.yaml +++ b/tests/components/gt911/test.esp8266-ard.yaml @@ -1,24 +1,9 @@ -i2c: - - id: i2c_gt911 - scl: 5 - sda: 4 +substitutions: + display_reset_pin: "10" + interrupt_pin: "12" + reset_pin: "13" -display: - - platform: ssd1306_i2c - id: ssd1306_display - model: SSD1306_128X64 - reset_pin: 13 - pages: - - id: page1 - lambda: |- - it.rectangle(0, 0, it.get_width(), it.get_height()); +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml -touchscreen: - - platform: gt911 - display: ssd1306_display - interrupt_pin: 12 - -binary_sensor: - - platform: gt911 - id: touch_key_911 - index: 0 +<<: !include common.yaml diff --git a/tests/components/gt911/test.rp2040-ard.yaml b/tests/components/gt911/test.rp2040-ard.yaml index dade44d145..0c7f0bc504 100644 --- a/tests/components/gt911/test.rp2040-ard.yaml +++ b/tests/components/gt911/test.rp2040-ard.yaml @@ -1 +1,9 @@ +substitutions: + display_reset_pin: "10" + interrupt_pin: "20" + reset_pin: "21" + +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/haier/common.yaml b/tests/components/haier/common.yaml index 368b88b69c..926a1d1b7a 100644 --- a/tests/components/haier/common.yaml +++ b/tests/components/haier/common.yaml @@ -2,16 +2,9 @@ wifi: ssid: MySSID password: password1 -uart: - - id: uart_haier - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - climate: - platform: haier id: haier_ac - uart_id: uart_haier protocol: hOn name: Haier AC wifi_signal: true diff --git a/tests/components/haier/test.esp32-c3-idf.yaml b/tests/components/haier/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/haier/test.esp32-c3-idf.yaml +++ b/tests/components/haier/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/haier/test.esp32-idf.yaml b/tests/components/haier/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/haier/test.esp32-idf.yaml +++ b/tests/components/haier/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/haier/test.esp8266-ard.yaml b/tests/components/haier/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/haier/test.esp8266-ard.yaml +++ b/tests/components/haier/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/haier/test.rp2040-ard.yaml b/tests/components/haier/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/haier/test.rp2040-ard.yaml +++ b/tests/components/haier/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/havells_solar/common.yaml b/tests/components/havells_solar/common.yaml index 370b0d357d..2f00f61f14 100644 --- a/tests/components/havells_solar/common.yaml +++ b/tests/components/havells_solar/common.yaml @@ -1,14 +1,6 @@ -uart: - - id: uart_havells_solar - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - -modbus: - flow_control_pin: ${flow_control_pin} - sensor: - platform: havells_solar + modbus_id: modbus_bus update_interval: 60s phase_a: voltage: diff --git a/tests/components/havells_solar/test.esp32-c3-idf.yaml b/tests/components/havells_solar/test.esp32-c3-idf.yaml index 452031a5aa..17940aafcf 100644 --- a/tests/components/havells_solar/test.esp32-c3-idf.yaml +++ b/tests/components/havells_solar/test.esp32-c3-idf.yaml @@ -1,6 +1,6 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/havells_solar/test.esp32-idf.yaml b/tests/components/havells_solar/test.esp32-idf.yaml index bd767a8ece..a755bfa66a 100644 --- a/tests/components/havells_solar/test.esp32-idf.yaml +++ b/tests/components/havells_solar/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO14 flow_control_pin: GPIO13 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/havells_solar/test.esp8266-ard.yaml b/tests/components/havells_solar/test.esp8266-ard.yaml index 29c98d0957..6daa08c22b 100644 --- a/tests/components/havells_solar/test.esp8266-ard.yaml +++ b/tests/components/havells_solar/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - flow_control_pin: GPIO13 + tx_pin: GPIO0 + rx_pin: GPIO2 + flow_control_pin: GPIO15 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/havells_solar/test.rp2040-ard.yaml b/tests/components/havells_solar/test.rp2040-ard.yaml index 452031a5aa..a00283a9e0 100644 --- a/tests/components/havells_solar/test.rp2040-ard.yaml +++ b/tests/components/havells_solar/test.rp2040-ard.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/hbridge/common.yaml b/tests/components/hbridge/common.yaml index 0504cdea03..ca619d6851 100644 --- a/tests/components/hbridge/common.yaml +++ b/tests/components/hbridge/common.yaml @@ -31,9 +31,3 @@ fan: on_preset_set: then: - logger.log: Preset mode was changed! - -switch: - - platform: hbridge - id: switch_hbridge - on_pin: ${hbridge_on_pin} - off_pin: ${hbridge_off_pin} diff --git a/tests/components/hbridge/test.esp32-c3-idf.yaml b/tests/components/hbridge/test.esp32-c3-idf.yaml index c73f08b6de..93a6cb5818 100644 --- a/tests/components/hbridge/test.esp32-c3-idf.yaml +++ b/tests/components/hbridge/test.esp32-c3-idf.yaml @@ -7,9 +7,11 @@ substitutions: hbridge_on_pin: "2" hbridge_off_pin: "3" -packages: - common: !include common.yaml +<<: !include common.yaml switch: - - id: !extend switch_hbridge + - platform: hbridge + id: switch_hbridge + on_pin: ${hbridge_on_pin} + off_pin: ${hbridge_off_pin} pulse_length: 60ms diff --git a/tests/components/hbridge/test.esp32-idf.yaml b/tests/components/hbridge/test.esp32-idf.yaml index dbbfa738c7..7f3d9b928a 100644 --- a/tests/components/hbridge/test.esp32-idf.yaml +++ b/tests/components/hbridge/test.esp32-idf.yaml @@ -7,10 +7,12 @@ substitutions: hbridge_on_pin: "4" hbridge_off_pin: "5" -packages: - common: !include common.yaml +<<: !include common.yaml switch: - - id: !extend switch_hbridge + - platform: hbridge + id: switch_hbridge + on_pin: ${hbridge_on_pin} + off_pin: ${hbridge_off_pin} pulse_length: 60ms wait_time: 10ms diff --git a/tests/components/hbridge/test.esp8266-ard.yaml b/tests/components/hbridge/test.esp8266-ard.yaml index f560da5d38..0346c8801d 100644 --- a/tests/components/hbridge/test.esp8266-ard.yaml +++ b/tests/components/hbridge/test.esp8266-ard.yaml @@ -7,10 +7,12 @@ substitutions: hbridge_on_pin: "14" hbridge_off_pin: "15" -packages: - common: !include common.yaml +<<: !include common.yaml switch: - - id: !extend switch_hbridge + - platform: hbridge + id: switch_hbridge + on_pin: ${hbridge_on_pin} + off_pin: ${hbridge_off_pin} pulse_length: 60ms wait_time: 10ms diff --git a/tests/components/hbridge/test.rp2040-ard.yaml b/tests/components/hbridge/test.rp2040-ard.yaml index aa6e290cab..f9cb2b5618 100644 --- a/tests/components/hbridge/test.rp2040-ard.yaml +++ b/tests/components/hbridge/test.rp2040-ard.yaml @@ -7,10 +7,12 @@ substitutions: hbridge_on_pin: "2" hbridge_off_pin: "3" -packages: - common: !include common.yaml +<<: !include common.yaml switch: - - id: !extend switch_hbridge + - platform: hbridge + id: switch_hbridge + on_pin: ${hbridge_on_pin} + off_pin: ${hbridge_off_pin} wait_time: 10ms optimistic: true diff --git a/tests/components/hdc1080/common.yaml b/tests/components/hdc1080/common.yaml index d260d4737c..a559392cb1 100644 --- a/tests/components/hdc1080/common.yaml +++ b/tests/components/hdc1080/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_hdc1080 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: hdc1080 + i2c_id: i2c_bus temperature: name: Temperature humidity: diff --git a/tests/components/hdc1080/test.esp32-c3-idf.yaml b/tests/components/hdc1080/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/hdc1080/test.esp32-c3-idf.yaml +++ b/tests/components/hdc1080/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hdc1080/test.esp32-idf.yaml b/tests/components/hdc1080/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/hdc1080/test.esp32-idf.yaml +++ b/tests/components/hdc1080/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/hdc1080/test.esp8266-ard.yaml b/tests/components/hdc1080/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/hdc1080/test.esp8266-ard.yaml +++ b/tests/components/hdc1080/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hdc1080/test.rp2040-ard.yaml b/tests/components/hdc1080/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/hdc1080/test.rp2040-ard.yaml +++ b/tests/components/hdc1080/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/he60r/common.yaml b/tests/components/he60r/common.yaml index e10e745f57..ab5ec67f0e 100644 --- a/tests/components/he60r/common.yaml +++ b/tests/components/he60r/common.yaml @@ -1,10 +1,3 @@ -uart: - - id: uart_he60r - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 1200 - parity: EVEN - cover: - platform: he60r id: garage_door diff --git a/tests/components/he60r/test.esp32-c3-idf.yaml b/tests/components/he60r/test.esp32-c3-idf.yaml index b516342f3b..b0c8c5de3d 100644 --- a/tests/components/he60r/test.esp32-c3-idf.yaml +++ b/tests/components/he60r/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_1200_even: !include ../../test_build_components/common/uart_1200_even/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/he60r/test.esp32-idf.yaml b/tests/components/he60r/test.esp32-idf.yaml index f486544afa..f52c2a75f8 100644 --- a/tests/components/he60r/test.esp32-idf.yaml +++ b/tests/components/he60r/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 +packages: + uart_1200_even: !include ../../test_build_components/common/uart_1200_even/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/he60r/test.esp8266-ard.yaml b/tests/components/he60r/test.esp8266-ard.yaml index b516342f3b..e28024fa4d 100644 --- a/tests/components/he60r/test.esp8266-ard.yaml +++ b/tests/components/he60r/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_1200_even: !include ../../test_build_components/common/uart_1200_even/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/he60r/test.rp2040-ard.yaml b/tests/components/he60r/test.rp2040-ard.yaml index b516342f3b..a576b03d63 100644 --- a/tests/components/he60r/test.rp2040-ard.yaml +++ b/tests/components/he60r/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_1200_even: !include ../../test_build_components/common/uart_1200_even/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/hlw8012/test.esp8266-ard.yaml b/tests/components/hlw8012/test.esp8266-ard.yaml index 8b42b21b54..ec9c0e43dc 100644 --- a/tests/components/hlw8012/test.esp8266-ard.yaml +++ b/tests/components/hlw8012/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - sel_pin: GPIO12 - cf_pin: GPIO13 - cf1_pin: GPIO14 + sel_pin: GPIO0 + cf_pin: GPIO2 + cf1_pin: GPIO15 <<: !include common.yaml diff --git a/tests/components/hm3301/common.yaml b/tests/components/hm3301/common.yaml index b533130569..a56ac7bc65 100644 --- a/tests/components/hm3301/common.yaml +++ b/tests/components/hm3301/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_hm3301 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: hm3301 + i2c_id: i2c_bus pm_1_0: name: PM1.0 pm_2_5: diff --git a/tests/components/hm3301/test.esp32-c3-idf.yaml b/tests/components/hm3301/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/hm3301/test.esp32-c3-idf.yaml +++ b/tests/components/hm3301/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hm3301/test.esp32-idf.yaml b/tests/components/hm3301/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/hm3301/test.esp32-idf.yaml +++ b/tests/components/hm3301/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/hm3301/test.esp8266-ard.yaml b/tests/components/hm3301/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/hm3301/test.esp8266-ard.yaml +++ b/tests/components/hm3301/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hm3301/test.rp2040-ard.yaml b/tests/components/hm3301/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/hm3301/test.rp2040-ard.yaml +++ b/tests/components/hm3301/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/hmc5883l/common.yaml b/tests/components/hmc5883l/common.yaml index 1c90f5f1c6..19e4ba4c45 100644 --- a/tests/components/hmc5883l/common.yaml +++ b/tests/components/hmc5883l/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_hmc5883l - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: hmc5883l + i2c_id: i2c_bus address: 0x68 field_strength_x: name: HMC5883L Field Strength X diff --git a/tests/components/hmc5883l/test.esp32-c3-idf.yaml b/tests/components/hmc5883l/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/hmc5883l/test.esp32-c3-idf.yaml +++ b/tests/components/hmc5883l/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hmc5883l/test.esp32-idf.yaml b/tests/components/hmc5883l/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/hmc5883l/test.esp32-idf.yaml +++ b/tests/components/hmc5883l/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/hmc5883l/test.esp8266-ard.yaml b/tests/components/hmc5883l/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/hmc5883l/test.esp8266-ard.yaml +++ b/tests/components/hmc5883l/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hmc5883l/test.rp2040-ard.yaml b/tests/components/hmc5883l/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/hmc5883l/test.rp2040-ard.yaml +++ b/tests/components/hmc5883l/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/honeywell_hih_i2c/common.yaml b/tests/components/honeywell_hih_i2c/common.yaml index a5f3eef187..de588a30bd 100644 --- a/tests/components/honeywell_hih_i2c/common.yaml +++ b/tests/components/honeywell_hih_i2c/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_honeywell_hih - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: honeywell_hih_i2c + i2c_id: i2c_bus temperature: name: Temperature humidity: diff --git a/tests/components/honeywell_hih_i2c/test.esp32-c3-idf.yaml b/tests/components/honeywell_hih_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/honeywell_hih_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/honeywell_hih_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/honeywell_hih_i2c/test.esp32-idf.yaml b/tests/components/honeywell_hih_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/honeywell_hih_i2c/test.esp32-idf.yaml +++ b/tests/components/honeywell_hih_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/honeywell_hih_i2c/test.esp8266-ard.yaml b/tests/components/honeywell_hih_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/honeywell_hih_i2c/test.esp8266-ard.yaml +++ b/tests/components/honeywell_hih_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/honeywell_hih_i2c/test.rp2040-ard.yaml b/tests/components/honeywell_hih_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/honeywell_hih_i2c/test.rp2040-ard.yaml +++ b/tests/components/honeywell_hih_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/honeywellabp/common.yaml b/tests/components/honeywellabp/common.yaml index 21a3ef6ee3..f82d289ace 100644 --- a/tests/components/honeywellabp/common.yaml +++ b/tests/components/honeywellabp/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_bme280 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: honeywellabp cs_pin: ${cs_pin} diff --git a/tests/components/honeywellabp/test.esp32-c3-idf.yaml b/tests/components/honeywellabp/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/honeywellabp/test.esp32-c3-idf.yaml +++ b/tests/components/honeywellabp/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/honeywellabp/test.esp32-idf.yaml b/tests/components/honeywellabp/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/honeywellabp/test.esp32-idf.yaml +++ b/tests/components/honeywellabp/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/honeywellabp/test.esp8266-ard.yaml b/tests/components/honeywellabp/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/honeywellabp/test.esp8266-ard.yaml +++ b/tests/components/honeywellabp/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/honeywellabp/test.rp2040-ard.yaml b/tests/components/honeywellabp/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/honeywellabp/test.rp2040-ard.yaml +++ b/tests/components/honeywellabp/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/honeywellabp2_i2c/common.yaml b/tests/components/honeywellabp2_i2c/common.yaml index 6752a69866..e1b060edcf 100644 --- a/tests/components/honeywellabp2_i2c/common.yaml +++ b/tests/components/honeywellabp2_i2c/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_honeywellabp2 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: honeywellabp2_i2c + i2c_id: i2c_bus address: 0x28 pressure: name: Honeywell2 pressure diff --git a/tests/components/honeywellabp2_i2c/test.esp32-c3-idf.yaml b/tests/components/honeywellabp2_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/honeywellabp2_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/honeywellabp2_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/honeywellabp2_i2c/test.esp32-idf.yaml b/tests/components/honeywellabp2_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/honeywellabp2_i2c/test.esp32-idf.yaml +++ b/tests/components/honeywellabp2_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/honeywellabp2_i2c/test.esp8266-ard.yaml b/tests/components/honeywellabp2_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/honeywellabp2_i2c/test.esp8266-ard.yaml +++ b/tests/components/honeywellabp2_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/honeywellabp2_i2c/test.rp2040-ard.yaml b/tests/components/honeywellabp2_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/honeywellabp2_i2c/test.rp2040-ard.yaml +++ b/tests/components/honeywellabp2_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/hrxl_maxsonar_wr/common.yaml b/tests/components/hrxl_maxsonar_wr/common.yaml index d74ada716d..84376aa5ba 100644 --- a/tests/components/hrxl_maxsonar_wr/common.yaml +++ b/tests/components/hrxl_maxsonar_wr/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_hrxl_maxsonar_wr - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - sensor: - platform: hrxl_maxsonar_wr id: hrxl_maxsonar_wr_sensor diff --git a/tests/components/hrxl_maxsonar_wr/test.esp32-c3-idf.yaml b/tests/components/hrxl_maxsonar_wr/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/hrxl_maxsonar_wr/test.esp32-c3-idf.yaml +++ b/tests/components/hrxl_maxsonar_wr/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hrxl_maxsonar_wr/test.esp32-idf.yaml b/tests/components/hrxl_maxsonar_wr/test.esp32-idf.yaml index 811f6b72a6..64baa4ec9d 100644 --- a/tests/components/hrxl_maxsonar_wr/test.esp32-idf.yaml +++ b/tests/components/hrxl_maxsonar_wr/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO12 rx_pin: GPIO14 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/hrxl_maxsonar_wr/test.esp8266-ard.yaml b/tests/components/hrxl_maxsonar_wr/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/hrxl_maxsonar_wr/test.esp8266-ard.yaml +++ b/tests/components/hrxl_maxsonar_wr/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hrxl_maxsonar_wr/test.rp2040-ard.yaml b/tests/components/hrxl_maxsonar_wr/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/hrxl_maxsonar_wr/test.rp2040-ard.yaml +++ b/tests/components/hrxl_maxsonar_wr/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/hte501/common.yaml b/tests/components/hte501/common.yaml index 7c57b5bc6a..e0641de193 100644 --- a/tests/components/hte501/common.yaml +++ b/tests/components/hte501/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_hte501 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: hte501 + i2c_id: i2c_bus address: 0x40 temperature: name: Temperature diff --git a/tests/components/hte501/test.esp32-c3-idf.yaml b/tests/components/hte501/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/hte501/test.esp32-c3-idf.yaml +++ b/tests/components/hte501/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hte501/test.esp32-idf.yaml b/tests/components/hte501/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/hte501/test.esp32-idf.yaml +++ b/tests/components/hte501/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/hte501/test.esp8266-ard.yaml b/tests/components/hte501/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/hte501/test.esp8266-ard.yaml +++ b/tests/components/hte501/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hte501/test.rp2040-ard.yaml b/tests/components/hte501/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/hte501/test.rp2040-ard.yaml +++ b/tests/components/hte501/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/http_request/common.yaml b/tests/components/http_request/common.yaml index 97961007e2..9ff9f9fb67 100644 --- a/tests/components/http_request/common.yaml +++ b/tests/components/http_request/common.yaml @@ -51,6 +51,7 @@ script: ota: - platform: http_request + id: http_request_ota on_begin: then: - logger.log: "OTA start" @@ -77,10 +78,12 @@ button: on_press: then: - ota.http_request.flash: + id: http_request_ota md5_url: http://my.ha.net:8123/local/esphome/firmware.md5 url: http://my.ha.net:8123/local/esphome/firmware.bin - ota.http_request.flash: + id: http_request_ota md5: 0123456789abcdef0123456789abcdef url: http://my.ha.net:8123/local/esphome/firmware.bin @@ -90,6 +93,7 @@ update: - platform: http_request name: OTA Update id: ota_update + ota_id: http_request_ota source: http://my.ha.net:8123/local/esphome/manifest.json on_update_available: - logger.log: "A new update is available" diff --git a/tests/components/htu21d/common.yaml b/tests/components/htu21d/common.yaml index f12c1ca46e..ad4b23d460 100644 --- a/tests/components/htu21d/common.yaml +++ b/tests/components/htu21d/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_htu21d - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: htu21d + i2c_id: i2c_bus model: htu21d temperature: name: Temperature diff --git a/tests/components/htu21d/test.esp32-c3-idf.yaml b/tests/components/htu21d/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/htu21d/test.esp32-c3-idf.yaml +++ b/tests/components/htu21d/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/htu21d/test.esp32-idf.yaml b/tests/components/htu21d/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/htu21d/test.esp32-idf.yaml +++ b/tests/components/htu21d/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/htu21d/test.esp8266-ard.yaml b/tests/components/htu21d/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/htu21d/test.esp8266-ard.yaml +++ b/tests/components/htu21d/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/htu21d/test.rp2040-ard.yaml b/tests/components/htu21d/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/htu21d/test.rp2040-ard.yaml +++ b/tests/components/htu21d/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/htu31d/common.yaml b/tests/components/htu31d/common.yaml index 735cdc7cbf..41d718ea69 100644 --- a/tests/components/htu31d/common.yaml +++ b/tests/components/htu31d/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_htu31d - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: htu31d + i2c_id: i2c_bus temperature: name: Living Room Temperature humidity: diff --git a/tests/components/htu31d/test.esp32-c3-idf.yaml b/tests/components/htu31d/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/htu31d/test.esp32-c3-idf.yaml +++ b/tests/components/htu31d/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/htu31d/test.esp32-idf.yaml b/tests/components/htu31d/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/htu31d/test.esp32-idf.yaml +++ b/tests/components/htu31d/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/htu31d/test.esp8266-ard.yaml b/tests/components/htu31d/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/htu31d/test.esp8266-ard.yaml +++ b/tests/components/htu31d/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/htu31d/test.rp2040-ard.yaml b/tests/components/htu31d/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/htu31d/test.rp2040-ard.yaml +++ b/tests/components/htu31d/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/hx711/test.esp32-c3-idf.yaml b/tests/components/hx711/test.esp32-c3-idf.yaml index 08a6e705c0..defef165e3 100644 --- a/tests/components/hx711/test.esp32-c3-idf.yaml +++ b/tests/components/hx711/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO5 - dout_pin: GPIO4 + clk_pin: GPIO4 + dout_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/hx711/test.esp32-idf.yaml b/tests/components/hx711/test.esp32-idf.yaml index 6423867395..defef165e3 100644 --- a/tests/components/hx711/test.esp32-idf.yaml +++ b/tests/components/hx711/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO16 - dout_pin: GPIO17 + clk_pin: GPIO4 + dout_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/hx711/test.esp8266-ard.yaml b/tests/components/hx711/test.esp8266-ard.yaml index 08a6e705c0..defef165e3 100644 --- a/tests/components/hx711/test.esp8266-ard.yaml +++ b/tests/components/hx711/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO5 - dout_pin: GPIO4 + clk_pin: GPIO4 + dout_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/hx711/test.rp2040-ard.yaml b/tests/components/hx711/test.rp2040-ard.yaml index 08a6e705c0..defef165e3 100644 --- a/tests/components/hx711/test.rp2040-ard.yaml +++ b/tests/components/hx711/test.rp2040-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO5 - dout_pin: GPIO4 + clk_pin: GPIO4 + dout_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/hydreon_rgxx/common.yaml b/tests/components/hydreon_rgxx/common.yaml index e11c6c91c9..e96879fdec 100644 --- a/tests/components/hydreon_rgxx/common.yaml +++ b/tests/components/hydreon_rgxx/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_hydreon_rgxx - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - binary_sensor: - platform: hydreon_rgxx hydreon_rgxx_id: hydreon_rg9 diff --git a/tests/components/hydreon_rgxx/test.esp32-c3-idf.yaml b/tests/components/hydreon_rgxx/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/hydreon_rgxx/test.esp32-c3-idf.yaml +++ b/tests/components/hydreon_rgxx/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hydreon_rgxx/test.esp32-idf.yaml b/tests/components/hydreon_rgxx/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/hydreon_rgxx/test.esp32-idf.yaml +++ b/tests/components/hydreon_rgxx/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/hydreon_rgxx/test.esp8266-ard.yaml b/tests/components/hydreon_rgxx/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/hydreon_rgxx/test.esp8266-ard.yaml +++ b/tests/components/hydreon_rgxx/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hydreon_rgxx/test.rp2040-ard.yaml b/tests/components/hydreon_rgxx/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/hydreon_rgxx/test.rp2040-ard.yaml +++ b/tests/components/hydreon_rgxx/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/hyt271/common.yaml b/tests/components/hyt271/common.yaml index 7a4371173f..5771d882da 100644 --- a/tests/components/hyt271/common.yaml +++ b/tests/components/hyt271/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_hyt271 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: hyt271 + i2c_id: i2c_bus temperature: name: Temperature humidity: diff --git a/tests/components/hyt271/test.esp32-c3-idf.yaml b/tests/components/hyt271/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/hyt271/test.esp32-c3-idf.yaml +++ b/tests/components/hyt271/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/hyt271/test.esp32-idf.yaml b/tests/components/hyt271/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/hyt271/test.esp32-idf.yaml +++ b/tests/components/hyt271/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/hyt271/test.esp8266-ard.yaml b/tests/components/hyt271/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/hyt271/test.esp8266-ard.yaml +++ b/tests/components/hyt271/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/hyt271/test.rp2040-ard.yaml b/tests/components/hyt271/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/hyt271/test.rp2040-ard.yaml +++ b/tests/components/hyt271/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/i2c/common.yaml b/tests/components/i2c/common.yaml index d70cd595ad..e69de29bb2 100644 --- a/tests/components/i2c/common.yaml +++ b/tests/components/i2c/common.yaml @@ -1,4 +0,0 @@ -i2c: - - id: i2c_i2c - scl: ${scl_pin} - sda: ${sda_pin} diff --git a/tests/components/i2c/test.esp32-ard.yaml b/tests/components/i2c/test.esp32-ard.yaml index 63c3bd6afd..7c503b0ccb 100644 --- a/tests/components/i2c/test.esp32-ard.yaml +++ b/tests/components/i2c/test.esp32-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-ard.yaml <<: !include common.yaml diff --git a/tests/components/i2c/test.esp32-c3-idf.yaml b/tests/components/i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/i2c/test.esp32-c3-idf.yaml +++ b/tests/components/i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/i2c/test.esp32-idf.yaml b/tests/components/i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/i2c/test.esp32-idf.yaml +++ b/tests/components/i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/i2c/test.esp8266-ard.yaml b/tests/components/i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/i2c/test.esp8266-ard.yaml +++ b/tests/components/i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/i2c/test.rp2040-ard.yaml b/tests/components/i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/i2c/test.rp2040-ard.yaml +++ b/tests/components/i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/i2c_device/common.yaml b/tests/components/i2c_device/common.yaml index 35a6f8f7f0..fed399eb8c 100644 --- a/tests/components/i2c_device/common.yaml +++ b/tests/components/i2c_device/common.yaml @@ -1,8 +1,4 @@ -i2c: - - id: i2c_i2c_device - scl: ${scl_pin} - sda: ${sda_pin} - i2c_device: id: i2cdev + i2c_id: i2c_bus address: 0x2C diff --git a/tests/components/i2c_device/test.esp32-c3-idf.yaml b/tests/components/i2c_device/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/i2c_device/test.esp32-c3-idf.yaml +++ b/tests/components/i2c_device/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/i2c_device/test.esp32-idf.yaml b/tests/components/i2c_device/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/i2c_device/test.esp32-idf.yaml +++ b/tests/components/i2c_device/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/i2c_device/test.esp8266-ard.yaml b/tests/components/i2c_device/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/i2c_device/test.esp8266-ard.yaml +++ b/tests/components/i2c_device/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/i2c_device/test.rp2040-ard.yaml b/tests/components/i2c_device/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/i2c_device/test.rp2040-ard.yaml +++ b/tests/components/i2c_device/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/i2s_audio/test.esp32-idf.yaml b/tests/components/i2s_audio/test.esp32-idf.yaml index ce751d7d4a..ead1eaa1e9 100644 --- a/tests/components/i2s_audio/test.esp32-idf.yaml +++ b/tests/components/i2s_audio/test.esp32-idf.yaml @@ -1,6 +1,9 @@ substitutions: i2s_bclk_pin: GPIO15 - i2s_lrclk_pin: GPIO16 - i2s_mclk_pin: GPIO17 + i2s_lrclk_pin: GPIO4 + i2s_mclk_pin: GPIO5 + +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/iaqcore/common.yaml b/tests/components/iaqcore/common.yaml index 927b836c52..e0f9d09a00 100644 --- a/tests/components/iaqcore/common.yaml +++ b/tests/components/iaqcore/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_iaqcore - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: iaqcore + i2c_id: i2c_bus co2: name: iAQ Core CO2 Sensor tvoc: diff --git a/tests/components/iaqcore/test.esp32-c3-idf.yaml b/tests/components/iaqcore/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/iaqcore/test.esp32-c3-idf.yaml +++ b/tests/components/iaqcore/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/iaqcore/test.esp32-idf.yaml b/tests/components/iaqcore/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/iaqcore/test.esp32-idf.yaml +++ b/tests/components/iaqcore/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/iaqcore/test.esp8266-ard.yaml b/tests/components/iaqcore/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/iaqcore/test.esp8266-ard.yaml +++ b/tests/components/iaqcore/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/iaqcore/test.rp2040-ard.yaml b/tests/components/iaqcore/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/iaqcore/test.rp2040-ard.yaml +++ b/tests/components/iaqcore/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ili9xxx/common.yaml b/tests/components/ili9xxx/common.yaml index b182d110cd..47384b1398 100644 --- a/tests/components/ili9xxx/common.yaml +++ b/tests/components/ili9xxx/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_main_lcd - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ili9xxx invert_colors: true diff --git a/tests/components/ili9xxx/test.esp32-c3-idf.yaml b/tests/components/ili9xxx/test.esp32-c3-idf.yaml index 3037785e81..1eea1e85f7 100644 --- a/tests/components/ili9xxx/test.esp32-c3-idf.yaml +++ b/tests/components/ili9xxx/test.esp32-c3-idf.yaml @@ -1,12 +1,11 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin1: GPIO8 dc_pin1: GPIO9 reset_pin1: GPIO10 cs_pin2: GPIO2 dc_pin2: GPIO3 - reset_pin2: GPIO4 + reset_pin2: GPIO7 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ili9xxx/test.esp32-idf.yaml b/tests/components/ili9xxx/test.esp32-idf.yaml index 2e006d2521..866e57573b 100644 --- a/tests/components/ili9xxx/test.esp32-idf.yaml +++ b/tests/components/ili9xxx/test.esp32-idf.yaml @@ -1,6 +1,4 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin1: GPIO12 dc_pin1: GPIO13 reset_pin1: GPIO14 @@ -8,4 +6,7 @@ substitutions: dc_pin2: GPIO26 reset_pin2: GPIO27 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ili9xxx/test.esp8266-ard.yaml b/tests/components/ili9xxx/test.esp8266-ard.yaml index 5dee055fd4..feb7773794 100644 --- a/tests/components/ili9xxx/test.esp8266-ard.yaml +++ b/tests/components/ili9xxx/test.esp8266-ard.yaml @@ -9,4 +9,7 @@ substitutions: dc_pin2: GPIO4 reset_pin2: GPIO0 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ili9xxx/test.rp2040-ard.yaml b/tests/components/ili9xxx/test.rp2040-ard.yaml index 74c9b906e9..2acde3e629 100644 --- a/tests/components/ili9xxx/test.rp2040-ard.yaml +++ b/tests/components/ili9xxx/test.rp2040-ard.yaml @@ -9,4 +9,7 @@ substitutions: dc_pin2: GPIO21 reset_pin2: GPIO22 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/image/test.esp32-idf.yaml b/tests/components/image/test.esp32-idf.yaml index 814f16c36c..aea2b4bbb0 100644 --- a/tests/components/image/test.esp32-idf.yaml +++ b/tests/components/image/test.esp32-idf.yaml @@ -1,14 +1,12 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 18 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 - cs_pin: 19 + cs_pin: 15 dc_pin: 13 reset_pin: 21 invert_colors: true diff --git a/tests/components/image/test.esp8266-ard.yaml b/tests/components/image/test.esp8266-ard.yaml index 626076d44e..2e7bfc5ae5 100644 --- a/tests/components/image/test.esp8266-ard.yaml +++ b/tests/components/image/test.esp8266-ard.yaml @@ -1,12 +1,10 @@ -spi: - - id: spi_main_lcd - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 cs_pin: 5 dc_pin: 15 diff --git a/tests/components/image/test.rp2040-ard.yaml b/tests/components/image/test.rp2040-ard.yaml index 5167c99a7d..40f17d57fe 100644 --- a/tests/components/image/test.rp2040-ard.yaml +++ b/tests/components/image/test.rp2040-ard.yaml @@ -1,12 +1,10 @@ -spi: - - id: spi_main_lcd - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml display: - platform: ili9xxx id: main_lcd + spi_id: spi_bus model: ili9342 cs_pin: 20 dc_pin: 21 diff --git a/tests/components/ina219/common.yaml b/tests/components/ina219/common.yaml index 4ca4c9ed8f..71291a082d 100644 --- a/tests/components/ina219/common.yaml +++ b/tests/components/ina219/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ina219 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ina219 + i2c_id: i2c_bus address: 0x40 shunt_resistance: 0.1 ohm current: diff --git a/tests/components/ina219/test.esp32-c3-idf.yaml b/tests/components/ina219/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ina219/test.esp32-c3-idf.yaml +++ b/tests/components/ina219/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina219/test.esp32-idf.yaml b/tests/components/ina219/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ina219/test.esp32-idf.yaml +++ b/tests/components/ina219/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina219/test.esp8266-ard.yaml b/tests/components/ina219/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ina219/test.esp8266-ard.yaml +++ b/tests/components/ina219/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina219/test.rp2040-ard.yaml b/tests/components/ina219/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ina219/test.rp2040-ard.yaml +++ b/tests/components/ina219/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina226/common.yaml b/tests/components/ina226/common.yaml index 8bcd038e50..7cbaf8cb2f 100644 --- a/tests/components/ina226/common.yaml +++ b/tests/components/ina226/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ina226 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ina226 + i2c_id: i2c_bus address: 0x40 shunt_resistance: 0.1 ohm current: diff --git a/tests/components/ina226/test.esp32-c3-idf.yaml b/tests/components/ina226/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ina226/test.esp32-c3-idf.yaml +++ b/tests/components/ina226/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina226/test.esp32-idf.yaml b/tests/components/ina226/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ina226/test.esp32-idf.yaml +++ b/tests/components/ina226/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina226/test.esp8266-ard.yaml b/tests/components/ina226/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ina226/test.esp8266-ard.yaml +++ b/tests/components/ina226/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina226/test.rp2040-ard.yaml b/tests/components/ina226/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ina226/test.rp2040-ard.yaml +++ b/tests/components/ina226/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina260/common.yaml b/tests/components/ina260/common.yaml index ab94b2e509..f630d0bb47 100644 --- a/tests/components/ina260/common.yaml +++ b/tests/components/ina260/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ina260 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ina260 + i2c_id: i2c_bus address: 0x40 current: name: INA260 Current diff --git a/tests/components/ina260/test.esp32-c3-idf.yaml b/tests/components/ina260/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ina260/test.esp32-c3-idf.yaml +++ b/tests/components/ina260/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina260/test.esp32-idf.yaml b/tests/components/ina260/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ina260/test.esp32-idf.yaml +++ b/tests/components/ina260/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina260/test.esp8266-ard.yaml b/tests/components/ina260/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ina260/test.esp8266-ard.yaml +++ b/tests/components/ina260/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina260/test.rp2040-ard.yaml b/tests/components/ina260/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ina260/test.rp2040-ard.yaml +++ b/tests/components/ina260/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina2xx_i2c/common.yaml b/tests/components/ina2xx_i2c/common.yaml index 320b680b6b..7d586f136e 100644 --- a/tests/components/ina2xx_i2c/common.yaml +++ b/tests/components/ina2xx_i2c/common.yaml @@ -1,11 +1,6 @@ -i2c: - - id: i2c_ina2xx - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ina2xx_i2c - i2c_id: i2c_ina2xx + i2c_id: i2c_bus address: 0x40 model: INA228 shunt_resistance: 0.001130 ohm diff --git a/tests/components/ina2xx_i2c/test.esp32-c3-idf.yaml b/tests/components/ina2xx_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ina2xx_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ina2xx_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina2xx_i2c/test.esp32-idf.yaml b/tests/components/ina2xx_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ina2xx_i2c/test.esp32-idf.yaml +++ b/tests/components/ina2xx_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina2xx_i2c/test.esp8266-ard.yaml b/tests/components/ina2xx_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ina2xx_i2c/test.esp8266-ard.yaml +++ b/tests/components/ina2xx_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina2xx_i2c/test.rp2040-ard.yaml b/tests/components/ina2xx_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ina2xx_i2c/test.rp2040-ard.yaml +++ b/tests/components/ina2xx_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina2xx_spi/common.yaml b/tests/components/ina2xx_spi/common.yaml index 3eab7e6f0a..d9b2300e26 100644 --- a/tests/components/ina2xx_spi/common.yaml +++ b/tests/components/ina2xx_spi/common.yaml @@ -1,12 +1,5 @@ -spi: - - id: spi_ina2xx - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: ina2xx_spi - spi_id: spi_ina2xx cs_pin: ${cs_pin} model: INA229 shunt_resistance: 0.001130 ohm diff --git a/tests/components/ina2xx_spi/test.esp32-c3-idf.yaml b/tests/components/ina2xx_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/ina2xx_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ina2xx_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina2xx_spi/test.esp32-idf.yaml b/tests/components/ina2xx_spi/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/ina2xx_spi/test.esp32-idf.yaml +++ b/tests/components/ina2xx_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ina2xx_spi/test.esp8266-ard.yaml b/tests/components/ina2xx_spi/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/ina2xx_spi/test.esp8266-ard.yaml +++ b/tests/components/ina2xx_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ina2xx_spi/test.rp2040-ard.yaml b/tests/components/ina2xx_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/ina2xx_spi/test.rp2040-ard.yaml +++ b/tests/components/ina2xx_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ina3221/common.yaml b/tests/components/ina3221/common.yaml index ba1abdfe3a..570d1b0a12 100644 --- a/tests/components/ina3221/common.yaml +++ b/tests/components/ina3221/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ina3221 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ina3221 + i2c_id: i2c_bus address: 0x40 channel_1: shunt_resistance: 0.1 ohm diff --git a/tests/components/ina3221/test.esp32-c3-idf.yaml b/tests/components/ina3221/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ina3221/test.esp32-c3-idf.yaml +++ b/tests/components/ina3221/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina3221/test.esp32-idf.yaml b/tests/components/ina3221/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ina3221/test.esp32-idf.yaml +++ b/tests/components/ina3221/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ina3221/test.esp8266-ard.yaml b/tests/components/ina3221/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ina3221/test.esp8266-ard.yaml +++ b/tests/components/ina3221/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ina3221/test.rp2040-ard.yaml b/tests/components/ina3221/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ina3221/test.rp2040-ard.yaml +++ b/tests/components/ina3221/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml b/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml +++ b/tests/components/inkbird_ibsth1_mini/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml b/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml +++ b/tests/components/inkbird_ibsth1_mini/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/inkplate/common.yaml b/tests/components/inkplate/common.yaml index 7050b1739f..bb18ff4f7e 100644 --- a/tests/components/inkplate/common.yaml +++ b/tests/components/inkplate/common.yaml @@ -1,13 +1,9 @@ -i2c: - - id: i2c_inkplate - scl: 16 - sda: 17 - esp32: cpu_frequency: 240MHz display: - platform: inkplate + i2c_id: i2c_bus id: inkplate_display greyscale: false partial_updating: false diff --git a/tests/components/inkplate/test.esp32-idf.yaml b/tests/components/inkplate/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/inkplate/test.esp32-idf.yaml +++ b/tests/components/inkplate/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/jsn_sr04t/common.yaml b/tests/components/jsn_sr04t/common.yaml index d6871d5e91..bc2c301c2e 100644 --- a/tests/components/jsn_sr04t/common.yaml +++ b/tests/components/jsn_sr04t/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_jsn_sr04t - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: jsn_sr04t id: jsn_sr04t_sensor diff --git a/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml b/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml +++ b/tests/components/jsn_sr04t/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.esp32-idf.yaml b/tests/components/jsn_sr04t/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/jsn_sr04t/test.esp32-idf.yaml +++ b/tests/components/jsn_sr04t/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.esp8266-ard.yaml b/tests/components/jsn_sr04t/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/jsn_sr04t/test.esp8266-ard.yaml +++ b/tests/components/jsn_sr04t/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/jsn_sr04t/test.rp2040-ard.yaml b/tests/components/jsn_sr04t/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/jsn_sr04t/test.rp2040-ard.yaml +++ b/tests/components/jsn_sr04t/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/kamstrup_kmp/common.yaml b/tests/components/kamstrup_kmp/common.yaml index b348d03c72..b3ebea523c 100644 --- a/tests/components/kamstrup_kmp/common.yaml +++ b/tests/components/kamstrup_kmp/common.yaml @@ -1,9 +1,3 @@ -uart: - tx_pin: ${uart_tx_pin} - rx_pin: ${uart_rx_pin} - baud_rate: 1200 - stop_bits: 2 - sensor: - platform: kamstrup_kmp heat_energy: diff --git a/tests/components/kamstrup_kmp/test.esp32-idf.yaml b/tests/components/kamstrup_kmp/test.esp32-idf.yaml index adc2c4d24a..1016905720 100644 --- a/tests/components/kamstrup_kmp/test.esp32-idf.yaml +++ b/tests/components/kamstrup_kmp/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - uart_tx_pin: GPIO1 - uart_rx_pin: GPIO3 +packages: + uart_1200: !include ../../test_build_components/common/uart_1200/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/kamstrup_kmp/test.esp8266-ard.yaml b/tests/components/kamstrup_kmp/test.esp8266-ard.yaml index adc2c4d24a..f55c18eb76 100644 --- a/tests/components/kamstrup_kmp/test.esp8266-ard.yaml +++ b/tests/components/kamstrup_kmp/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: uart_tx_pin: GPIO1 uart_rx_pin: GPIO3 +packages: + uart_1200: !include ../../test_build_components/common/uart_1200/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/kmeteriso/common.yaml b/tests/components/kmeteriso/common.yaml index 6b68175904..8542bb6a06 100644 --- a/tests/components/kmeteriso/common.yaml +++ b/tests/components/kmeteriso/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_kmeteriso - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: kmeteriso + i2c_id: i2c_bus temperature: name: Outside Temperature internal_temperature: diff --git a/tests/components/kmeteriso/test.esp32-c3-idf.yaml b/tests/components/kmeteriso/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/kmeteriso/test.esp32-c3-idf.yaml +++ b/tests/components/kmeteriso/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/kmeteriso/test.esp32-idf.yaml b/tests/components/kmeteriso/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/kmeteriso/test.esp32-idf.yaml +++ b/tests/components/kmeteriso/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/kmeteriso/test.esp8266-ard.yaml b/tests/components/kmeteriso/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/kmeteriso/test.esp8266-ard.yaml +++ b/tests/components/kmeteriso/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/kmeteriso/test.rp2040-ard.yaml b/tests/components/kmeteriso/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/kmeteriso/test.rp2040-ard.yaml +++ b/tests/components/kmeteriso/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/kuntze/common.yaml b/tests/components/kuntze/common.yaml index 4daecea242..32c6fa3809 100644 --- a/tests/components/kuntze/common.yaml +++ b/tests/components/kuntze/common.yaml @@ -1,14 +1,6 @@ -uart: - - id: uart_kuntze - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - -modbus: - flow_control_pin: ${flow_control_pin} - sensor: - platform: kuntze + modbus_id: modbus_bus ph: name: Kuntze pH temperature: diff --git a/tests/components/kuntze/test.esp32-c3-idf.yaml b/tests/components/kuntze/test.esp32-c3-idf.yaml index 452031a5aa..17940aafcf 100644 --- a/tests/components/kuntze/test.esp32-c3-idf.yaml +++ b/tests/components/kuntze/test.esp32-c3-idf.yaml @@ -1,6 +1,6 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/kuntze/test.esp32-idf.yaml b/tests/components/kuntze/test.esp32-idf.yaml index bd767a8ece..a755bfa66a 100644 --- a/tests/components/kuntze/test.esp32-idf.yaml +++ b/tests/components/kuntze/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO14 flow_control_pin: GPIO13 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/kuntze/test.esp8266-ard.yaml b/tests/components/kuntze/test.esp8266-ard.yaml index 29c98d0957..6daa08c22b 100644 --- a/tests/components/kuntze/test.esp8266-ard.yaml +++ b/tests/components/kuntze/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - flow_control_pin: GPIO13 + tx_pin: GPIO0 + rx_pin: GPIO2 + flow_control_pin: GPIO15 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/kuntze/test.rp2040-ard.yaml b/tests/components/kuntze/test.rp2040-ard.yaml index 452031a5aa..a00283a9e0 100644 --- a/tests/components/kuntze/test.rp2040-ard.yaml +++ b/tests/components/kuntze/test.rp2040-ard.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/lc709203f/common.yaml b/tests/components/lc709203f/common.yaml index 53177c0d4a..3711e5372c 100644 --- a/tests/components/lc709203f/common.yaml +++ b/tests/components/lc709203f/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_lc709203f - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: lc709203f + i2c_id: i2c_bus size: 2000 voltage: 3.7 battery_voltage: diff --git a/tests/components/lc709203f/test.esp32-c3-idf.yaml b/tests/components/lc709203f/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/lc709203f/test.esp32-c3-idf.yaml +++ b/tests/components/lc709203f/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/lc709203f/test.esp32-idf.yaml b/tests/components/lc709203f/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/lc709203f/test.esp32-idf.yaml +++ b/tests/components/lc709203f/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/lc709203f/test.esp8266-ard.yaml b/tests/components/lc709203f/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/lc709203f/test.esp8266-ard.yaml +++ b/tests/components/lc709203f/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/lc709203f/test.rp2040-ard.yaml b/tests/components/lc709203f/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/lc709203f/test.rp2040-ard.yaml +++ b/tests/components/lc709203f/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/lcd_gpio/test.esp32-idf.yaml b/tests/components/lcd_gpio/test.esp32-idf.yaml index 9c2af456b5..93abad5e38 100644 --- a/tests/components/lcd_gpio/test.esp32-idf.yaml +++ b/tests/components/lcd_gpio/test.esp32-idf.yaml @@ -3,7 +3,7 @@ substitutions: d1_pin: GPIO13 d2_pin: GPIO14 d3_pin: GPIO15 - enable_pin: GPIO16 + enable_pin: GPIO4 rs_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/lcd_gpio/test.esp8266-ard.yaml b/tests/components/lcd_gpio/test.esp8266-ard.yaml index 9c2af456b5..50471a16f4 100644 --- a/tests/components/lcd_gpio/test.esp8266-ard.yaml +++ b/tests/components/lcd_gpio/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - d0_pin: GPIO12 - d1_pin: GPIO13 + d0_pin: GPIO0 + d1_pin: GPIO2 d2_pin: GPIO14 d3_pin: GPIO15 enable_pin: GPIO16 diff --git a/tests/components/lcd_menu/test.esp32-idf.yaml b/tests/components/lcd_menu/test.esp32-idf.yaml index 9c2af456b5..93abad5e38 100644 --- a/tests/components/lcd_menu/test.esp32-idf.yaml +++ b/tests/components/lcd_menu/test.esp32-idf.yaml @@ -3,7 +3,7 @@ substitutions: d1_pin: GPIO13 d2_pin: GPIO14 d3_pin: GPIO15 - enable_pin: GPIO16 + enable_pin: GPIO4 rs_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/lcd_menu/test.esp8266-ard.yaml b/tests/components/lcd_menu/test.esp8266-ard.yaml index 9c2af456b5..50471a16f4 100644 --- a/tests/components/lcd_menu/test.esp8266-ard.yaml +++ b/tests/components/lcd_menu/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - d0_pin: GPIO12 - d1_pin: GPIO13 + d0_pin: GPIO0 + d1_pin: GPIO2 d2_pin: GPIO14 d3_pin: GPIO15 enable_pin: GPIO16 diff --git a/tests/components/lcd_pcf8574/common.yaml b/tests/components/lcd_pcf8574/common.yaml index 8b03cf5497..1ec4400332 100644 --- a/tests/components/lcd_pcf8574/common.yaml +++ b/tests/components/lcd_pcf8574/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_lcd_pcf8574 - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: lcd_pcf8574 + i2c_id: i2c_bus dimensions: 18x4 address: 0x3F user_characters: diff --git a/tests/components/lcd_pcf8574/test.esp32-c3-idf.yaml b/tests/components/lcd_pcf8574/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/lcd_pcf8574/test.esp32-c3-idf.yaml +++ b/tests/components/lcd_pcf8574/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/lcd_pcf8574/test.esp32-idf.yaml b/tests/components/lcd_pcf8574/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/lcd_pcf8574/test.esp32-idf.yaml +++ b/tests/components/lcd_pcf8574/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/lcd_pcf8574/test.esp8266-ard.yaml b/tests/components/lcd_pcf8574/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/lcd_pcf8574/test.esp8266-ard.yaml +++ b/tests/components/lcd_pcf8574/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/lcd_pcf8574/test.rp2040-ard.yaml b/tests/components/lcd_pcf8574/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/lcd_pcf8574/test.rp2040-ard.yaml +++ b/tests/components/lcd_pcf8574/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ld2410/common.yaml b/tests/components/ld2410/common.yaml index e975fcf757..7d168bf7ec 100644 --- a/tests/components/ld2410/common.yaml +++ b/tests/components/ld2410/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_ld2410 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - ld2410: id: my_ld2410 diff --git a/tests/components/ld2410/test.esp32-c3-idf.yaml b/tests/components/ld2410/test.esp32-c3-idf.yaml index b516342f3b..7a8f790ed8 100644 --- a/tests/components/ld2410/test.esp32-c3-idf.yaml +++ b/tests/components/ld2410/test.esp32-c3-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ld2410/test.esp32-idf.yaml b/tests/components/ld2410/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/ld2410/test.esp32-idf.yaml +++ b/tests/components/ld2410/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ld2410/test.esp8266-ard.yaml b/tests/components/ld2410/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/ld2410/test.esp8266-ard.yaml +++ b/tests/components/ld2410/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ld2410/test.rp2040-ard.yaml b/tests/components/ld2410/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/ld2410/test.rp2040-ard.yaml +++ b/tests/components/ld2410/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ld2412/common.yaml b/tests/components/ld2412/common.yaml index 9176c61fd5..18c4612ffe 100644 --- a/tests/components/ld2412/common.yaml +++ b/tests/components/ld2412/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_ld2412 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - ld2412: id: my_ld2412 @@ -123,13 +117,13 @@ select: on_value: - delay: 3s - lambda: |- - id(uart_ld2412).flush(); + id(uart_bus).flush(); uint32_t new_baud_rate = stoi(x); - ESP_LOGD("change_baud_rate", "Changing baud rate from %i to %i",id(uart_ld2412).get_baud_rate(), new_baud_rate); - if (id(uart_ld2412).get_baud_rate() != new_baud_rate) { - id(uart_ld2412).set_baud_rate(new_baud_rate); + ESP_LOGD("change_baud_rate", "Changing baud rate from %i to %i",id(uart_bus).get_baud_rate(), new_baud_rate); + if (id(uart_bus).get_baud_rate() != new_baud_rate) { + id(uart_bus).set_baud_rate(new_baud_rate); #if defined(USE_ESP8266) || defined(USE_ESP32) - id(uart_ld2412).load_settings(); + id(uart_bus).load_settings(); #endif } diff --git a/tests/components/ld2412/test.esp32-c3-idf.yaml b/tests/components/ld2412/test.esp32-c3-idf.yaml index b516342f3b..7a8f790ed8 100644 --- a/tests/components/ld2412/test.esp32-c3-idf.yaml +++ b/tests/components/ld2412/test.esp32-c3-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ld2412/test.esp32-idf.yaml b/tests/components/ld2412/test.esp32-idf.yaml index f486544afa..2d29656c94 100644 --- a/tests/components/ld2412/test.esp32-idf.yaml +++ b/tests/components/ld2412/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ld2412/test.esp8266-ard.yaml b/tests/components/ld2412/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/ld2412/test.esp8266-ard.yaml +++ b/tests/components/ld2412/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ld2412/test.rp2040-ard.yaml b/tests/components/ld2412/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/ld2412/test.rp2040-ard.yaml +++ b/tests/components/ld2412/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ld2420/common.yaml b/tests/components/ld2420/common.yaml index 76748aa8f0..1539df4d1b 100644 --- a/tests/components/ld2420/common.yaml +++ b/tests/components/ld2420/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_ld2420 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - ld2420: id: my_ld2420 diff --git a/tests/components/ld2420/test.esp32-c3-idf.yaml b/tests/components/ld2420/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/ld2420/test.esp32-c3-idf.yaml +++ b/tests/components/ld2420/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ld2420/test.esp32-idf.yaml b/tests/components/ld2420/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/ld2420/test.esp32-idf.yaml +++ b/tests/components/ld2420/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ld2420/test.esp8266-ard.yaml b/tests/components/ld2420/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/ld2420/test.esp8266-ard.yaml +++ b/tests/components/ld2420/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ld2420/test.rp2040-ard.yaml b/tests/components/ld2420/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/ld2420/test.rp2040-ard.yaml +++ b/tests/components/ld2420/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ld2450/common.yaml b/tests/components/ld2450/common.yaml index c18bed46b0..9dcefffd09 100644 --- a/tests/components/ld2450/common.yaml +++ b/tests/components/ld2450/common.yaml @@ -1,14 +1,5 @@ -uart: - - id: ld2450_uart - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 256000 - parity: NONE - stop_bits: 1 - ld2450: - id: ld2450_radar - uart_id: ld2450_uart button: - platform: ld2450 diff --git a/tests/components/ld2450/test.esp32-c3-idf.yaml b/tests/components/ld2450/test.esp32-c3-idf.yaml index b516342f3b..7a8f790ed8 100644 --- a/tests/components/ld2450/test.esp32-c3-idf.yaml +++ b/tests/components/ld2450/test.esp32-c3-idf.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ld2450/test.esp32-idf.yaml b/tests/components/ld2450/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/ld2450/test.esp32-idf.yaml +++ b/tests/components/ld2450/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ld2450/test.esp8266-ard.yaml b/tests/components/ld2450/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/ld2450/test.esp8266-ard.yaml +++ b/tests/components/ld2450/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ld2450/test.rp2040-ard.yaml b/tests/components/ld2450/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/ld2450/test.rp2040-ard.yaml +++ b/tests/components/ld2450/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/lilygo_t5_47/common.yaml b/tests/components/lilygo_t5_47/common.yaml index f539c58d74..7079139ec7 100644 --- a/tests/components/lilygo_t5_47/common.yaml +++ b/tests/components/lilygo_t5_47/common.yaml @@ -1,20 +1,17 @@ -i2c: - - id: i2c_lilygo_t5_47 - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c + i2c_id: i2c_bus id: ssd1306_display model: SSD1306_128X64 reset_pin: ${reset_pin} pages: - - id: page1 + - id: lilygo_t5_47_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: lilygo_t5_47 + i2c_id: i2c_bus id: lilygo_touchscreen interrupt_pin: ${interrupt_pin} display: ssd1306_display diff --git a/tests/components/lilygo_t5_47/test.esp32-c3-idf.yaml b/tests/components/lilygo_t5_47/test.esp32-c3-idf.yaml index 061a98ce24..febf38d8e1 100644 --- a/tests/components/lilygo_t5_47/test.esp32-c3-idf.yaml +++ b/tests/components/lilygo_t5_47/test.esp32-c3-idf.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO0 - sda_pin: GPIO1 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/lilygo_t5_47/test.esp32-idf.yaml b/tests/components/lilygo_t5_47/test.esp32-idf.yaml index 342f0b6d8b..590f6a919c 100644 --- a/tests/components/lilygo_t5_47/test.esp32-idf.yaml +++ b/tests/components/lilygo_t5_47/test.esp32-idf.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO13 - sda_pin: GPIO14 interrupt_pin: GPIO15 - reset_pin: GPIO16 + reset_pin: GPIO4 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/lilygo_t5_47/test.esp8266-ard.yaml b/tests/components/lilygo_t5_47/test.esp8266-ard.yaml index b446a75f13..3684d5e77b 100644 --- a/tests/components/lilygo_t5_47/test.esp8266-ard.yaml +++ b/tests/components/lilygo_t5_47/test.esp8266-ard.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 - interrupt_pin: GPIO12 + interrupt_pin: GPIO15 reset_pin: GPIO16 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/lilygo_t5_47/test.rp2040-ard.yaml b/tests/components/lilygo_t5_47/test.rp2040-ard.yaml index 061a98ce24..2dd70ff33a 100644 --- a/tests/components/lilygo_t5_47/test.rp2040-ard.yaml +++ b/tests/components/lilygo_t5_47/test.rp2040-ard.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO0 - sda_pin: GPIO1 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/lm75b/common.yaml b/tests/components/lm75b/common.yaml index e451c2f679..39c39ed8dc 100644 --- a/tests/components/lm75b/common.yaml +++ b/tests/components/lm75b/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_lm75b - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: lm75b + i2c_id: i2c_bus name: LM75B Temperature update_interval: 30s diff --git a/tests/components/lm75b/test.esp32-c3-idf.yaml b/tests/components/lm75b/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/lm75b/test.esp32-c3-idf.yaml +++ b/tests/components/lm75b/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/lm75b/test.esp32-idf.yaml b/tests/components/lm75b/test.esp32-idf.yaml index 43264df633..b47e39c389 100644 --- a/tests/components/lm75b/test.esp32-idf.yaml +++ b/tests/components/lm75b/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO15 - sda_pin: GPIO13 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/lm75b/test.esp8266-ard.yaml b/tests/components/lm75b/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/lm75b/test.esp8266-ard.yaml +++ b/tests/components/lm75b/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/lm75b/test.rp2040-ard.yaml b/tests/components/lm75b/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/lm75b/test.rp2040-ard.yaml +++ b/tests/components/lm75b/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/lock/common.yaml b/tests/components/lock/common.yaml index 67da46653c..1ee88a239a 100644 --- a/tests/components/lock/common.yaml +++ b/tests/components/lock/common.yaml @@ -27,7 +27,9 @@ lock: id: test_lock1 state: !lambda "return LOCK_STATE_UNLOCKED;" on_lock: - - lock.template.publish: LOCKED + - lock.template.publish: + id: test_lock1 + state: LOCKED - platform: output name: Generic Output Lock id: test_lock2 diff --git a/tests/components/lps22/common.yaml b/tests/components/lps22/common.yaml index e6de4752ba..026b3620cd 100644 --- a/tests/components/lps22/common.yaml +++ b/tests/components/lps22/common.yaml @@ -1,5 +1,6 @@ sensor: - platform: lps22 + i2c_id: i2c_bus address: 0x5d update_interval: 10s temperature: diff --git a/tests/components/lps22/test.esp32-c3-idf.yaml b/tests/components/lps22/test.esp32-c3-idf.yaml index 6091393d31..9990d96d29 100644 --- a/tests/components/lps22/test.esp32-c3-idf.yaml +++ b/tests/components/lps22/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_lps22 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/lps22/test.esp32-idf.yaml b/tests/components/lps22/test.esp32-idf.yaml index 0da6a9577e..b47e39c389 100644 --- a/tests/components/lps22/test.esp32-idf.yaml +++ b/tests/components/lps22/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_lps22 - scl: 16 - sda: 17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/lps22/test.esp8266-ard.yaml b/tests/components/lps22/test.esp8266-ard.yaml index 6091393d31..4a98b9388a 100644 --- a/tests/components/lps22/test.esp8266-ard.yaml +++ b/tests/components/lps22/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_lps22 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/lps22/test.rp2040-ard.yaml b/tests/components/lps22/test.rp2040-ard.yaml index 6091393d31..319a7c71a6 100644 --- a/tests/components/lps22/test.rp2040-ard.yaml +++ b/tests/components/lps22/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_lps22 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ltr390/common.yaml b/tests/components/ltr390/common.yaml index e5e331e7ba..c168da557b 100644 --- a/tests/components/ltr390/common.yaml +++ b/tests/components/ltr390/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ltr390 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: ltr390 + i2c_id: i2c_bus uv: name: LTR390 UV 1 uv_index: @@ -19,6 +15,7 @@ sensor: address: 0x53 update_interval: 60s - platform: ltr390 + i2c_id: i2c_bus uv: name: LTR390 UV 2 uv_index: diff --git a/tests/components/ltr390/test.esp32-c3-idf.yaml b/tests/components/ltr390/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ltr390/test.esp32-c3-idf.yaml +++ b/tests/components/ltr390/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ltr390/test.esp32-idf.yaml b/tests/components/ltr390/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ltr390/test.esp32-idf.yaml +++ b/tests/components/ltr390/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ltr390/test.esp8266-ard.yaml b/tests/components/ltr390/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ltr390/test.esp8266-ard.yaml +++ b/tests/components/ltr390/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ltr390/test.rp2040-ard.yaml b/tests/components/ltr390/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ltr390/test.rp2040-ard.yaml +++ b/tests/components/ltr390/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ltr501/common.yaml b/tests/components/ltr501/common.yaml index b7074f52f2..77c6f13739 100644 --- a/tests/components/ltr501/common.yaml +++ b/tests/components/ltr501/common.yaml @@ -1,7 +1,6 @@ sensor: - platform: ltr501 address: 0x23 - i2c_id: i2c_ltr501 type: ALS_PS gain: 1X integration_time: 100ms diff --git a/tests/components/ltr501/test.esp32-c3-idf.yaml b/tests/components/ltr501/test.esp32-c3-idf.yaml index 9e7de2768d..72703301a1 100644 --- a/tests/components/ltr501/test.esp32-c3-idf.yaml +++ b/tests/components/ltr501/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ltr501 - scl: 5 - sda: 4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ltr501/test.esp32-idf.yaml b/tests/components/ltr501/test.esp32-idf.yaml index 4c710c74fe..7a5d01898a 100644 --- a/tests/components/ltr501/test.esp32-idf.yaml +++ b/tests/components/ltr501/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ltr501 - scl: 16 - sda: 17 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ltr501/test.esp8266-ard.yaml b/tests/components/ltr501/test.esp8266-ard.yaml index 9e7de2768d..9e23bb3778 100644 --- a/tests/components/ltr501/test.esp8266-ard.yaml +++ b/tests/components/ltr501/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ltr501 - scl: 5 - sda: 4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ltr501/test.rp2040-ard.yaml b/tests/components/ltr501/test.rp2040-ard.yaml index 9e7de2768d..a7eb30036f 100644 --- a/tests/components/ltr501/test.rp2040-ard.yaml +++ b/tests/components/ltr501/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_ltr501 - scl: 5 - sda: 4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ltr_als_ps/common.yaml b/tests/components/ltr_als_ps/common.yaml index aa5c8abed7..edad4b2e4f 100644 --- a/tests/components/ltr_als_ps/common.yaml +++ b/tests/components/ltr_als_ps/common.yaml @@ -1,7 +1,6 @@ sensor: - platform: ltr_als_ps address: 0x23 - i2c_id: i2c_als_ps gain: 1x integration_time: 100ms ps_cooldown: 5 s diff --git a/tests/components/ltr_als_ps/test.esp32-c3-idf.yaml b/tests/components/ltr_als_ps/test.esp32-c3-idf.yaml index d64d70f018..72703301a1 100644 --- a/tests/components/ltr_als_ps/test.esp32-c3-idf.yaml +++ b/tests/components/ltr_als_ps/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_als_ps - scl: 5 - sda: 4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ltr_als_ps/test.esp32-idf.yaml b/tests/components/ltr_als_ps/test.esp32-idf.yaml index 2349292a64..7a5d01898a 100644 --- a/tests/components/ltr_als_ps/test.esp32-idf.yaml +++ b/tests/components/ltr_als_ps/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_als_ps - scl: 16 - sda: 17 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ltr_als_ps/test.esp8266-ard.yaml b/tests/components/ltr_als_ps/test.esp8266-ard.yaml index d64d70f018..9e23bb3778 100644 --- a/tests/components/ltr_als_ps/test.esp8266-ard.yaml +++ b/tests/components/ltr_als_ps/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_als_ps - scl: 5 - sda: 4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ltr_als_ps/test.rp2040-ard.yaml b/tests/components/ltr_als_ps/test.rp2040-ard.yaml index d64d70f018..a7eb30036f 100644 --- a/tests/components/ltr_als_ps/test.rp2040-ard.yaml +++ b/tests/components/ltr_als_ps/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_als_ps - scl: 5 - sda: 4 +packages: + i2c_low_freq: !include ../../test_build_components/common/i2c_low_freq/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/lvgl/common.yaml b/tests/components/lvgl/common.yaml index a035900386..d9b7013a1e 100644 --- a/tests/components/lvgl/common.yaml +++ b/tests/components/lvgl/common.yaml @@ -1,5 +1,6 @@ touchscreen: - platform: ft63x6 + i2c_id: i2c_bus id: tft_touch display: tft_display update_interval: 50ms diff --git a/tests/components/lvgl/test.esp32-idf.yaml b/tests/components/lvgl/test.esp32-idf.yaml index eacace1d4b..6170b0f4fb 100644 --- a/tests/components/lvgl/test.esp32-idf.yaml +++ b/tests/components/lvgl/test.esp32-idf.yaml @@ -1,10 +1,7 @@ -spi: - clk_pin: 14 - mosi_pin: 13 - -i2c: - sda: GPIO18 - scl: GPIO19 +packages: + lvgl: !include lvgl-package.yaml + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml sensor: - platform: rotary_encoder @@ -25,6 +22,7 @@ binary_sensor: display: - platform: ili9xxx + spi_id: spi_bus model: st7789v id: second_display dimensions: @@ -44,6 +42,7 @@ display: update_interval: never - platform: ili9xxx + spi_id: spi_bus model: st7789v id: tft_display dimensions: @@ -60,9 +59,6 @@ display: invert_colors: false update_interval: never -packages: - lvgl: !include lvgl-package.yaml - lvgl: displays: - tft_display diff --git a/tests/components/m5stack_8angle/common.yaml b/tests/components/m5stack_8angle/common.yaml index d7f988ed3a..d0af24116c 100644 --- a/tests/components/m5stack_8angle/common.yaml +++ b/tests/components/m5stack_8angle/common.yaml @@ -1,10 +1,5 @@ -i2c: - sda: 0 - scl: 1 - id: bus_external - m5stack_8angle: - i2c_id: bus_external + i2c_id: i2c_bus id: m5stack_8angle_base light: diff --git a/tests/components/m5stack_8angle/test.esp32-c3-idf.yaml b/tests/components/m5stack_8angle/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/m5stack_8angle/test.esp32-c3-idf.yaml +++ b/tests/components/m5stack_8angle/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/m5stack_8angle/test.esp32-idf.yaml b/tests/components/m5stack_8angle/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/m5stack_8angle/test.esp32-idf.yaml +++ b/tests/components/m5stack_8angle/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/m5stack_8angle/test.esp8266-ard.yaml b/tests/components/m5stack_8angle/test.esp8266-ard.yaml index dade44d145..4a98b9388a 100644 --- a/tests/components/m5stack_8angle/test.esp8266-ard.yaml +++ b/tests/components/m5stack_8angle/test.esp8266-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/m5stack_8angle/test.rp2040-ard.yaml b/tests/components/m5stack_8angle/test.rp2040-ard.yaml index dade44d145..319a7c71a6 100644 --- a/tests/components/m5stack_8angle/test.rp2040-ard.yaml +++ b/tests/components/m5stack_8angle/test.rp2040-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mapping/test.esp32-c3-idf.yaml b/tests/components/mapping/test.esp32-c3-idf.yaml index f95dd4f30d..7911eb7edc 100644 --- a/tests/components/mapping/test.esp32-c3-idf.yaml +++ b/tests/components/mapping/test.esp32-c3-idf.yaml @@ -1,10 +1,9 @@ -spi: - - id: spi_main_lcd - clk_pin: 6 - mosi_pin: 7 - miso_pin: 5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + map: !include common.yaml display: + spi_id: spi_bus platform: ili9xxx id: main_lcd model: ili9342 @@ -12,6 +11,3 @@ display: dc_pin: 9 reset_pin: 10 invert_colors: false - -packages: - map: !include common.yaml diff --git a/tests/components/mapping/test.esp32-idf.yaml b/tests/components/mapping/test.esp32-idf.yaml index 231fdae797..a35b6940c7 100644 --- a/tests/components/mapping/test.esp32-idf.yaml +++ b/tests/components/mapping/test.esp32-idf.yaml @@ -1,10 +1,9 @@ -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 15 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + map: !include common.yaml display: + spi_id: spi_bus platform: ili9xxx id: main_lcd model: ili9342 @@ -12,6 +11,3 @@ display: dc_pin: 13 reset_pin: 21 invert_colors: false - -packages: - map: !include common.yaml diff --git a/tests/components/mapping/test.esp8266-ard.yaml b/tests/components/mapping/test.esp8266-ard.yaml index a5b45d391a..c59821a211 100644 --- a/tests/components/mapping/test.esp8266-ard.yaml +++ b/tests/components/mapping/test.esp8266-ard.yaml @@ -1,10 +1,9 @@ -spi: - - id: spi_main_lcd - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + map: !include common.yaml display: + spi_id: spi_bus platform: ili9xxx id: main_lcd model: ili9342 @@ -12,6 +11,3 @@ display: dc_pin: 15 reset_pin: 16 invert_colors: false - -packages: - map: !include common.yaml diff --git a/tests/components/mapping/test.rp2040-ard.yaml b/tests/components/mapping/test.rp2040-ard.yaml index f092686553..acc305a701 100644 --- a/tests/components/mapping/test.rp2040-ard.yaml +++ b/tests/components/mapping/test.rp2040-ard.yaml @@ -1,10 +1,9 @@ -spi: - - id: spi_main_lcd - clk_pin: 2 - mosi_pin: 3 - miso_pin: 4 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + map: !include common.yaml display: + spi_id: spi_bus platform: ili9xxx id: main_lcd model: ili9342 @@ -12,6 +11,3 @@ display: dc_pin: 21 reset_pin: 22 invert_colors: false - -packages: - map: !include common.yaml diff --git a/tests/components/max17043/common.yaml b/tests/components/max17043/common.yaml index c2f324212e..f58006c460 100644 --- a/tests/components/max17043/common.yaml +++ b/tests/components/max17043/common.yaml @@ -3,15 +3,10 @@ esphome: then: - max17043.sleep_mode: max17043_id -i2c: - - id: i2c_id - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: max17043 + i2c_id: i2c_bus id: max17043_id - i2c_id: i2c_id battery_voltage: name: "Battery Voltage" battery_level: diff --git a/tests/components/max17043/test.esp32-c3-idf.yaml b/tests/components/max17043/test.esp32-c3-idf.yaml index 9a1477d4b9..9990d96d29 100644 --- a/tests/components/max17043/test.esp32-c3-idf.yaml +++ b/tests/components/max17043/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO8 - scl_pin: GPIO10 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max17043/test.esp32-idf.yaml b/tests/components/max17043/test.esp32-idf.yaml index c6615f51cd..b47e39c389 100644 --- a/tests/components/max17043/test.esp32-idf.yaml +++ b/tests/components/max17043/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO21 - scl_pin: GPIO22 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/max17043/test.esp8266-ard.yaml b/tests/components/max17043/test.esp8266-ard.yaml index a87353b78b..4a98b9388a 100644 --- a/tests/components/max17043/test.esp8266-ard.yaml +++ b/tests/components/max17043/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO4 - scl_pin: GPIO5 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/max17043/test.rp2040-ard.yaml b/tests/components/max17043/test.rp2040-ard.yaml index c6615f51cd..319a7c71a6 100644 --- a/tests/components/max17043/test.rp2040-ard.yaml +++ b/tests/components/max17043/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO21 - scl_pin: GPIO22 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/max31855/common.yaml b/tests/components/max31855/common.yaml index 7136c597d5..905b111d71 100644 --- a/tests/components/max31855/common.yaml +++ b/tests/components/max31855/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_max31855 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: max31855 name: MAX31855 Temperature diff --git a/tests/components/max31855/test.esp32-c3-idf.yaml b/tests/components/max31855/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/max31855/test.esp32-c3-idf.yaml +++ b/tests/components/max31855/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max31855/test.esp32-idf.yaml b/tests/components/max31855/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/max31855/test.esp32-idf.yaml +++ b/tests/components/max31855/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/max31855/test.esp8266-ard.yaml b/tests/components/max31855/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/max31855/test.esp8266-ard.yaml +++ b/tests/components/max31855/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max31855/test.rp2040-ard.yaml b/tests/components/max31855/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/max31855/test.rp2040-ard.yaml +++ b/tests/components/max31855/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max31856/common.yaml b/tests/components/max31856/common.yaml index 4f7c3ad408..9d420662d7 100644 --- a/tests/components/max31856/common.yaml +++ b/tests/components/max31856/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_max31856 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: max31856 name: MAX31856 Temperature diff --git a/tests/components/max31856/test.esp32-c3-idf.yaml b/tests/components/max31856/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/max31856/test.esp32-c3-idf.yaml +++ b/tests/components/max31856/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max31856/test.esp32-idf.yaml b/tests/components/max31856/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/max31856/test.esp32-idf.yaml +++ b/tests/components/max31856/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/max31856/test.esp8266-ard.yaml b/tests/components/max31856/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/max31856/test.esp8266-ard.yaml +++ b/tests/components/max31856/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max31856/test.rp2040-ard.yaml b/tests/components/max31856/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/max31856/test.rp2040-ard.yaml +++ b/tests/components/max31856/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max31865/common.yaml b/tests/components/max31865/common.yaml index 5bb7bda5aa..6e71f17efc 100644 --- a/tests/components/max31865/common.yaml +++ b/tests/components/max31865/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_max31865 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: max31865 name: MAX31865 Temperature diff --git a/tests/components/max31865/test.esp32-c3-idf.yaml b/tests/components/max31865/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/max31865/test.esp32-c3-idf.yaml +++ b/tests/components/max31865/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max31865/test.esp32-idf.yaml b/tests/components/max31865/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/max31865/test.esp32-idf.yaml +++ b/tests/components/max31865/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/max31865/test.esp8266-ard.yaml b/tests/components/max31865/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/max31865/test.esp8266-ard.yaml +++ b/tests/components/max31865/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max31865/test.rp2040-ard.yaml b/tests/components/max31865/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/max31865/test.rp2040-ard.yaml +++ b/tests/components/max31865/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max44009/common.yaml b/tests/components/max44009/common.yaml index ef51740895..523387e1cc 100644 --- a/tests/components/max44009/common.yaml +++ b/tests/components/max44009/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_max44009 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: max44009 + i2c_id: i2c_bus name: MAX44009 Brightness internal: true mode: low_power diff --git a/tests/components/max44009/test.esp32-c3-idf.yaml b/tests/components/max44009/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/max44009/test.esp32-c3-idf.yaml +++ b/tests/components/max44009/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max44009/test.esp32-idf.yaml b/tests/components/max44009/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/max44009/test.esp32-idf.yaml +++ b/tests/components/max44009/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/max44009/test.esp8266-ard.yaml b/tests/components/max44009/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/max44009/test.esp8266-ard.yaml +++ b/tests/components/max44009/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/max44009/test.rp2040-ard.yaml b/tests/components/max44009/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/max44009/test.rp2040-ard.yaml +++ b/tests/components/max44009/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/max6675/common.yaml b/tests/components/max6675/common.yaml index 5b4e04b317..31a4e7035a 100644 --- a/tests/components/max6675/common.yaml +++ b/tests/components/max6675/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_max6675 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sensor: - platform: max6675 name: Temperature diff --git a/tests/components/max6675/test.esp32-c3-idf.yaml b/tests/components/max6675/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/max6675/test.esp32-c3-idf.yaml +++ b/tests/components/max6675/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max6675/test.esp32-idf.yaml b/tests/components/max6675/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/max6675/test.esp32-idf.yaml +++ b/tests/components/max6675/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/max6675/test.esp8266-ard.yaml b/tests/components/max6675/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/max6675/test.esp8266-ard.yaml +++ b/tests/components/max6675/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max6675/test.rp2040-ard.yaml b/tests/components/max6675/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/max6675/test.rp2040-ard.yaml +++ b/tests/components/max6675/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max6956/common.yaml b/tests/components/max6956/common.yaml index e44e3464f8..665a606027 100644 --- a/tests/components/max6956/common.yaml +++ b/tests/components/max6956/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_max6956 - scl: ${scl_pin} - sda: ${sda_pin} - max6956: - id: max6956_1 + i2c_id: i2c_bus address: 0x40 binary_sensor: diff --git a/tests/components/max6956/test.esp32-c3-idf.yaml b/tests/components/max6956/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/max6956/test.esp32-c3-idf.yaml +++ b/tests/components/max6956/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max6956/test.esp32-idf.yaml b/tests/components/max6956/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/max6956/test.esp32-idf.yaml +++ b/tests/components/max6956/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/max6956/test.esp8266-ard.yaml b/tests/components/max6956/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/max6956/test.esp8266-ard.yaml +++ b/tests/components/max6956/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/max6956/test.rp2040-ard.yaml b/tests/components/max6956/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/max6956/test.rp2040-ard.yaml +++ b/tests/components/max6956/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/max7219/common.yaml b/tests/components/max7219/common.yaml index 0060db191e..5d7f54af17 100644 --- a/tests/components/max7219/common.yaml +++ b/tests/components/max7219/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_max6675 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - display: - platform: max7219 cs_pin: ${cs_pin} diff --git a/tests/components/max7219/test.esp32-c3-idf.yaml b/tests/components/max7219/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/max7219/test.esp32-c3-idf.yaml +++ b/tests/components/max7219/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max7219/test.esp32-idf.yaml b/tests/components/max7219/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/max7219/test.esp32-idf.yaml +++ b/tests/components/max7219/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/max7219/test.esp8266-ard.yaml b/tests/components/max7219/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/max7219/test.esp8266-ard.yaml +++ b/tests/components/max7219/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max7219/test.rp2040-ard.yaml b/tests/components/max7219/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/max7219/test.rp2040-ard.yaml +++ b/tests/components/max7219/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max7219digit/common.yaml b/tests/components/max7219digit/common.yaml index 84edc7eb3d..525b7b8d3e 100644 --- a/tests/components/max7219digit/common.yaml +++ b/tests/components/max7219digit/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_max7219digit - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - display: - platform: max7219digit cs_pin: ${cs_pin} diff --git a/tests/components/max7219digit/test.esp32-c3-idf.yaml b/tests/components/max7219digit/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/max7219digit/test.esp32-c3-idf.yaml +++ b/tests/components/max7219digit/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max7219digit/test.esp32-idf.yaml b/tests/components/max7219digit/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/max7219digit/test.esp32-idf.yaml +++ b/tests/components/max7219digit/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/max7219digit/test.esp8266-ard.yaml b/tests/components/max7219digit/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/max7219digit/test.esp8266-ard.yaml +++ b/tests/components/max7219digit/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max7219digit/test.rp2040-ard.yaml b/tests/components/max7219digit/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/max7219digit/test.rp2040-ard.yaml +++ b/tests/components/max7219digit/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/max9611/common.yaml b/tests/components/max9611/common.yaml index c3c00fdf85..ca9ee59038 100644 --- a/tests/components/max9611/common.yaml +++ b/tests/components/max9611/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_max9611 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: max9611 + i2c_id: i2c_bus shunt_resistance: 0.2 ohm gain: 1X voltage: diff --git a/tests/components/max9611/test.esp32-c3-idf.yaml b/tests/components/max9611/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/max9611/test.esp32-c3-idf.yaml +++ b/tests/components/max9611/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/max9611/test.esp32-idf.yaml b/tests/components/max9611/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/max9611/test.esp32-idf.yaml +++ b/tests/components/max9611/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/max9611/test.esp8266-ard.yaml b/tests/components/max9611/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/max9611/test.esp8266-ard.yaml +++ b/tests/components/max9611/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/max9611/test.rp2040-ard.yaml b/tests/components/max9611/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/max9611/test.rp2040-ard.yaml +++ b/tests/components/max9611/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23008/common.yaml b/tests/components/mcp23008/common.yaml index 1954766d25..4a407adfd8 100644 --- a/tests/components/mcp23008/common.yaml +++ b/tests/components/mcp23008/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_mcp23008 - scl: ${scl_pin} - sda: ${sda_pin} - mcp23008: + i2c_id: i2c_bus id: mcp23008_hub binary_sensor: diff --git a/tests/components/mcp23008/test.esp32-c3-idf.yaml b/tests/components/mcp23008/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp23008/test.esp32-c3-idf.yaml +++ b/tests/components/mcp23008/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp23008/test.esp32-idf.yaml b/tests/components/mcp23008/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp23008/test.esp32-idf.yaml +++ b/tests/components/mcp23008/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp23008/test.esp8266-ard.yaml b/tests/components/mcp23008/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp23008/test.esp8266-ard.yaml +++ b/tests/components/mcp23008/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23008/test.rp2040-ard.yaml b/tests/components/mcp23008/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp23008/test.rp2040-ard.yaml +++ b/tests/components/mcp23008/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23016/common.yaml b/tests/components/mcp23016/common.yaml index 109cb34b21..e8e3ad9d08 100644 --- a/tests/components/mcp23016/common.yaml +++ b/tests/components/mcp23016/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_mcp23016 - scl: ${scl_pin} - sda: ${sda_pin} - mcp23016: + i2c_id: i2c_bus id: mcp23016_hub binary_sensor: diff --git a/tests/components/mcp23016/test.esp32-c3-idf.yaml b/tests/components/mcp23016/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp23016/test.esp32-c3-idf.yaml +++ b/tests/components/mcp23016/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp23016/test.esp32-idf.yaml b/tests/components/mcp23016/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp23016/test.esp32-idf.yaml +++ b/tests/components/mcp23016/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp23016/test.esp8266-ard.yaml b/tests/components/mcp23016/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp23016/test.esp8266-ard.yaml +++ b/tests/components/mcp23016/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23016/test.rp2040-ard.yaml b/tests/components/mcp23016/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp23016/test.rp2040-ard.yaml +++ b/tests/components/mcp23016/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23017/common.yaml b/tests/components/mcp23017/common.yaml index 74949bba76..54a97e911f 100644 --- a/tests/components/mcp23017/common.yaml +++ b/tests/components/mcp23017/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_mcp23017 - scl: ${scl_pin} - sda: ${sda_pin} - mcp23017: + i2c_id: i2c_bus id: mcp23017_hub binary_sensor: diff --git a/tests/components/mcp23017/test.esp32-c3-idf.yaml b/tests/components/mcp23017/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp23017/test.esp32-c3-idf.yaml +++ b/tests/components/mcp23017/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp23017/test.esp32-idf.yaml b/tests/components/mcp23017/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp23017/test.esp32-idf.yaml +++ b/tests/components/mcp23017/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp23017/test.esp8266-ard.yaml b/tests/components/mcp23017/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp23017/test.esp8266-ard.yaml +++ b/tests/components/mcp23017/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23017/test.rp2040-ard.yaml b/tests/components/mcp23017/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp23017/test.rp2040-ard.yaml +++ b/tests/components/mcp23017/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp23s08/common.yaml b/tests/components/mcp23s08/common.yaml index b89088fe15..2170ae0459 100644 --- a/tests/components/mcp23s08/common.yaml +++ b/tests/components/mcp23s08/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_mcp23s08 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - mcp23s08: - id: mcp23s08_hub cs_pin: ${cs_pin} diff --git a/tests/components/mcp23s08/test.esp32-c3-idf.yaml b/tests/components/mcp23s08/test.esp32-c3-idf.yaml index 2415ba5dc6..b11ec9cdc6 100644 --- a/tests/components/mcp23s08/test.esp32-c3-idf.yaml +++ b/tests/components/mcp23s08/test.esp32-c3-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s08/test.esp32-idf.yaml b/tests/components/mcp23s08/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/mcp23s08/test.esp32-idf.yaml +++ b/tests/components/mcp23s08/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s08/test.esp8266-ard.yaml b/tests/components/mcp23s08/test.esp8266-ard.yaml index dbd158d030..595f31046a 100644 --- a/tests/components/mcp23s08/test.esp8266-ard.yaml +++ b/tests/components/mcp23s08/test.esp8266-ard.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s08/test.rp2040-ard.yaml b/tests/components/mcp23s08/test.rp2040-ard.yaml index f6c3f1eeca..79ea6ce90b 100644 --- a/tests/components/mcp23s08/test.rp2040-ard.yaml +++ b/tests/components/mcp23s08/test.rp2040-ard.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO2 - mosi_pin: GPIO3 - miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s17/common.yaml b/tests/components/mcp23s17/common.yaml index 3fb27ef625..a89beeb16b 100644 --- a/tests/components/mcp23s17/common.yaml +++ b/tests/components/mcp23s17/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_mcp23s17 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - mcp23s17: - id: mcp23s17_hub cs_pin: ${cs_pin} diff --git a/tests/components/mcp23s17/test.esp32-c3-idf.yaml b/tests/components/mcp23s17/test.esp32-c3-idf.yaml index 2415ba5dc6..b11ec9cdc6 100644 --- a/tests/components/mcp23s17/test.esp32-c3-idf.yaml +++ b/tests/components/mcp23s17/test.esp32-c3-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s17/test.esp32-idf.yaml b/tests/components/mcp23s17/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/mcp23s17/test.esp32-idf.yaml +++ b/tests/components/mcp23s17/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s17/test.esp8266-ard.yaml b/tests/components/mcp23s17/test.esp8266-ard.yaml index dbd158d030..595f31046a 100644 --- a/tests/components/mcp23s17/test.esp8266-ard.yaml +++ b/tests/components/mcp23s17/test.esp8266-ard.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp23s17/test.rp2040-ard.yaml b/tests/components/mcp23s17/test.rp2040-ard.yaml index f6c3f1eeca..79ea6ce90b 100644 --- a/tests/components/mcp23s17/test.rp2040-ard.yaml +++ b/tests/components/mcp23s17/test.rp2040-ard.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO2 - mosi_pin: GPIO3 - miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp2515/common.yaml b/tests/components/mcp2515/common.yaml index 96a72a3ec3..15639df5fe 100644 --- a/tests/components/mcp2515/common.yaml +++ b/tests/components/mcp2515/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_mcp2515 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - canbus: - platform: mcp2515 id: mcp2515_can diff --git a/tests/components/mcp2515/test.esp32-c3-idf.yaml b/tests/components/mcp2515/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/mcp2515/test.esp32-c3-idf.yaml +++ b/tests/components/mcp2515/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp2515/test.esp32-idf.yaml b/tests/components/mcp2515/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/mcp2515/test.esp32-idf.yaml +++ b/tests/components/mcp2515/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp2515/test.esp8266-ard.yaml b/tests/components/mcp2515/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/mcp2515/test.esp8266-ard.yaml +++ b/tests/components/mcp2515/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp2515/test.rp2040-ard.yaml b/tests/components/mcp2515/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/mcp2515/test.rp2040-ard.yaml +++ b/tests/components/mcp2515/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp3008/common.yaml b/tests/components/mcp3008/common.yaml index 646d3a20e9..57d0155f73 100644 --- a/tests/components/mcp3008/common.yaml +++ b/tests/components/mcp3008/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_mcp3008 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - mcp3008: - id: mcp3008_hub cs_pin: ${cs_pin} diff --git a/tests/components/mcp3008/test.esp32-c3-idf.yaml b/tests/components/mcp3008/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/mcp3008/test.esp32-c3-idf.yaml +++ b/tests/components/mcp3008/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp3008/test.esp32-idf.yaml b/tests/components/mcp3008/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/mcp3008/test.esp32-idf.yaml +++ b/tests/components/mcp3008/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp3008/test.esp8266-ard.yaml b/tests/components/mcp3008/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/mcp3008/test.esp8266-ard.yaml +++ b/tests/components/mcp3008/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp3008/test.rp2040-ard.yaml b/tests/components/mcp3008/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/mcp3008/test.rp2040-ard.yaml +++ b/tests/components/mcp3008/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp3204/common.yaml b/tests/components/mcp3204/common.yaml index f102500c81..eca6ec44f4 100644 --- a/tests/components/mcp3204/common.yaml +++ b/tests/components/mcp3204/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_mcp3204 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - mcp3204: - id: mcp3204_hub cs_pin: ${cs_pin} diff --git a/tests/components/mcp3204/test.esp32-c3-idf.yaml b/tests/components/mcp3204/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/mcp3204/test.esp32-c3-idf.yaml +++ b/tests/components/mcp3204/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp3204/test.esp32-idf.yaml b/tests/components/mcp3204/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/mcp3204/test.esp32-idf.yaml +++ b/tests/components/mcp3204/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mcp3204/test.esp8266-ard.yaml b/tests/components/mcp3204/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/mcp3204/test.esp8266-ard.yaml +++ b/tests/components/mcp3204/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp3204/test.rp2040-ard.yaml b/tests/components/mcp3204/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/mcp3204/test.rp2040-ard.yaml +++ b/tests/components/mcp3204/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mcp4461/common.yaml b/tests/components/mcp4461/common.yaml index ce1866fdb8..92fd789dcb 100644 --- a/tests/components/mcp4461/common.yaml +++ b/tests/components/mcp4461/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mcp4461 - sda: ${sda_pin} - scl: ${scl_pin} - mcp4461: - id: mcp4461_digipot_01 + i2c_id: i2c_bus output: - platform: mcp4461 diff --git a/tests/components/mcp4461/test.esp32-c3-idf.yaml b/tests/components/mcp4461/test.esp32-c3-idf.yaml index a87353b78b..9990d96d29 100644 --- a/tests/components/mcp4461/test.esp32-c3-idf.yaml +++ b/tests/components/mcp4461/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO4 - scl_pin: GPIO5 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp4461/test.esp32-idf.yaml b/tests/components/mcp4461/test.esp32-idf.yaml index c5deb7ca0a..b47e39c389 100644 --- a/tests/components/mcp4461/test.esp32-idf.yaml +++ b/tests/components/mcp4461/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO16 - scl_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp4461/test.esp8266-ard.yaml b/tests/components/mcp4461/test.esp8266-ard.yaml index a87353b78b..4a98b9388a 100644 --- a/tests/components/mcp4461/test.esp8266-ard.yaml +++ b/tests/components/mcp4461/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - sda_pin: GPIO4 - scl_pin: GPIO5 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp4725/common.yaml b/tests/components/mcp4725/common.yaml index 0ccc649f2e..871c2805a3 100644 --- a/tests/components/mcp4725/common.yaml +++ b/tests/components/mcp4725/common.yaml @@ -1,8 +1,3 @@ -i2c: - - id: i2c_mcp4725 - scl: ${scl_pin} - sda: ${sda_pin} - output: - platform: mcp4725 id: mcp4725_dac_output diff --git a/tests/components/mcp4725/test.esp32-c3-idf.yaml b/tests/components/mcp4725/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp4725/test.esp32-c3-idf.yaml +++ b/tests/components/mcp4725/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp4725/test.esp32-idf.yaml b/tests/components/mcp4725/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp4725/test.esp32-idf.yaml +++ b/tests/components/mcp4725/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp4725/test.esp8266-ard.yaml b/tests/components/mcp4725/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp4725/test.esp8266-ard.yaml +++ b/tests/components/mcp4725/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp4725/test.rp2040-ard.yaml b/tests/components/mcp4725/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp4725/test.rp2040-ard.yaml +++ b/tests/components/mcp4725/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp4728/common.yaml b/tests/components/mcp4728/common.yaml index b42818e4e6..e60f4795e1 100644 --- a/tests/components/mcp4728/common.yaml +++ b/tests/components/mcp4728/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mcp4728 - scl: ${scl_pin} - sda: ${sda_pin} - mcp4728: - id: mcp4728_dac + i2c_id: i2c_bus output: - platform: mcp4728 diff --git a/tests/components/mcp4728/test.esp32-c3-idf.yaml b/tests/components/mcp4728/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp4728/test.esp32-c3-idf.yaml +++ b/tests/components/mcp4728/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp4728/test.esp32-idf.yaml b/tests/components/mcp4728/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp4728/test.esp32-idf.yaml +++ b/tests/components/mcp4728/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp4728/test.esp8266-ard.yaml b/tests/components/mcp4728/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp4728/test.esp8266-ard.yaml +++ b/tests/components/mcp4728/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp4728/test.rp2040-ard.yaml b/tests/components/mcp4728/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp4728/test.rp2040-ard.yaml +++ b/tests/components/mcp4728/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp47a1/common.yaml b/tests/components/mcp47a1/common.yaml index 59e28d37b3..3448fcfb31 100644 --- a/tests/components/mcp47a1/common.yaml +++ b/tests/components/mcp47a1/common.yaml @@ -1,8 +1,3 @@ -i2c: - - id: i2c_mcp47a1 - scl: ${scl_pin} - sda: ${sda_pin} - output: - platform: mcp47a1 id: output_mcp47a1 diff --git a/tests/components/mcp47a1/test.esp32-c3-idf.yaml b/tests/components/mcp47a1/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp47a1/test.esp32-c3-idf.yaml +++ b/tests/components/mcp47a1/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp47a1/test.esp32-idf.yaml b/tests/components/mcp47a1/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp47a1/test.esp32-idf.yaml +++ b/tests/components/mcp47a1/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp47a1/test.esp8266-ard.yaml b/tests/components/mcp47a1/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp47a1/test.esp8266-ard.yaml +++ b/tests/components/mcp47a1/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp47a1/test.rp2040-ard.yaml b/tests/components/mcp47a1/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp47a1/test.rp2040-ard.yaml +++ b/tests/components/mcp47a1/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp9600/common.yaml b/tests/components/mcp9600/common.yaml index e3c9df79e4..33e33d183e 100644 --- a/tests/components/mcp9600/common.yaml +++ b/tests/components/mcp9600/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mcp9600 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mcp9600 + i2c_id: i2c_bus thermocouple_type: K hot_junction: name: Thermocouple Temperature diff --git a/tests/components/mcp9600/test.esp32-c3-idf.yaml b/tests/components/mcp9600/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp9600/test.esp32-c3-idf.yaml +++ b/tests/components/mcp9600/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp9600/test.esp32-idf.yaml b/tests/components/mcp9600/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp9600/test.esp32-idf.yaml +++ b/tests/components/mcp9600/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp9600/test.esp8266-ard.yaml b/tests/components/mcp9600/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp9600/test.esp8266-ard.yaml +++ b/tests/components/mcp9600/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp9600/test.rp2040-ard.yaml b/tests/components/mcp9600/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp9600/test.rp2040-ard.yaml +++ b/tests/components/mcp9600/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp9808/common.yaml b/tests/components/mcp9808/common.yaml index ccfd5d13ce..86d0661552 100644 --- a/tests/components/mcp9808/common.yaml +++ b/tests/components/mcp9808/common.yaml @@ -1,8 +1,4 @@ -i2c: - - id: i2c_mcp9808 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mcp9808 + i2c_id: i2c_bus name: MCP9808 Temperature diff --git a/tests/components/mcp9808/test.esp32-c3-idf.yaml b/tests/components/mcp9808/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mcp9808/test.esp32-c3-idf.yaml +++ b/tests/components/mcp9808/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp9808/test.esp32-idf.yaml b/tests/components/mcp9808/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mcp9808/test.esp32-idf.yaml +++ b/tests/components/mcp9808/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mcp9808/test.esp8266-ard.yaml b/tests/components/mcp9808/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mcp9808/test.esp8266-ard.yaml +++ b/tests/components/mcp9808/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mcp9808/test.rp2040-ard.yaml b/tests/components/mcp9808/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mcp9808/test.rp2040-ard.yaml +++ b/tests/components/mcp9808/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mhz19/common.yaml b/tests/components/mhz19/common.yaml index 8b7e732068..94989fecbe 100644 --- a/tests/components/mhz19/common.yaml +++ b/tests/components/mhz19/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_mhz19 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: mhz19 co2: diff --git a/tests/components/mhz19/test.esp32-c3-idf.yaml b/tests/components/mhz19/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/mhz19/test.esp32-c3-idf.yaml +++ b/tests/components/mhz19/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mhz19/test.esp32-idf.yaml b/tests/components/mhz19/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/mhz19/test.esp32-idf.yaml +++ b/tests/components/mhz19/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mhz19/test.esp8266-ard.yaml b/tests/components/mhz19/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/mhz19/test.esp8266-ard.yaml +++ b/tests/components/mhz19/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mhz19/test.rp2040-ard.yaml b/tests/components/mhz19/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/mhz19/test.rp2040-ard.yaml +++ b/tests/components/mhz19/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/micronova/common.yaml b/tests/components/micronova/common.yaml index 661c9330c6..3cf8e36fb6 100644 --- a/tests/components/micronova/common.yaml +++ b/tests/components/micronova/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_micronova - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - micronova: enable_rx_pin: ${enable_rx_pin} diff --git a/tests/components/micronova/test.esp32-c3-idf.yaml b/tests/components/micronova/test.esp32-c3-idf.yaml index 993071999f..eed876ae74 100644 --- a/tests/components/micronova/test.esp32-c3-idf.yaml +++ b/tests/components/micronova/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 enable_rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/micronova/test.esp32-idf.yaml b/tests/components/micronova/test.esp32-idf.yaml index 35d041e047..5cc3a234ca 100644 --- a/tests/components/micronova/test.esp32-idf.yaml +++ b/tests/components/micronova/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO12 - rx_pin: GPIO14 enable_rx_pin: GPIO13 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/micronova/test.esp8266-ard.yaml b/tests/components/micronova/test.esp8266-ard.yaml index 048fb82d72..ffe1e0a063 100644 --- a/tests/components/micronova/test.esp8266-ard.yaml +++ b/tests/components/micronova/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - enable_rx_pin: GPIO13 + enable_rx_pin: GPIO15 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/micronova/test.rp2040-ard.yaml b/tests/components/micronova/test.rp2040-ard.yaml index 993071999f..6dc030e6b6 100644 --- a/tests/components/micronova/test.rp2040-ard.yaml +++ b/tests/components/micronova/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 enable_rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/microphone/test.esp32-idf.yaml b/tests/components/microphone/test.esp32-idf.yaml index fe9feb9888..830f0156d7 100644 --- a/tests/components/microphone/test.esp32-idf.yaml +++ b/tests/components/microphone/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: i2s_bclk_pin: GPIO15 - i2s_lrclk_pin: GPIO16 - i2s_mclk_pin: GPIO17 + i2s_lrclk_pin: GPIO4 + i2s_mclk_pin: GPIO5 i2s_din_pin: GPIO33 i2s_audio: diff --git a/tests/components/mics_4514/common.yaml b/tests/components/mics_4514/common.yaml index 0bc3f3e654..3c1d264680 100644 --- a/tests/components/mics_4514/common.yaml +++ b/tests/components/mics_4514/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mics_4514 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mics_4514 + i2c_id: i2c_bus update_interval: 60s nitrogen_dioxide: name: MICS-4514 NO2 diff --git a/tests/components/mics_4514/test.esp32-c3-idf.yaml b/tests/components/mics_4514/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mics_4514/test.esp32-c3-idf.yaml +++ b/tests/components/mics_4514/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mics_4514/test.esp32-idf.yaml b/tests/components/mics_4514/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mics_4514/test.esp32-idf.yaml +++ b/tests/components/mics_4514/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mics_4514/test.esp8266-ard.yaml b/tests/components/mics_4514/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mics_4514/test.esp8266-ard.yaml +++ b/tests/components/mics_4514/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mics_4514/test.rp2040-ard.yaml b/tests/components/mics_4514/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mics_4514/test.rp2040-ard.yaml +++ b/tests/components/mics_4514/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/midea/common.yaml b/tests/components/midea/common.yaml index 07385e29a1..a0909401ff 100644 --- a/tests/components/midea/common.yaml +++ b/tests/components/midea/common.yaml @@ -6,12 +6,6 @@ remote_transmitter: pin: ${pin} carrier_duty_percent: 50% -uart: - - id: uart_midea - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - climate: - platform: midea id: midea_unit diff --git a/tests/components/midea/test.esp32-ard.yaml b/tests/components/midea/test.esp32-ard.yaml index 7f55d6a52d..b78163199a 100644 --- a/tests/components/midea/test.esp32-ard.yaml +++ b/tests/components/midea/test.esp32-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO12 - rx_pin: GPIO14 pin: GPIO2 +packages: + uart: !include ../../test_build_components/common/uart/esp32-ard.yaml + <<: !include common.yaml diff --git a/tests/components/midea/test.esp8266-ard.yaml b/tests/components/midea/test.esp8266-ard.yaml index 4f50bd7e5e..dc276e274c 100644 --- a/tests/components/midea/test.esp8266-ard.yaml +++ b/tests/components/midea/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 pin: GPIO15 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mipi_dsi/test.esp32-p4-idf.yaml b/tests/components/mipi_dsi/test.esp32-p4-idf.yaml index 9c4eb07d9b..770b11d089 100644 --- a/tests/components/mipi_dsi/test.esp32-p4-idf.yaml +++ b/tests/components/mipi_dsi/test.esp32-p4-idf.yaml @@ -1,3 +1,6 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-p4-idf.yaml + esp_ldo: - id: ldo_id channel: 3 @@ -13,9 +16,3 @@ display: #id: backlight_id psram: - -i2c: - sda: GPIO7 - scl: GPIO8 - scan: true - frequency: 400kHz diff --git a/tests/components/mipi_rgb/test.esp32-s3-idf.yaml b/tests/components/mipi_rgb/test.esp32-s3-idf.yaml index 8d0e20d6f5..29f833c235 100644 --- a/tests/components/mipi_rgb/test.esp32-s3-idf.yaml +++ b/tests/components/mipi_rgb/test.esp32-s3-idf.yaml @@ -1,16 +1,12 @@ +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml + psram: mode: octal -spi: - - clk_pin: - number: 47 - allow_other_uses: true - mosi_pin: - number: 41 - allow_other_uses: true - display: - platform: mipi_rgb + spi_id: spi_bus model: ZX2D10GE01R-V4848 update_interval: 1s color_order: BGR diff --git a/tests/components/mipi_spi/common.yaml b/tests/components/mipi_spi/common.yaml index 2c84489ec7..03f807f53c 100644 --- a/tests/components/mipi_spi/common.yaml +++ b/tests/components/mipi_spi/common.yaml @@ -1,11 +1,3 @@ -spi: - - id: spi_single - clk_pin: - number: ${clk_pin} - allow_other_uses: true - mosi_pin: - number: ${mosi_pin} - display: - platform: mipi_spi spi_16: true @@ -30,8 +22,5 @@ display: dimensions: width: 100 height: 200 - enable_pin: - - number: ${clk_pin} - allow_other_uses: true - - number: ${enable_pin} + enable_pin: ${enable_pin} bus_mode: single diff --git a/tests/components/mipi_spi/test-lvgl.esp32-s3-idf.yaml b/tests/components/mipi_spi/test-lvgl.esp32-s3-idf.yaml index e0f65a3a6a..48f34f3449 100644 --- a/tests/components/mipi_spi/test-lvgl.esp32-s3-idf.yaml +++ b/tests/components/mipi_spi/test-lvgl.esp32-s3-idf.yaml @@ -1,16 +1,9 @@ -substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - -spi: - - id: spi_single - clk_pin: - number: ${clk_pin} - mosi_pin: - number: ${mosi_pin} +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml display: - platform: mipi_spi + spi_id: spi_bus model: t-display-s3-pro lvgl: diff --git a/tests/components/mipi_spi/test.esp32-c3-idf.yaml b/tests/components/mipi_spi/test.esp32-c3-idf.yaml index c17748c569..55e25d8318 100644 --- a/tests/components/mipi_spi/test.esp32-c3-idf.yaml +++ b/tests/components/mipi_spi/test.esp32-c3-idf.yaml @@ -1,10 +1,10 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 - dc_pin: GPIO21 - cs_pin: GPIO18 - enable_pin: GPIO19 + dc_pin: GPIO7 + cs_pin: GPIO8 + enable_pin: GPIO9 reset_pin: GPIO20 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mipi_spi/test.esp32-idf.yaml b/tests/components/mipi_spi/test.esp32-idf.yaml index 653ccb4910..b173b8de87 100644 --- a/tests/components/mipi_spi/test.esp32-idf.yaml +++ b/tests/components/mipi_spi/test.esp32-idf.yaml @@ -1,15 +1,10 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 - dc_pin: GPIO21 - cs_pin: GPIO18 - enable_pin: GPIO19 + dc_pin: GPIO14 + cs_pin: GPIO13 + enable_pin: GPIO4 reset_pin: GPIO20 packages: - display: !include common.yaml + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml -display: - - platform: mipi_spi - model: m5core +<<: !include common.yaml diff --git a/tests/components/mipi_spi/test.rp2040-ard.yaml b/tests/components/mipi_spi/test.rp2040-ard.yaml index 5d7333853b..380cebcde3 100644 --- a/tests/components/mipi_spi/test.rp2040-ard.yaml +++ b/tests/components/mipi_spi/test.rp2040-ard.yaml @@ -1,10 +1,10 @@ substitutions: - clk_pin: GPIO2 - mosi_pin: GPIO3 - miso_pin: GPIO4 dc_pin: GPIO14 cs_pin: GPIO13 - enable_pin: GPIO19 + enable_pin: GPIO16 reset_pin: GPIO20 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mixer/test.esp32-idf.yaml b/tests/components/mixer/test.esp32-idf.yaml index 96d2d37458..6712f1e468 100644 --- a/tests/components/mixer/test.esp32-idf.yaml +++ b/tests/components/mixer/test.esp32-idf.yaml @@ -1,7 +1,10 @@ substitutions: - lrclk_pin: GPIO16 - bclk_pin: GPIO17 + lrclk_pin: GPIO4 + bclk_pin: GPIO5 mclk_pin: GPIO15 dout_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mlx90393/common.yaml b/tests/components/mlx90393/common.yaml index 58f3b6ecf5..9e85e06c89 100644 --- a/tests/components/mlx90393/common.yaml +++ b/tests/components/mlx90393/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mlx90393 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mlx90393 + i2c_id: i2c_bus oversampling: 3 gain: 1X temperature_compensation: true diff --git a/tests/components/mlx90393/test.esp32-c3-idf.yaml b/tests/components/mlx90393/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mlx90393/test.esp32-c3-idf.yaml +++ b/tests/components/mlx90393/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mlx90393/test.esp32-idf.yaml b/tests/components/mlx90393/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mlx90393/test.esp32-idf.yaml +++ b/tests/components/mlx90393/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mlx90393/test.esp32-s3-idf.yaml b/tests/components/mlx90393/test.esp32-s3-idf.yaml index ee2c29ca4e..0fd8684a2c 100644 --- a/tests/components/mlx90393/test.esp32-s3-idf.yaml +++ b/tests/components/mlx90393/test.esp32-s3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mlx90393/test.esp8266-ard.yaml b/tests/components/mlx90393/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mlx90393/test.esp8266-ard.yaml +++ b/tests/components/mlx90393/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mlx90393/test.rp2040-ard.yaml b/tests/components/mlx90393/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mlx90393/test.rp2040-ard.yaml +++ b/tests/components/mlx90393/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mlx90614/common.yaml b/tests/components/mlx90614/common.yaml index 03279e6e14..8d408fb016 100644 --- a/tests/components/mlx90614/common.yaml +++ b/tests/components/mlx90614/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mlx90614 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mlx90614 + i2c_id: i2c_bus ambient: name: Ambient object: diff --git a/tests/components/mlx90614/test.esp32-c3-idf.yaml b/tests/components/mlx90614/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mlx90614/test.esp32-c3-idf.yaml +++ b/tests/components/mlx90614/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mlx90614/test.esp32-idf.yaml b/tests/components/mlx90614/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mlx90614/test.esp32-idf.yaml +++ b/tests/components/mlx90614/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mlx90614/test.esp8266-ard.yaml b/tests/components/mlx90614/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mlx90614/test.esp8266-ard.yaml +++ b/tests/components/mlx90614/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mlx90614/test.rp2040-ard.yaml b/tests/components/mlx90614/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mlx90614/test.rp2040-ard.yaml +++ b/tests/components/mlx90614/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mmc5603/common.yaml b/tests/components/mmc5603/common.yaml index 83235f596e..6f6e35e9af 100644 --- a/tests/components/mmc5603/common.yaml +++ b/tests/components/mmc5603/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mmc5603 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mmc5603 + i2c_id: i2c_bus address: 0x30 field_strength_x: name: HMC5883L Field Strength X diff --git a/tests/components/mmc5603/test.esp32-c3-idf.yaml b/tests/components/mmc5603/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mmc5603/test.esp32-c3-idf.yaml +++ b/tests/components/mmc5603/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mmc5603/test.esp32-idf.yaml b/tests/components/mmc5603/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mmc5603/test.esp32-idf.yaml +++ b/tests/components/mmc5603/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mmc5603/test.esp8266-ard.yaml b/tests/components/mmc5603/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mmc5603/test.esp8266-ard.yaml +++ b/tests/components/mmc5603/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mmc5603/test.rp2040-ard.yaml b/tests/components/mmc5603/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mmc5603/test.rp2040-ard.yaml +++ b/tests/components/mmc5603/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mmc5983/common.yaml b/tests/components/mmc5983/common.yaml index 949ff527e7..963a2527c1 100644 --- a/tests/components/mmc5983/common.yaml +++ b/tests/components/mmc5983/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mmc5983 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mmc5983 + i2c_id: i2c_bus field_strength_x: name: "Magnet X" id: magnet_x diff --git a/tests/components/mmc5983/test.esp32-c3-idf.yaml b/tests/components/mmc5983/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mmc5983/test.esp32-c3-idf.yaml +++ b/tests/components/mmc5983/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mmc5983/test.esp32-idf.yaml b/tests/components/mmc5983/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mmc5983/test.esp32-idf.yaml +++ b/tests/components/mmc5983/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mmc5983/test.esp8266-ard.yaml b/tests/components/mmc5983/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mmc5983/test.esp8266-ard.yaml +++ b/tests/components/mmc5983/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mmc5983/test.rp2040-ard.yaml b/tests/components/mmc5983/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mmc5983/test.rp2040-ard.yaml +++ b/tests/components/mmc5983/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/modbus/common.yaml b/tests/components/modbus/common.yaml index 3ec9518585..d636143ec9 100644 --- a/tests/components/modbus/common.yaml +++ b/tests/components/modbus/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_modbus - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - modbus: id: mod_bus1 flow_control_pin: ${flow_control_pin} diff --git a/tests/components/modbus/test.esp32-c3-idf.yaml b/tests/components/modbus/test.esp32-c3-idf.yaml index 452031a5aa..430c6818cb 100644 --- a/tests/components/modbus/test.esp32-c3-idf.yaml +++ b/tests/components/modbus/test.esp32-c3-idf.yaml @@ -1,6 +1,6 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/modbus/test.esp32-idf.yaml b/tests/components/modbus/test.esp32-idf.yaml index bd767a8ece..8a08f8a821 100644 --- a/tests/components/modbus/test.esp32-idf.yaml +++ b/tests/components/modbus/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO14 flow_control_pin: GPIO13 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/modbus/test.esp8266-ard.yaml b/tests/components/modbus/test.esp8266-ard.yaml index 29c98d0957..dfea36d957 100644 --- a/tests/components/modbus/test.esp8266-ard.yaml +++ b/tests/components/modbus/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - flow_control_pin: GPIO13 + tx_pin: GPIO0 + rx_pin: GPIO2 + flow_control_pin: GPIO15 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/modbus/test.rp2040-ard.yaml b/tests/components/modbus/test.rp2040-ard.yaml index 452031a5aa..43f12ea28d 100644 --- a/tests/components/modbus/test.rp2040-ard.yaml +++ b/tests/components/modbus/test.rp2040-ard.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO5 flow_control_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/modbus_controller/common.yaml b/tests/components/modbus_controller/common.yaml index c2b5ab737f..ae5520e57d 100644 --- a/tests/components/modbus_controller/common.yaml +++ b/tests/components/modbus_controller/common.yaml @@ -1,25 +1,12 @@ -uart: - - id: uart_modbus_client - tx_pin: ${client_tx_pin} - rx_pin: ${client_rx_pin} - baud_rate: 9600 - - id: uart_modbus_server - tx_pin: ${server_tx_pin} - rx_pin: ${server_rx_pin} - baud_rate: 9600 - modbus: - - id: mod_bus1 - uart_id: uart_modbus_client - flow_control_pin: ${flow_control_pin} - id: mod_bus2 - uart_id: uart_modbus_server + uart_id: uart_bus role: server modbus_controller: - id: modbus_controller1 address: 0x2 - modbus_id: mod_bus1 + modbus_id: modbus_bus allow_duplicate_commands: false on_online: then: diff --git a/tests/components/modbus_controller/test.esp32-c3-idf.yaml b/tests/components/modbus_controller/test.esp32-c3-idf.yaml index f5b770ff58..db826676ee 100644 --- a/tests/components/modbus_controller/test.esp32-c3-idf.yaml +++ b/tests/components/modbus_controller/test.esp32-c3-idf.yaml @@ -1,8 +1,4 @@ -substitutions: - client_tx_pin: GPIO4 - client_rx_pin: GPIO5 - server_tx_pin: GPIO6 - server_rx_pin: GPIO7 - flow_control_pin: GPIO3 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/modbus_controller/test.esp32-idf.yaml b/tests/components/modbus_controller/test.esp32-idf.yaml index 548b8c0666..ace2d95a0b 100644 --- a/tests/components/modbus_controller/test.esp32-idf.yaml +++ b/tests/components/modbus_controller/test.esp32-idf.yaml @@ -1,8 +1,4 @@ -substitutions: - client_tx_pin: GPIO12 - client_rx_pin: GPIO14 - server_tx_pin: GPIO16 - server_rx_pin: GPIO17 - flow_control_pin: GPIO13 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/modbus_controller/test.esp8266-ard.yaml b/tests/components/modbus_controller/test.esp8266-ard.yaml index c68a57cbde..560629b0cd 100644 --- a/tests/components/modbus_controller/test.esp8266-ard.yaml +++ b/tests/components/modbus_controller/test.esp8266-ard.yaml @@ -1,8 +1,4 @@ -substitutions: - client_tx_pin: GPIO1 - client_rx_pin: GPIO3 - server_tx_pin: GPIO4 - server_rx_pin: GPIO5 - flow_control_pin: GPIO13 +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/modbus_controller/test.rp2040-ard.yaml b/tests/components/modbus_controller/test.rp2040-ard.yaml index 80528bc12b..eeebbd2a8a 100644 --- a/tests/components/modbus_controller/test.rp2040-ard.yaml +++ b/tests/components/modbus_controller/test.rp2040-ard.yaml @@ -1,8 +1,4 @@ -substitutions: - client_tx_pin: GPIO2 - client_rx_pin: GPIO3 - server_tx_pin: GPIO4 - server_rx_pin: GPIO5 - flow_control_pin: GPIO6 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mopeka_ble/test.esp32-c3-idf.yaml b/tests/components/mopeka_ble/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/mopeka_ble/test.esp32-c3-idf.yaml +++ b/tests/components/mopeka_ble/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mopeka_ble/test.esp32-idf.yaml b/tests/components/mopeka_ble/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/mopeka_ble/test.esp32-idf.yaml +++ b/tests/components/mopeka_ble/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml b/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml +++ b/tests/components/mopeka_pro_check/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mopeka_pro_check/test.esp32-idf.yaml b/tests/components/mopeka_pro_check/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/mopeka_pro_check/test.esp32-idf.yaml +++ b/tests/components/mopeka_pro_check/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml b/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml +++ b/tests/components/mopeka_std_check/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mopeka_std_check/test.esp32-idf.yaml b/tests/components/mopeka_std_check/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/mopeka_std_check/test.esp32-idf.yaml +++ b/tests/components/mopeka_std_check/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mpl3115a2/common.yaml b/tests/components/mpl3115a2/common.yaml index f2f65885b3..aa6c2b77fc 100644 --- a/tests/components/mpl3115a2/common.yaml +++ b/tests/components/mpl3115a2/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mpl3115a2 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mpl3115a2 + i2c_id: i2c_bus temperature: name: MPL3115A2 Temperature pressure: diff --git a/tests/components/mpl3115a2/test.esp32-c3-idf.yaml b/tests/components/mpl3115a2/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mpl3115a2/test.esp32-c3-idf.yaml +++ b/tests/components/mpl3115a2/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mpl3115a2/test.esp32-idf.yaml b/tests/components/mpl3115a2/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mpl3115a2/test.esp32-idf.yaml +++ b/tests/components/mpl3115a2/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mpl3115a2/test.esp8266-ard.yaml b/tests/components/mpl3115a2/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mpl3115a2/test.esp8266-ard.yaml +++ b/tests/components/mpl3115a2/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mpl3115a2/test.rp2040-ard.yaml b/tests/components/mpl3115a2/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mpl3115a2/test.rp2040-ard.yaml +++ b/tests/components/mpl3115a2/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mpr121/common.yaml b/tests/components/mpr121/common.yaml index fcf61b57f3..67a06cf9c1 100644 --- a/tests/components/mpr121/common.yaml +++ b/tests/components/mpr121/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_mpr121 - scl: ${i2c_scl} - sda: ${i2c_sda} - mpr121: + i2c_id: i2c_bus id: mpr121_first address: 0x5A diff --git a/tests/components/mpr121/test.esp32-c3-idf.yaml b/tests/components/mpr121/test.esp32-c3-idf.yaml index d7ae0d5161..d1abb03369 100644 --- a/tests/components/mpr121/test.esp32-c3-idf.yaml +++ b/tests/components/mpr121/test.esp32-c3-idf.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO5 i2c_sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mpr121/test.esp32-idf.yaml b/tests/components/mpr121/test.esp32-idf.yaml index 1037d5d35b..4598505c3a 100644 --- a/tests/components/mpr121/test.esp32-idf.yaml +++ b/tests/components/mpr121/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO16 i2c_sda: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/mpr121/test.esp8266-ard.yaml b/tests/components/mpr121/test.esp8266-ard.yaml index d7ae0d5161..5565bb8c35 100644 --- a/tests/components/mpr121/test.esp8266-ard.yaml +++ b/tests/components/mpr121/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO5 i2c_sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mpr121/test.rp2040-ard.yaml b/tests/components/mpr121/test.rp2040-ard.yaml index d7ae0d5161..888762a742 100644 --- a/tests/components/mpr121/test.rp2040-ard.yaml +++ b/tests/components/mpr121/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO5 i2c_sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/mpu6050/common.yaml b/tests/components/mpu6050/common.yaml index e9d4995534..7ac123f8c7 100644 --- a/tests/components/mpu6050/common.yaml +++ b/tests/components/mpu6050/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mpu6050 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mpu6050 + i2c_id: i2c_bus address: 0x68 accel_x: name: MPU6050 Accel X diff --git a/tests/components/mpu6050/test.esp32-c3-idf.yaml b/tests/components/mpu6050/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mpu6050/test.esp32-c3-idf.yaml +++ b/tests/components/mpu6050/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mpu6050/test.esp32-idf.yaml b/tests/components/mpu6050/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mpu6050/test.esp32-idf.yaml +++ b/tests/components/mpu6050/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mpu6050/test.esp8266-ard.yaml b/tests/components/mpu6050/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mpu6050/test.esp8266-ard.yaml +++ b/tests/components/mpu6050/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mpu6050/test.rp2040-ard.yaml b/tests/components/mpu6050/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mpu6050/test.rp2040-ard.yaml +++ b/tests/components/mpu6050/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mpu6886/common.yaml b/tests/components/mpu6886/common.yaml index 9c3e283cc3..9f7324f384 100644 --- a/tests/components/mpu6886/common.yaml +++ b/tests/components/mpu6886/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_mpu6886 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: mpu6886 + i2c_id: i2c_bus address: 0x68 accel_x: name: MPU6886 Accel X diff --git a/tests/components/mpu6886/test.esp32-c3-idf.yaml b/tests/components/mpu6886/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/mpu6886/test.esp32-c3-idf.yaml +++ b/tests/components/mpu6886/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/mpu6886/test.esp32-idf.yaml b/tests/components/mpu6886/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/mpu6886/test.esp32-idf.yaml +++ b/tests/components/mpu6886/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/mpu6886/test.esp8266-ard.yaml b/tests/components/mpu6886/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/mpu6886/test.esp8266-ard.yaml +++ b/tests/components/mpu6886/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/mpu6886/test.rp2040-ard.yaml b/tests/components/mpu6886/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/mpu6886/test.rp2040-ard.yaml +++ b/tests/components/mpu6886/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/mqtt/common-update.yaml b/tests/components/mqtt/common-update.yaml index 25f57cfef2..2e21e9687a 100644 --- a/tests/components/mqtt/common-update.yaml +++ b/tests/components/mqtt/common-update.yaml @@ -6,8 +6,10 @@ http_request: ota: - platform: http_request + id: mqtt_http_request_ota update: - platform: http_request name: "OTA Update" + ota_id: mqtt_http_request_ota source: https://example.com/ota.json diff --git a/tests/components/ms5611/common.yaml b/tests/components/ms5611/common.yaml index d0417faa86..12644fa330 100644 --- a/tests/components/ms5611/common.yaml +++ b/tests/components/ms5611/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_ms5611 - scl: ${i2c_scl} - sda: ${i2c_sda} - sensor: - platform: ms5611 + i2c_id: i2c_bus temperature: name: Outside Temperature pressure: diff --git a/tests/components/ms5611/test.esp32-c3-idf.yaml b/tests/components/ms5611/test.esp32-c3-idf.yaml index d7ae0d5161..d1abb03369 100644 --- a/tests/components/ms5611/test.esp32-c3-idf.yaml +++ b/tests/components/ms5611/test.esp32-c3-idf.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO5 i2c_sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ms5611/test.esp32-idf.yaml b/tests/components/ms5611/test.esp32-idf.yaml index 1037d5d35b..4598505c3a 100644 --- a/tests/components/ms5611/test.esp32-idf.yaml +++ b/tests/components/ms5611/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO16 i2c_sda: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ms5611/test.esp8266-ard.yaml b/tests/components/ms5611/test.esp8266-ard.yaml index d7ae0d5161..5565bb8c35 100644 --- a/tests/components/ms5611/test.esp8266-ard.yaml +++ b/tests/components/ms5611/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO5 i2c_sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ms5611/test.rp2040-ard.yaml b/tests/components/ms5611/test.rp2040-ard.yaml index d7ae0d5161..888762a742 100644 --- a/tests/components/ms5611/test.rp2040-ard.yaml +++ b/tests/components/ms5611/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: i2c_scl: GPIO5 i2c_sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/msa3xx/common.yaml b/tests/components/msa3xx/common.yaml index 8de6a8a89a..297ed8a741 100644 --- a/tests/components/msa3xx/common.yaml +++ b/tests/components/msa3xx/common.yaml @@ -1,5 +1,5 @@ msa3xx: - i2c_id: i2c_msa3xx + i2c_id: i2c_bus type: msa301 range: 4G resolution: 14 diff --git a/tests/components/msa3xx/test.esp32-c3-idf.yaml b/tests/components/msa3xx/test.esp32-c3-idf.yaml index b972ce8cdb..9990d96d29 100644 --- a/tests/components/msa3xx/test.esp32-c3-idf.yaml +++ b/tests/components/msa3xx/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_msa3xx - scl: GPIO5 - sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/msa3xx/test.esp32-idf.yaml b/tests/components/msa3xx/test.esp32-idf.yaml index 7202e7b9bf..b47e39c389 100644 --- a/tests/components/msa3xx/test.esp32-idf.yaml +++ b/tests/components/msa3xx/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_msa3xx - scl: GPIO16 - sda: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/msa3xx/test.esp8266-ard.yaml b/tests/components/msa3xx/test.esp8266-ard.yaml index b972ce8cdb..4a98b9388a 100644 --- a/tests/components/msa3xx/test.esp8266-ard.yaml +++ b/tests/components/msa3xx/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_msa3xx - scl: GPIO5 - sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/msa3xx/test.rp2040-ard.yaml b/tests/components/msa3xx/test.rp2040-ard.yaml index b972ce8cdb..319a7c71a6 100644 --- a/tests/components/msa3xx/test.rp2040-ard.yaml +++ b/tests/components/msa3xx/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_msa3xx - scl: GPIO5 - sda: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/nau7802/common.yaml b/tests/components/nau7802/common.yaml index 2501911a3f..5c52c33dad 100644 --- a/tests/components/nau7802/common.yaml +++ b/tests/components/nau7802/common.yaml @@ -1,8 +1,8 @@ sensor: - platform: nau7802 + i2c_id: i2c_bus id: test_id name: weight - i2c_id: i2c_nau7802 gain: 32 ldo_voltage: "3.0v" samples_per_second: 10 diff --git a/tests/components/nau7802/test.esp32-c3-idf.yaml b/tests/components/nau7802/test.esp32-c3-idf.yaml index 769468f9ec..9990d96d29 100644 --- a/tests/components/nau7802/test.esp32-c3-idf.yaml +++ b/tests/components/nau7802/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_nau7802 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/nau7802/test.esp32-idf.yaml b/tests/components/nau7802/test.esp32-idf.yaml index 73a4aa4251..b47e39c389 100644 --- a/tests/components/nau7802/test.esp32-idf.yaml +++ b/tests/components/nau7802/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_nau7802 - scl: 16 - sda: 17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/nau7802/test.esp8266-ard.yaml b/tests/components/nau7802/test.esp8266-ard.yaml index 769468f9ec..4a98b9388a 100644 --- a/tests/components/nau7802/test.esp8266-ard.yaml +++ b/tests/components/nau7802/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_nau7802 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/nau7802/test.rp2040-ard.yaml b/tests/components/nau7802/test.rp2040-ard.yaml index 769468f9ec..319a7c71a6 100644 --- a/tests/components/nau7802/test.rp2040-ard.yaml +++ b/tests/components/nau7802/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -i2c: - - id: i2c_nau7802 - scl: 5 - sda: 4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/nextion/common.yaml b/tests/components/nextion/common.yaml index 767c868d0b..f5ee12a51c 100644 --- a/tests/components/nextion/common.yaml +++ b/tests/components/nextion/common.yaml @@ -236,12 +236,6 @@ wifi: ssid: MySSID password: password1 -uart: - - id: uart_nextion - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - binary_sensor: - platform: nextion page_id: 0 diff --git a/tests/components/nextion/test.esp32-ard.yaml b/tests/components/nextion/test.esp32-ard.yaml index d5e02b8b85..7e94a9b4a5 100644 --- a/tests/components/nextion/test.esp32-ard.yaml +++ b/tests/components/nextion/test.esp32-ard.yaml @@ -1,8 +1,5 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 - packages: + uart: !include ../../test_build_components/common/uart/esp32-ard.yaml base: !include common.yaml display: diff --git a/tests/components/nextion/test.esp32-c3-idf.yaml b/tests/components/nextion/test.esp32-c3-idf.yaml index 5135c7e4f4..888693f909 100644 --- a/tests/components/nextion/test.esp32-c3-idf.yaml +++ b/tests/components/nextion/test.esp32-c3-idf.yaml @@ -1,8 +1,5 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml base: !include common.yaml display: diff --git a/tests/components/nextion/test.esp32-idf.yaml b/tests/components/nextion/test.esp32-idf.yaml index d5e02b8b85..99820f0f8d 100644 --- a/tests/components/nextion/test.esp32-idf.yaml +++ b/tests/components/nextion/test.esp32-idf.yaml @@ -1,8 +1,5 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 - packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml base: !include common.yaml display: diff --git a/tests/components/nextion/test.esp8266-ard.yaml b/tests/components/nextion/test.esp8266-ard.yaml index 5135c7e4f4..49f79b2f4c 100644 --- a/tests/components/nextion/test.esp8266-ard.yaml +++ b/tests/components/nextion/test.esp8266-ard.yaml @@ -1,8 +1,5 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml base: !include common.yaml display: diff --git a/tests/components/nextion/test.rp2040-ard.yaml b/tests/components/nextion/test.rp2040-ard.yaml index 44534b97a8..23cc71ee7c 100644 --- a/tests/components/nextion/test.rp2040-ard.yaml +++ b/tests/components/nextion/test.rp2040-ard.yaml @@ -1,6 +1,3 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml base: !include common.yaml diff --git a/tests/components/npi19/common.yaml b/tests/components/npi19/common.yaml index 012e05695e..03550c269f 100644 --- a/tests/components/npi19/common.yaml +++ b/tests/components/npi19/common.yaml @@ -1,13 +1,7 @@ -i2c: - id: i2c_bus - scl: ${scl_pin} - sda: ${sda_pin} - frequency: 200kHz - sensor: - platform: npi19 - update_interval: 1s i2c_id: i2c_bus + update_interval: 1s temperature: name: water temperature diff --git a/tests/components/npi19/test.esp32-idf.yaml b/tests/components/npi19/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/npi19/test.esp32-idf.yaml +++ b/tests/components/npi19/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/npi19/test.esp32-s3-idf.yaml b/tests/components/npi19/test.esp32-s3-idf.yaml index 4942e3c2b3..0fd8684a2c 100644 --- a/tests/components/npi19/test.esp32-s3-idf.yaml +++ b/tests/components/npi19/test.esp32-s3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO40 - sda_pin: GPIO41 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml <<: !include common.yaml diff --git a/tests/components/npi19/test.esp8266-ard.yaml b/tests/components/npi19/test.esp8266-ard.yaml index 3be5e53dcb..4a98b9388a 100644 --- a/tests/components/npi19/test.esp8266-ard.yaml +++ b/tests/components/npi19/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO05 - sda_pin: GPIO04 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/online_image/common-esp32.yaml b/tests/components/online_image/common-esp32.yaml index 787a1ad368..32c909d351 100644 --- a/tests/components/online_image/common-esp32.yaml +++ b/tests/components/online_image/common-esp32.yaml @@ -1,13 +1,11 @@ -<<: !include common.yaml +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml -spi: - - id: spi_main_lcd - clk_pin: 16 - mosi_pin: 17 - miso_pin: 18 +<<: !include common.yaml display: - platform: ili9xxx + spi_id: spi_bus id: main_lcd model: ili9342 cs_pin: 20 diff --git a/tests/components/online_image/common-esp8266.yaml b/tests/components/online_image/common-esp8266.yaml index ba15b5025c..d7722d171a 100644 --- a/tests/components/online_image/common-esp8266.yaml +++ b/tests/components/online_image/common-esp8266.yaml @@ -1,13 +1,11 @@ -<<: !include common.yaml +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml -spi: - - id: spi_main_lcd - clk_pin: 14 - mosi_pin: 13 - miso_pin: 12 +<<: !include common.yaml display: - platform: ili9xxx + spi_id: spi_bus id: main_lcd model: ili9342 cs_pin: 15 diff --git a/tests/components/online_image/common-rp2040.yaml b/tests/components/online_image/common-rp2040.yaml index 16bb2b2c44..25891b94bc 100644 --- a/tests/components/online_image/common-rp2040.yaml +++ b/tests/components/online_image/common-rp2040.yaml @@ -1,13 +1,11 @@ -<<: !include common.yaml +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml -spi: - - id: spi_main_lcd - clk_pin: 18 - mosi_pin: 19 - miso_pin: 16 +<<: !include common.yaml display: - platform: ili9xxx + spi_id: spi_bus id: main_lcd model: ili9342 cs_pin: 20 diff --git a/tests/components/opt3001/common.yaml b/tests/components/opt3001/common.yaml index dab4f824f8..7b2cb339af 100644 --- a/tests/components/opt3001/common.yaml +++ b/tests/components/opt3001/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_opt3001 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: opt3001 + i2c_id: i2c_bus name: Living Room Brightness address: 0x44 update_interval: 30s diff --git a/tests/components/opt3001/test.esp32-c3-idf.yaml b/tests/components/opt3001/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/opt3001/test.esp32-c3-idf.yaml +++ b/tests/components/opt3001/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/opt3001/test.esp32-idf.yaml b/tests/components/opt3001/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/opt3001/test.esp32-idf.yaml +++ b/tests/components/opt3001/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/opt3001/test.esp8266-ard.yaml b/tests/components/opt3001/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/opt3001/test.esp8266-ard.yaml +++ b/tests/components/opt3001/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/opt3001/test.rp2040-ard.yaml b/tests/components/opt3001/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/opt3001/test.rp2040-ard.yaml +++ b/tests/components/opt3001/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/packet_transport/test.esp32-c3-idf.yaml b/tests/components/packet_transport/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/packet_transport/test.esp32-c3-idf.yaml +++ b/tests/components/packet_transport/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/packet_transport/test.esp32-idf.yaml b/tests/components/packet_transport/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/packet_transport/test.esp32-idf.yaml +++ b/tests/components/packet_transport/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/packet_transport/test.esp8266-ard.yaml b/tests/components/packet_transport/test.esp8266-ard.yaml index dade44d145..4a98b9388a 100644 --- a/tests/components/packet_transport/test.esp8266-ard.yaml +++ b/tests/components/packet_transport/test.esp8266-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/packet_transport/test.host.yaml b/tests/components/packet_transport/test.host.yaml index e735c37e4d..49fdbbc9b2 100644 --- a/tests/components/packet_transport/test.host.yaml +++ b/tests/components/packet_transport/test.host.yaml @@ -1,4 +1,40 @@ -packages: - common: !include common.yaml +udp: + listen_address: 239.0.60.53 + addresses: ["239.0.60.53"] -wifi: !remove +packet_transport: + platform: udp + update_interval: 5s + encryption: "our key goes here" + rolling_code_enable: true + ping_pong_enable: true + binary_sensors: + - binary_sensor_id1 + - id: binary_sensor_id1 + broadcast_id: other_id + sensors: + - sensor_id1 + - id: sensor_id1 + broadcast_id: other_id + providers: + - name: some-device-name + encryption: "their key goes here" + +sensor: + - platform: template + id: sensor_id1 + - platform: packet_transport + provider: some-device-name + id: our_id + remote_id: some_sensor_id + +binary_sensor: + - platform: packet_transport + provider: unencrypted-device + id: other_binary_sensor_id + - platform: packet_transport + provider: some-device-name + type: status + name: Some-Device Status + - platform: template + id: binary_sensor_id1 diff --git a/tests/components/packet_transport/test.rp2040-ard.yaml b/tests/components/packet_transport/test.rp2040-ard.yaml index dade44d145..319a7c71a6 100644 --- a/tests/components/packet_transport/test.rp2040-ard.yaml +++ b/tests/components/packet_transport/test.rp2040-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pca6416a/common.yaml b/tests/components/pca6416a/common.yaml index ea538387e4..9ad6e2fb15 100644 --- a/tests/components/pca6416a/common.yaml +++ b/tests/components/pca6416a/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_pca6416a - scl: ${scl_pin} - sda: ${sda_pin} - pca6416a: - id: pca6416a_hub + i2c_id: i2c_bus address: 0x21 binary_sensor: diff --git a/tests/components/pca6416a/test.esp32-c3-idf.yaml b/tests/components/pca6416a/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pca6416a/test.esp32-c3-idf.yaml +++ b/tests/components/pca6416a/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pca6416a/test.esp32-idf.yaml b/tests/components/pca6416a/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pca6416a/test.esp32-idf.yaml +++ b/tests/components/pca6416a/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pca6416a/test.esp8266-ard.yaml b/tests/components/pca6416a/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pca6416a/test.esp8266-ard.yaml +++ b/tests/components/pca6416a/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pca6416a/test.rp2040-ard.yaml b/tests/components/pca6416a/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pca6416a/test.rp2040-ard.yaml +++ b/tests/components/pca6416a/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pca9554/common.yaml b/tests/components/pca9554/common.yaml index db2ec2b826..9e5e7f3342 100644 --- a/tests/components/pca9554/common.yaml +++ b/tests/components/pca9554/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_pca9554 - scl: ${scl_pin} - sda: ${sda_pin} - pca9554: - id: pca9554_hub + i2c_id: i2c_bus pin_count: 8 address: 0x3F diff --git a/tests/components/pca9554/test.esp32-c3-idf.yaml b/tests/components/pca9554/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pca9554/test.esp32-c3-idf.yaml +++ b/tests/components/pca9554/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pca9554/test.esp32-idf.yaml b/tests/components/pca9554/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pca9554/test.esp32-idf.yaml +++ b/tests/components/pca9554/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pca9554/test.esp8266-ard.yaml b/tests/components/pca9554/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pca9554/test.esp8266-ard.yaml +++ b/tests/components/pca9554/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pca9554/test.rp2040-ard.yaml b/tests/components/pca9554/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pca9554/test.rp2040-ard.yaml +++ b/tests/components/pca9554/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pca9685/common.yaml b/tests/components/pca9685/common.yaml index 57cdc5de9b..2e238b481c 100644 --- a/tests/components/pca9685/common.yaml +++ b/tests/components/pca9685/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_pca9685 - scl: ${scl_pin} - sda: ${sda_pin} - pca9685: + i2c_id: i2c_bus frequency: 500 address: 0x0 diff --git a/tests/components/pca9685/test.esp32-c3-idf.yaml b/tests/components/pca9685/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pca9685/test.esp32-c3-idf.yaml +++ b/tests/components/pca9685/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pca9685/test.esp32-idf.yaml b/tests/components/pca9685/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pca9685/test.esp32-idf.yaml +++ b/tests/components/pca9685/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pca9685/test.esp8266-ard.yaml b/tests/components/pca9685/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pca9685/test.esp8266-ard.yaml +++ b/tests/components/pca9685/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pca9685/test.rp2040-ard.yaml b/tests/components/pca9685/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pca9685/test.rp2040-ard.yaml +++ b/tests/components/pca9685/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pcd8544/common.yaml b/tests/components/pcd8544/common.yaml index 0fb969eeb8..418cd97253 100644 --- a/tests/components/pcd8544/common.yaml +++ b/tests/components/pcd8544/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_pcd8544 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - display: - platform: pcd8544 cs_pin: ${cs_pin} diff --git a/tests/components/pcd8544/test.esp32-c3-idf.yaml b/tests/components/pcd8544/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/pcd8544/test.esp32-c3-idf.yaml +++ b/tests/components/pcd8544/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcd8544/test.esp32-idf.yaml b/tests/components/pcd8544/test.esp32-idf.yaml index 09e9db5a38..ff174a4656 100644 --- a/tests/components/pcd8544/test.esp32-idf.yaml +++ b/tests/components/pcd8544/test.esp32-idf.yaml @@ -1,9 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO18 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pcd8544/test.esp8266-ard.yaml b/tests/components/pcd8544/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/pcd8544/test.esp8266-ard.yaml +++ b/tests/components/pcd8544/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pcd8544/test.rp2040-ard.yaml b/tests/components/pcd8544/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/pcd8544/test.rp2040-ard.yaml +++ b/tests/components/pcd8544/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pcf85063/common.yaml b/tests/components/pcf85063/common.yaml index f3b68412c5..170029ad85 100644 --- a/tests/components/pcf85063/common.yaml +++ b/tests/components/pcf85063/common.yaml @@ -3,10 +3,6 @@ esphome: - pcf85063.read_time - pcf85063.write_time -i2c: - - id: i2c_pcf85063 - scl: ${scl_pin} - sda: ${sda_pin} - time: - platform: pcf85063 + i2c_id: i2c_bus diff --git a/tests/components/pcf85063/test.esp32-c3-idf.yaml b/tests/components/pcf85063/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pcf85063/test.esp32-c3-idf.yaml +++ b/tests/components/pcf85063/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcf85063/test.esp32-idf.yaml b/tests/components/pcf85063/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pcf85063/test.esp32-idf.yaml +++ b/tests/components/pcf85063/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcf85063/test.esp8266-ard.yaml b/tests/components/pcf85063/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pcf85063/test.esp8266-ard.yaml +++ b/tests/components/pcf85063/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pcf85063/test.rp2040-ard.yaml b/tests/components/pcf85063/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pcf85063/test.rp2040-ard.yaml +++ b/tests/components/pcf85063/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pcf8563/common.yaml b/tests/components/pcf8563/common.yaml index 30be6b893c..ac5f3afed1 100644 --- a/tests/components/pcf8563/common.yaml +++ b/tests/components/pcf8563/common.yaml @@ -3,10 +3,6 @@ esphome: - pcf8563.read_time - pcf8563.write_time -i2c: - - id: i2c_pcf8563 - scl: ${scl_pin} - sda: ${sda_pin} - time: - platform: pcf8563 + i2c_id: i2c_bus diff --git a/tests/components/pcf8563/test.esp32-c3-idf.yaml b/tests/components/pcf8563/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pcf8563/test.esp32-c3-idf.yaml +++ b/tests/components/pcf8563/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcf8563/test.esp32-idf.yaml b/tests/components/pcf8563/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pcf8563/test.esp32-idf.yaml +++ b/tests/components/pcf8563/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcf8563/test.esp8266-ard.yaml b/tests/components/pcf8563/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pcf8563/test.esp8266-ard.yaml +++ b/tests/components/pcf8563/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pcf8563/test.rp2040-ard.yaml b/tests/components/pcf8563/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pcf8563/test.rp2040-ard.yaml +++ b/tests/components/pcf8563/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pcf8574/common.yaml b/tests/components/pcf8574/common.yaml index f5fcfad64a..09fa33164e 100644 --- a/tests/components/pcf8574/common.yaml +++ b/tests/components/pcf8574/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_pcf8574 - scl: ${scl_pin} - sda: ${sda_pin} - pcf8574: - id: pcf8574_hub + i2c_id: i2c_bus address: 0x21 pcf8575: false diff --git a/tests/components/pcf8574/test.esp32-c3-idf.yaml b/tests/components/pcf8574/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pcf8574/test.esp32-c3-idf.yaml +++ b/tests/components/pcf8574/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcf8574/test.esp32-idf.yaml b/tests/components/pcf8574/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pcf8574/test.esp32-idf.yaml +++ b/tests/components/pcf8574/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pcf8574/test.esp8266-ard.yaml b/tests/components/pcf8574/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pcf8574/test.esp8266-ard.yaml +++ b/tests/components/pcf8574/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pcf8574/test.rp2040-ard.yaml b/tests/components/pcf8574/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pcf8574/test.rp2040-ard.yaml +++ b/tests/components/pcf8574/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pi4ioe5v6408/common.yaml b/tests/components/pi4ioe5v6408/common.yaml index 4130dc2652..2344622081 100644 --- a/tests/components/pi4ioe5v6408/common.yaml +++ b/tests/components/pi4ioe5v6408/common.yaml @@ -1,9 +1,5 @@ -i2c: - id: i2c_pi4ioe5v6408 - sda: ${i2c_sda} - scl: ${i2c_scl} - pi4ioe5v6408: + i2c_id: i2c_bus id: pi4ioe1 address: 0x44 diff --git a/tests/components/pi4ioe5v6408/test.esp32-idf.yaml b/tests/components/pi4ioe5v6408/test.esp32-idf.yaml index 55e6edfbf3..9a4779d822 100644 --- a/tests/components/pi4ioe5v6408/test.esp32-idf.yaml +++ b/tests/components/pi4ioe5v6408/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: i2c_sda: GPIO21 i2c_scl: GPIO22 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pi4ioe5v6408/test.rp2040-ard.yaml b/tests/components/pi4ioe5v6408/test.rp2040-ard.yaml index b7b6b13bfe..3429a2952a 100644 --- a/tests/components/pi4ioe5v6408/test.rp2040-ard.yaml +++ b/tests/components/pi4ioe5v6408/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: i2c_sda: GPIO4 i2c_scl: GPIO5 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pipsolar/common.yaml b/tests/components/pipsolar/common.yaml index 64e2c0476d..819764a7ea 100644 --- a/tests/components/pipsolar/common.yaml +++ b/tests/components/pipsolar/common.yaml @@ -5,12 +5,6 @@ esphome: id: inverter0_battery_recharge_voltage_out value: 48.0 -uart: - - id: uart_pipsolar - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - pipsolar: id: inverter0 diff --git a/tests/components/pipsolar/test.esp32-c3-idf.yaml b/tests/components/pipsolar/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/pipsolar/test.esp32-c3-idf.yaml +++ b/tests/components/pipsolar/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp32-idf.yaml b/tests/components/pipsolar/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/pipsolar/test.esp32-idf.yaml +++ b/tests/components/pipsolar/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp32-s2-idf.yaml b/tests/components/pipsolar/test.esp32-s2-idf.yaml index b516342f3b..2d29656c94 100644 --- a/tests/components/pipsolar/test.esp32-s2-idf.yaml +++ b/tests/components/pipsolar/test.esp32-s2-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pipsolar/test.esp8266-ard.yaml b/tests/components/pipsolar/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/pipsolar/test.esp8266-ard.yaml +++ b/tests/components/pipsolar/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pipsolar/test.rp2040-ard.yaml b/tests/components/pipsolar/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/pipsolar/test.rp2040-ard.yaml +++ b/tests/components/pipsolar/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pm1006/common.yaml b/tests/components/pm1006/common.yaml index 4e3e880f4e..43955bb099 100644 --- a/tests/components/pm1006/common.yaml +++ b/tests/components/pm1006/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_pm1006 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: pm1006 pm_2_5: diff --git a/tests/components/pm1006/test.esp32-c3-idf.yaml b/tests/components/pm1006/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/pm1006/test.esp32-c3-idf.yaml +++ b/tests/components/pm1006/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pm1006/test.esp32-idf.yaml b/tests/components/pm1006/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/pm1006/test.esp32-idf.yaml +++ b/tests/components/pm1006/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pm1006/test.esp8266-ard.yaml b/tests/components/pm1006/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/pm1006/test.esp8266-ard.yaml +++ b/tests/components/pm1006/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pm1006/test.rp2040-ard.yaml b/tests/components/pm1006/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/pm1006/test.rp2040-ard.yaml +++ b/tests/components/pm1006/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pm2005/common.yaml b/tests/components/pm2005/common.yaml index b8f6683b22..034752d0b9 100644 --- a/tests/components/pm2005/common.yaml +++ b/tests/components/pm2005/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_pm2005 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: pm2005 + i2c_id: i2c_bus pm_1_0: name: PM1.0 pm_2_5: diff --git a/tests/components/pm2005/test.esp32-c3-idf.yaml b/tests/components/pm2005/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pm2005/test.esp32-c3-idf.yaml +++ b/tests/components/pm2005/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pm2005/test.esp32-idf.yaml b/tests/components/pm2005/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pm2005/test.esp32-idf.yaml +++ b/tests/components/pm2005/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pm2005/test.esp8266-ard.yaml b/tests/components/pm2005/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pm2005/test.esp8266-ard.yaml +++ b/tests/components/pm2005/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pm2005/test.rp2040-ard.yaml b/tests/components/pm2005/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pm2005/test.rp2040-ard.yaml +++ b/tests/components/pm2005/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pmsa003i/common.yaml b/tests/components/pmsa003i/common.yaml index 95e62da694..7267bd58f3 100644 --- a/tests/components/pmsa003i/common.yaml +++ b/tests/components/pmsa003i/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_pmsa003i - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: pmsa003i + i2c_id: i2c_bus pm_1_0: name: PMSA003i PM1.0 pm_2_5: diff --git a/tests/components/pmsa003i/test.esp32-c3-idf.yaml b/tests/components/pmsa003i/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pmsa003i/test.esp32-c3-idf.yaml +++ b/tests/components/pmsa003i/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pmsa003i/test.esp32-idf.yaml b/tests/components/pmsa003i/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pmsa003i/test.esp32-idf.yaml +++ b/tests/components/pmsa003i/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pmsa003i/test.esp8266-ard.yaml b/tests/components/pmsa003i/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pmsa003i/test.esp8266-ard.yaml +++ b/tests/components/pmsa003i/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pmsa003i/test.rp2040-ard.yaml b/tests/components/pmsa003i/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pmsa003i/test.rp2040-ard.yaml +++ b/tests/components/pmsa003i/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pmsx003/common.yaml b/tests/components/pmsx003/common.yaml index 7b9ca5b091..3c60995804 100644 --- a/tests/components/pmsx003/common.yaml +++ b/tests/components/pmsx003/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_pmsx003 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: pmsx003 type: PMSX003 diff --git a/tests/components/pmsx003/test.esp32-c3-idf.yaml b/tests/components/pmsx003/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/pmsx003/test.esp32-c3-idf.yaml +++ b/tests/components/pmsx003/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pmsx003/test.esp32-idf.yaml b/tests/components/pmsx003/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/pmsx003/test.esp32-idf.yaml +++ b/tests/components/pmsx003/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pmsx003/test.esp8266-ard.yaml b/tests/components/pmsx003/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/pmsx003/test.esp8266-ard.yaml +++ b/tests/components/pmsx003/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pmsx003/test.rp2040-ard.yaml b/tests/components/pmsx003/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/pmsx003/test.rp2040-ard.yaml +++ b/tests/components/pmsx003/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pmwcs3/common.yaml b/tests/components/pmwcs3/common.yaml index dcf59d0b6e..e06400d4d4 100644 --- a/tests/components/pmwcs3/common.yaml +++ b/tests/components/pmwcs3/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_pmwcs3 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: pmwcs3 + i2c_id: i2c_bus e25: name: pmwcs3_e25 ec: diff --git a/tests/components/pmwcs3/test.esp32-c3-idf.yaml b/tests/components/pmwcs3/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pmwcs3/test.esp32-c3-idf.yaml +++ b/tests/components/pmwcs3/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pmwcs3/test.esp32-idf.yaml b/tests/components/pmwcs3/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pmwcs3/test.esp32-idf.yaml +++ b/tests/components/pmwcs3/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pmwcs3/test.esp8266-ard.yaml b/tests/components/pmwcs3/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pmwcs3/test.esp8266-ard.yaml +++ b/tests/components/pmwcs3/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pmwcs3/test.rp2040-ard.yaml b/tests/components/pmwcs3/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pmwcs3/test.rp2040-ard.yaml +++ b/tests/components/pmwcs3/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pn532_i2c/common.yaml b/tests/components/pn532_i2c/common.yaml index db9abd4b13..f328cd40ee 100644 --- a/tests/components/pn532_i2c/common.yaml +++ b/tests/components/pn532_i2c/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_pn532 - scl: ${scl_pin} - sda: ${sda_pin} - pn532_i2c: + i2c_id: i2c_bus id: pn532_nfcc binary_sensor: diff --git a/tests/components/pn532_i2c/test.esp32-c3-idf.yaml b/tests/components/pn532_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/pn532_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/pn532_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.esp32-idf.yaml b/tests/components/pn532_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/pn532_i2c/test.esp32-idf.yaml +++ b/tests/components/pn532_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.esp8266-ard.yaml b/tests/components/pn532_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/pn532_i2c/test.esp8266-ard.yaml +++ b/tests/components/pn532_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pn532_i2c/test.rp2040-ard.yaml b/tests/components/pn532_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/pn532_i2c/test.rp2040-ard.yaml +++ b/tests/components/pn532_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/pn532_spi/common.yaml b/tests/components/pn532_spi/common.yaml index d5b8bc405e..e749a9896a 100644 --- a/tests/components/pn532_spi/common.yaml +++ b/tests/components/pn532_spi/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_pn532 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - pn532_spi: id: pn532_nfcc cs_pin: ${cs_pin} diff --git a/tests/components/pn532_spi/test.esp32-c3-idf.yaml b/tests/components/pn532_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/pn532_spi/test.esp32-c3-idf.yaml +++ b/tests/components/pn532_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pn532_spi/test.esp32-idf.yaml b/tests/components/pn532_spi/test.esp32-idf.yaml index bce56f398a..9bb524aa65 100644 --- a/tests/components/pn532_spi/test.esp32-idf.yaml +++ b/tests/components/pn532_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO18 cs_pin: GPIO12 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pn532_spi/test.esp8266-ard.yaml b/tests/components/pn532_spi/test.esp8266-ard.yaml index bd5c203e35..1aac800592 100644 --- a/tests/components/pn532_spi/test.esp8266-ard.yaml +++ b/tests/components/pn532_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 - cs_pin: GPIO5 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO15 + cs_pin: GPIO16 + +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pn532_spi/test.rp2040-ard.yaml b/tests/components/pn532_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/pn532_spi/test.rp2040-ard.yaml +++ b/tests/components/pn532_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pn7150_i2c/common.yaml b/tests/components/pn7150_i2c/common.yaml index ef852b7a78..a317b72b9c 100644 --- a/tests/components/pn7150_i2c/common.yaml +++ b/tests/components/pn7150_i2c/common.yaml @@ -16,13 +16,9 @@ esphome: - tag.polling_off: nfcc_pn7150 - tag.polling_on: nfcc_pn7150 -i2c: - - id: i2c_pn7150 - scl: ${scl_pin} - sda: ${sda_pin} - pn7150_i2c: id: nfcc_pn7150 + i2c_id: i2c_bus irq_pin: ${irq_pin} ven_pin: ${ven_pin} emulation_message: https://www.home-assistant.io/tag/pulse_ce diff --git a/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml b/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml index 2067143411..cdf8445263 100644 --- a/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/pn7150_i2c/test.esp32-c3-idf.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 ven_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.esp32-idf.yaml b/tests/components/pn7150_i2c/test.esp32-idf.yaml index 1643bec317..9a4cc6669e 100644 --- a/tests/components/pn7150_i2c/test.esp32-idf.yaml +++ b/tests/components/pn7150_i2c/test.esp32-idf.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 irq_pin: GPIO14 ven_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.esp8266-ard.yaml b/tests/components/pn7150_i2c/test.esp8266-ard.yaml index 7111fc9e00..b907e56f80 100644 --- a/tests/components/pn7150_i2c/test.esp8266-ard.yaml +++ b/tests/components/pn7150_i2c/test.esp8266-ard.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 - irq_pin: GPIO12 - ven_pin: GPIO13 + irq_pin: GPIO15 + ven_pin: GPIO16 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pn7150_i2c/test.rp2040-ard.yaml b/tests/components/pn7150_i2c/test.rp2040-ard.yaml index 2067143411..b320b947e3 100644 --- a/tests/components/pn7150_i2c/test.rp2040-ard.yaml +++ b/tests/components/pn7150_i2c/test.rp2040-ard.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 ven_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pn7160_i2c/common.yaml b/tests/components/pn7160_i2c/common.yaml index 0a7c9bd6bb..9807bff0f0 100644 --- a/tests/components/pn7160_i2c/common.yaml +++ b/tests/components/pn7160_i2c/common.yaml @@ -16,13 +16,9 @@ esphome: - tag.polling_off: nfcc_pn7160 - tag.polling_on: nfcc_pn7160 -i2c: - - id: i2c_pn7160 - scl: ${scl_pin} - sda: ${sda_pin} - pn7150_i2c: id: nfcc_pn7160 + i2c_id: i2c_bus irq_pin: ${irq_pin} ven_pin: ${ven_pin} emulation_message: https://www.home-assistant.io/tag/pulse_ce diff --git a/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml b/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml index 2067143411..cdf8445263 100644 --- a/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/pn7160_i2c/test.esp32-c3-idf.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 ven_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.esp32-idf.yaml b/tests/components/pn7160_i2c/test.esp32-idf.yaml index 1643bec317..9a4cc6669e 100644 --- a/tests/components/pn7160_i2c/test.esp32-idf.yaml +++ b/tests/components/pn7160_i2c/test.esp32-idf.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 irq_pin: GPIO14 ven_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.esp8266-ard.yaml b/tests/components/pn7160_i2c/test.esp8266-ard.yaml index 7111fc9e00..b907e56f80 100644 --- a/tests/components/pn7160_i2c/test.esp8266-ard.yaml +++ b/tests/components/pn7160_i2c/test.esp8266-ard.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 - irq_pin: GPIO12 - ven_pin: GPIO13 + irq_pin: GPIO15 + ven_pin: GPIO16 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pn7160_i2c/test.rp2040-ard.yaml b/tests/components/pn7160_i2c/test.rp2040-ard.yaml index 2067143411..b320b947e3 100644 --- a/tests/components/pn7160_i2c/test.rp2040-ard.yaml +++ b/tests/components/pn7160_i2c/test.rp2040-ard.yaml @@ -1,7 +1,8 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 irq_pin: GPIO6 ven_pin: GPIO7 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pn7160_spi/common.yaml b/tests/components/pn7160_spi/common.yaml index 9e8d22f835..d467eb093f 100644 --- a/tests/components/pn7160_spi/common.yaml +++ b/tests/components/pn7160_spi/common.yaml @@ -16,12 +16,6 @@ esphome: - tag.polling_off: nfcc_pn7160 - tag.polling_on: nfcc_pn7160 -spi: - - id: spi_pn7160 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - pn7160_spi: id: nfcc_pn7160 cs_pin: ${cs_pin} diff --git a/tests/components/pn7160_spi/test.esp32-c3-idf.yaml b/tests/components/pn7160_spi/test.esp32-c3-idf.yaml index f8a07fad2f..ac18bfff5c 100644 --- a/tests/components/pn7160_spi/test.esp32-c3-idf.yaml +++ b/tests/components/pn7160_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 irq_pin: GPIO9 ven_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.esp32-idf.yaml b/tests/components/pn7160_spi/test.esp32-idf.yaml index f6073d0416..f903e4b7be 100644 --- a/tests/components/pn7160_spi/test.esp32-idf.yaml +++ b/tests/components/pn7160_spi/test.esp32-idf.yaml @@ -1,9 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO18 cs_pin: GPIO12 irq_pin: GPIO13 ven_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.esp8266-ard.yaml b/tests/components/pn7160_spi/test.esp8266-ard.yaml index cbe27533a7..7ec89dc012 100644 --- a/tests/components/pn7160_spi/test.esp8266-ard.yaml +++ b/tests/components/pn7160_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 irq_pin: GPIO15 ven_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pn7160_spi/test.rp2040-ard.yaml b/tests/components/pn7160_spi/test.rp2040-ard.yaml index 70cd2425fa..b4a4b436cd 100644 --- a/tests/components/pn7160_spi/test.rp2040-ard.yaml +++ b/tests/components/pn7160_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: irq_pin: GPIO15 ven_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/prometheus/common.yaml b/tests/components/prometheus/common.yaml index 131d135f8b..9a16088ba0 100644 --- a/tests/components/prometheus/common.yaml +++ b/tests/components/prometheus/common.yaml @@ -21,10 +21,12 @@ http_request: ota: - platform: http_request + id: prometheus_http_request_ota update: - platform: http_request name: Firmware Update + ota_id: prometheus_http_request_ota source: http://example.com/manifest.json sensor: diff --git a/tests/components/prometheus/test.esp32-idf.yaml b/tests/components/prometheus/test.esp32-idf.yaml index f00bca5947..d60caadb05 100644 --- a/tests/components/prometheus/test.esp32-idf.yaml +++ b/tests/components/prometheus/test.esp32-idf.yaml @@ -2,4 +2,7 @@ substitutions: verify_ssl: "false" pin: GPIO2 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml b/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml +++ b/tests/components/pvvx_mithermometer/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pvvx_mithermometer/test.esp32-idf.yaml b/tests/components/pvvx_mithermometer/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/pvvx_mithermometer/test.esp32-idf.yaml +++ b/tests/components/pvvx_mithermometer/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/pylontech/common.yaml b/tests/components/pylontech/common.yaml index 6852685be7..537450a3b6 100644 --- a/tests/components/pylontech/common.yaml +++ b/tests/components/pylontech/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_pylontech0 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - pylontech: - id: pylontech0 - id: pylontech1 diff --git a/tests/components/pylontech/test.esp32-c3-idf.yaml b/tests/components/pylontech/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/pylontech/test.esp32-c3-idf.yaml +++ b/tests/components/pylontech/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pylontech/test.esp32-idf.yaml b/tests/components/pylontech/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/pylontech/test.esp32-idf.yaml +++ b/tests/components/pylontech/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pylontech/test.esp8266-ard.yaml b/tests/components/pylontech/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/pylontech/test.esp8266-ard.yaml +++ b/tests/components/pylontech/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pylontech/test.rp2040-ard.yaml b/tests/components/pylontech/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/pylontech/test.rp2040-ard.yaml +++ b/tests/components/pylontech/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pzem004t/common.yaml b/tests/components/pzem004t/common.yaml index 75f7f30fc9..4584f9c273 100644 --- a/tests/components/pzem004t/common.yaml +++ b/tests/components/pzem004t/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_pzem004t - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - sensor: - platform: pzem004t voltage: diff --git a/tests/components/pzem004t/test.esp32-c3-idf.yaml b/tests/components/pzem004t/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/pzem004t/test.esp32-c3-idf.yaml +++ b/tests/components/pzem004t/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pzem004t/test.esp32-idf.yaml b/tests/components/pzem004t/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/pzem004t/test.esp32-idf.yaml +++ b/tests/components/pzem004t/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pzem004t/test.esp8266-ard.yaml b/tests/components/pzem004t/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/pzem004t/test.esp8266-ard.yaml +++ b/tests/components/pzem004t/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pzem004t/test.rp2040-ard.yaml b/tests/components/pzem004t/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/pzem004t/test.rp2040-ard.yaml +++ b/tests/components/pzem004t/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pzemac/common.yaml b/tests/components/pzemac/common.yaml index e50f4ad2f2..2566051baa 100644 --- a/tests/components/pzemac/common.yaml +++ b/tests/components/pzemac/common.yaml @@ -3,16 +3,9 @@ esphome: then: - pzemac.reset_energy: pzemac1 -uart: - - id: uart_pzemac - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - -modbus: - sensor: - platform: pzemac + modbus_id: modbus_bus id: pzemac1 voltage: name: PZEMAC Voltage diff --git a/tests/components/pzemac/test.esp32-c3-idf.yaml b/tests/components/pzemac/test.esp32-c3-idf.yaml index b516342f3b..6c6e95488f 100644 --- a/tests/components/pzemac/test.esp32-c3-idf.yaml +++ b/tests/components/pzemac/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pzemac/test.esp32-idf.yaml b/tests/components/pzemac/test.esp32-idf.yaml index f486544afa..37d98696cc 100644 --- a/tests/components/pzemac/test.esp32-idf.yaml +++ b/tests/components/pzemac/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pzemac/test.esp8266-ard.yaml b/tests/components/pzemac/test.esp8266-ard.yaml index b516342f3b..421389ae97 100644 --- a/tests/components/pzemac/test.esp8266-ard.yaml +++ b/tests/components/pzemac/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pzemac/test.rp2040-ard.yaml b/tests/components/pzemac/test.rp2040-ard.yaml index b516342f3b..d78d84c983 100644 --- a/tests/components/pzemac/test.rp2040-ard.yaml +++ b/tests/components/pzemac/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/pzemdc/common.yaml b/tests/components/pzemdc/common.yaml index db1868d682..78a0ab0d07 100644 --- a/tests/components/pzemdc/common.yaml +++ b/tests/components/pzemdc/common.yaml @@ -3,15 +3,9 @@ esphome: then: - pzemdc.reset_energy: pzemdc1 -uart: - - id: uart_pzemdc - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - stop_bits: 2 - sensor: - platform: pzemdc + modbus_id: modbus_bus id: pzemdc1 voltage: name: PZEMDC Voltage diff --git a/tests/components/pzemdc/test.esp32-c3-idf.yaml b/tests/components/pzemdc/test.esp32-c3-idf.yaml index b516342f3b..6c6e95488f 100644 --- a/tests/components/pzemdc/test.esp32-c3-idf.yaml +++ b/tests/components/pzemdc/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/pzemdc/test.esp32-idf.yaml b/tests/components/pzemdc/test.esp32-idf.yaml index f486544afa..37d98696cc 100644 --- a/tests/components/pzemdc/test.esp32-idf.yaml +++ b/tests/components/pzemdc/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/pzemdc/test.esp8266-ard.yaml b/tests/components/pzemdc/test.esp8266-ard.yaml index b516342f3b..421389ae97 100644 --- a/tests/components/pzemdc/test.esp8266-ard.yaml +++ b/tests/components/pzemdc/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/pzemdc/test.rp2040-ard.yaml b/tests/components/pzemdc/test.rp2040-ard.yaml index b516342f3b..d78d84c983 100644 --- a/tests/components/pzemdc/test.rp2040-ard.yaml +++ b/tests/components/pzemdc/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/qmc5883l/common.yaml b/tests/components/qmc5883l/common.yaml index c8ad4ba006..98d0350a60 100644 --- a/tests/components/qmc5883l/common.yaml +++ b/tests/components/qmc5883l/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_qmc5883l - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: qmc5883l + i2c_id: i2c_bus address: 0x0D field_strength_x: name: QMC5883L Field Strength X diff --git a/tests/components/qmc5883l/test.esp32-c3-idf.yaml b/tests/components/qmc5883l/test.esp32-c3-idf.yaml index 677501d15a..854ddc25e7 100644 --- a/tests/components/qmc5883l/test.esp32-c3-idf.yaml +++ b/tests/components/qmc5883l/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 drdy_pin: GPIO6 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/qmc5883l/test.esp32-idf.yaml b/tests/components/qmc5883l/test.esp32-idf.yaml index 2cf2041501..07bf2b14e2 100644 --- a/tests/components/qmc5883l/test.esp32-idf.yaml +++ b/tests/components/qmc5883l/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 - drdy_pin: GPIO18 + drdy_pin: GPIO12 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/qmc5883l/test.esp8266-ard.yaml b/tests/components/qmc5883l/test.esp8266-ard.yaml index 65b0fd75d9..0c02b3b96a 100644 --- a/tests/components/qmc5883l/test.esp8266-ard.yaml +++ b/tests/components/qmc5883l/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 drdy_pin: GPIO2 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/qmc5883l/test.rp2040-ard.yaml b/tests/components/qmc5883l/test.rp2040-ard.yaml index 65b0fd75d9..3b10540b1f 100644 --- a/tests/components/qmc5883l/test.rp2040-ard.yaml +++ b/tests/components/qmc5883l/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 drdy_pin: GPIO2 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/qmp6988/common.yaml b/tests/components/qmp6988/common.yaml index cb4b221df0..2aea228a0d 100644 --- a/tests/components/qmp6988/common.yaml +++ b/tests/components/qmp6988/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_qmp6988 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: qmp6988 + i2c_id: i2c_bus temperature: name: QMP6988 Temperature oversampling: 32x diff --git a/tests/components/qmp6988/test.esp32-c3-idf.yaml b/tests/components/qmp6988/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/qmp6988/test.esp32-c3-idf.yaml +++ b/tests/components/qmp6988/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/qmp6988/test.esp32-idf.yaml b/tests/components/qmp6988/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/qmp6988/test.esp32-idf.yaml +++ b/tests/components/qmp6988/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/qmp6988/test.esp8266-ard.yaml b/tests/components/qmp6988/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/qmp6988/test.esp8266-ard.yaml +++ b/tests/components/qmp6988/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/qmp6988/test.rp2040-ard.yaml b/tests/components/qmp6988/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/qmp6988/test.rp2040-ard.yaml +++ b/tests/components/qmp6988/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/qr_code/common.yaml b/tests/components/qr_code/common.yaml index 85c2ee076b..5fec26c1cc 100644 --- a/tests/components/qr_code/common.yaml +++ b/tests/components/qr_code/common.yaml @@ -1,11 +1,6 @@ -spi: - - id: spi_main_lcd - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ili9xxx - id: main_lcd + id: qr_code_main_lcd model: ili9342 cs_pin: ${cs_pin} dc_pin: ${dc_pin} @@ -14,11 +9,11 @@ display: lambda: |- // Draw a QR code in the center of the screen auto scale = 2; - auto size = id(homepage_qr).get_size() * scale; + auto size = id(qr_code_homepage_qr).get_size() * scale; auto x = (it.get_width() / 2) - (size / 2); auto y = (it.get_height() / 2) - (size / 2); - it.qr_code(x, y, id(homepage_qr), Color(255,255,255), scale); + it.qr_code(x, y, id(qr_code_homepage_qr), Color(255,255,255), scale); qr_code: - - id: homepage_qr + - id: qr_code_homepage_qr value: https://esphome.io/index.html diff --git a/tests/components/qr_code/test.esp32-c3-idf.yaml b/tests/components/qr_code/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/qr_code/test.esp32-c3-idf.yaml +++ b/tests/components/qr_code/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/qr_code/test.esp32-idf.yaml b/tests/components/qr_code/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/qr_code/test.esp32-idf.yaml +++ b/tests/components/qr_code/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/qr_code/test.esp8266-ard.yaml b/tests/components/qr_code/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/qr_code/test.esp8266-ard.yaml +++ b/tests/components/qr_code/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/qr_code/test.rp2040-ard.yaml b/tests/components/qr_code/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/qr_code/test.rp2040-ard.yaml +++ b/tests/components/qr_code/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/qspi_dbi/common.yaml b/tests/components/qspi_dbi/common.yaml index f4b15f2b90..109db65b63 100644 --- a/tests/components/qspi_dbi/common.yaml +++ b/tests/components/qspi_dbi/common.yaml @@ -1,9 +1,3 @@ -spi: - id: quad_spi - clk_pin: 15 - type: quad - data_pins: [14, 10, 16, 12] - display: - platform: qspi_dbi model: RM690B0 diff --git a/tests/components/qspi_dbi/test.esp32-s3-idf.yaml b/tests/components/qspi_dbi/test.esp32-s3-idf.yaml index dade44d145..c335dee1f3 100644 --- a/tests/components/qspi_dbi/test.esp32-s3-idf.yaml +++ b/tests/components/qspi_dbi/test.esp32-s3-idf.yaml @@ -1 +1,4 @@ +packages: + qspi: !include ../../test_build_components/common/qspi/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/qwiic_pir/common.yaml b/tests/components/qwiic_pir/common.yaml index d4b733405d..30418ff6b9 100644 --- a/tests/components/qwiic_pir/common.yaml +++ b/tests/components/qwiic_pir/common.yaml @@ -1,8 +1,4 @@ -i2c: - - id: i2c_qwiic_pir - scl: ${scl_pin} - sda: ${sda_pin} - binary_sensor: - platform: qwiic_pir + i2c_id: i2c_bus name: Qwiic PIR Motion Sensor diff --git a/tests/components/qwiic_pir/test.esp32-c3-idf.yaml b/tests/components/qwiic_pir/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/qwiic_pir/test.esp32-c3-idf.yaml +++ b/tests/components/qwiic_pir/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/qwiic_pir/test.esp32-idf.yaml b/tests/components/qwiic_pir/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/qwiic_pir/test.esp32-idf.yaml +++ b/tests/components/qwiic_pir/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/qwiic_pir/test.esp8266-ard.yaml b/tests/components/qwiic_pir/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/qwiic_pir/test.esp8266-ard.yaml +++ b/tests/components/qwiic_pir/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/qwiic_pir/test.rp2040-ard.yaml b/tests/components/qwiic_pir/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/qwiic_pir/test.rp2040-ard.yaml +++ b/tests/components/qwiic_pir/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml b/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml +++ b/tests/components/radon_eye_ble/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/radon_eye_ble/test.esp32-idf.yaml b/tests/components/radon_eye_ble/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/radon_eye_ble/test.esp32-idf.yaml +++ b/tests/components/radon_eye_ble/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml b/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml +++ b/tests/components/radon_eye_rd200/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/radon_eye_rd200/test.esp32-idf.yaml b/tests/components/radon_eye_rd200/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/radon_eye_rd200/test.esp32-idf.yaml +++ b/tests/components/radon_eye_rd200/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/rc522_i2c/common.yaml b/tests/components/rc522_i2c/common.yaml index b8b7a41bc7..65b92a3e78 100644 --- a/tests/components/rc522_i2c/common.yaml +++ b/tests/components/rc522_i2c/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_rc522 - scl: ${scl_pin} - sda: ${sda_pin} - rc522_i2c: - id: rc522_nfcc + i2c_id: i2c_bus update_interval: 1s on_tag: - lambda: |- diff --git a/tests/components/rc522_i2c/test.esp32-c3-idf.yaml b/tests/components/rc522_i2c/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/rc522_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/rc522_i2c/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/rc522_i2c/test.esp32-idf.yaml b/tests/components/rc522_i2c/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/rc522_i2c/test.esp32-idf.yaml +++ b/tests/components/rc522_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/rc522_i2c/test.esp8266-ard.yaml b/tests/components/rc522_i2c/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/rc522_i2c/test.esp8266-ard.yaml +++ b/tests/components/rc522_i2c/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/rc522_i2c/test.rp2040-ard.yaml b/tests/components/rc522_i2c/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/rc522_i2c/test.rp2040-ard.yaml +++ b/tests/components/rc522_i2c/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/rc522_spi/common.yaml b/tests/components/rc522_spi/common.yaml index 5c42858993..4ce1d6584b 100644 --- a/tests/components/rc522_spi/common.yaml +++ b/tests/components/rc522_spi/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_rc522 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - rc522_spi: id: rc522_nfcc cs_pin: ${cs_pin} diff --git a/tests/components/rc522_spi/test.esp32-c3-idf.yaml b/tests/components/rc522_spi/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/rc522_spi/test.esp32-c3-idf.yaml +++ b/tests/components/rc522_spi/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/rc522_spi/test.esp32-idf.yaml b/tests/components/rc522_spi/test.esp32-idf.yaml index 54e027a614..a3352cf880 100644 --- a/tests/components/rc522_spi/test.esp32-idf.yaml +++ b/tests/components/rc522_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/rc522_spi/test.esp8266-ard.yaml b/tests/components/rc522_spi/test.esp8266-ard.yaml index dbd158d030..b4673ba8b7 100644 --- a/tests/components/rc522_spi/test.esp8266-ard.yaml +++ b/tests/components/rc522_spi/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO16 cs_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/rc522_spi/test.rp2040-ard.yaml b/tests/components/rc522_spi/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/rc522_spi/test.rp2040-ard.yaml +++ b/tests/components/rc522_spi/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/rdm6300/common.yaml b/tests/components/rdm6300/common.yaml index 118a295471..f1a5305013 100644 --- a/tests/components/rdm6300/common.yaml +++ b/tests/components/rdm6300/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_rdm6300 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - rdm6300: binary_sensor: diff --git a/tests/components/rdm6300/test.esp32-c3-idf.yaml b/tests/components/rdm6300/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/rdm6300/test.esp32-c3-idf.yaml +++ b/tests/components/rdm6300/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/rdm6300/test.esp32-idf.yaml b/tests/components/rdm6300/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/rdm6300/test.esp32-idf.yaml +++ b/tests/components/rdm6300/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/rdm6300/test.esp8266-ard.yaml b/tests/components/rdm6300/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/rdm6300/test.esp8266-ard.yaml +++ b/tests/components/rdm6300/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/rdm6300/test.rp2040-ard.yaml b/tests/components/rdm6300/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/rdm6300/test.rp2040-ard.yaml +++ b/tests/components/rdm6300/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/remote_receiver/test.esp32-s3-idf.yaml b/tests/components/remote_receiver/test.esp32-s3-idf.yaml index cdae8b1e4e..0d7a20e0c0 100644 --- a/tests/components/remote_receiver/test.esp32-s3-idf.yaml +++ b/tests/components/remote_receiver/test.esp32-s3-idf.yaml @@ -5,9 +5,22 @@ substitutions: receive_symbols: "4" rmt_symbols: "64" -packages: - common: !include esp32-common.yaml - +# WARNING: Using !extend or !remove prevents automatic component grouping in CI, making builds slower. remote_receiver: - - id: !extend rcvr + - id: rcvr + pin: ${pin} + dump: all + tolerance: 25% + clock_resolution: ${clock_resolution} + filter_symbols: ${filter_symbols} + receive_symbols: ${receive_symbols} + rmt_symbols: ${rmt_symbols} use_dma: "true" + <<: !include common-actions.yaml + +binary_sensor: + - platform: remote_receiver + name: Panasonic Remote Input + panasonic: + address: 0x4004 + command: 0x100BCBD diff --git a/tests/components/remote_transmitter/test.esp32-s3-idf.yaml b/tests/components/remote_transmitter/test.esp32-s3-idf.yaml index fe4c46d9e7..8a038beb4a 100644 --- a/tests/components/remote_transmitter/test.esp32-s3-idf.yaml +++ b/tests/components/remote_transmitter/test.esp32-s3-idf.yaml @@ -3,9 +3,14 @@ substitutions: clock_resolution: "2000000" rmt_symbols: "64" -packages: - common: !include esp32-common.yaml - +# WARNING: Using !extend or !remove prevents automatic component grouping in CI, making builds slower. remote_transmitter: - - id: !extend xmitr + - id: xmitr + pin: ${pin} + carrier_duty_percent: 50% + clock_resolution: ${clock_resolution} + rmt_symbols: ${rmt_symbols} use_dma: "true" + +packages: + buttons: !include common-buttons.yaml diff --git a/tests/components/resampler/test.esp32-idf.yaml b/tests/components/resampler/test.esp32-idf.yaml index 96d2d37458..6712f1e468 100644 --- a/tests/components/resampler/test.esp32-idf.yaml +++ b/tests/components/resampler/test.esp32-idf.yaml @@ -1,7 +1,10 @@ substitutions: - lrclk_pin: GPIO16 - bclk_pin: GPIO17 + lrclk_pin: GPIO4 + bclk_pin: GPIO5 mclk_pin: GPIO15 dout_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/rf_bridge/common.yaml b/tests/components/rf_bridge/common.yaml index eaadc4bb9c..427c3d783d 100644 --- a/tests/components/rf_bridge/common.yaml +++ b/tests/components/rf_bridge/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_rf_bridge - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - rf_bridge: on_code_received: - lambda: |- diff --git a/tests/components/rf_bridge/test.esp32-c3-idf.yaml b/tests/components/rf_bridge/test.esp32-c3-idf.yaml index b516342f3b..a19013bf54 100644 --- a/tests/components/rf_bridge/test.esp32-c3-idf.yaml +++ b/tests/components/rf_bridge/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/rf_bridge/test.esp32-idf.yaml b/tests/components/rf_bridge/test.esp32-idf.yaml index f486544afa..2d29656c94 100644 --- a/tests/components/rf_bridge/test.esp32-idf.yaml +++ b/tests/components/rf_bridge/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/rf_bridge/test.esp8266-ard.yaml b/tests/components/rf_bridge/test.esp8266-ard.yaml index b516342f3b..5a05efa259 100644 --- a/tests/components/rf_bridge/test.esp8266-ard.yaml +++ b/tests/components/rf_bridge/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/rf_bridge/test.rp2040-ard.yaml b/tests/components/rf_bridge/test.rp2040-ard.yaml index b516342f3b..f1df2daf83 100644 --- a/tests/components/rf_bridge/test.rp2040-ard.yaml +++ b/tests/components/rf_bridge/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml b/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml +++ b/tests/components/ruuvi_ble/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ruuvi_ble/test.esp32-idf.yaml b/tests/components/ruuvi_ble/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/ruuvi_ble/test.esp32-idf.yaml +++ b/tests/components/ruuvi_ble/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ruuvitag/test.esp32-c3-idf.yaml b/tests/components/ruuvitag/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/ruuvitag/test.esp32-c3-idf.yaml +++ b/tests/components/ruuvitag/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ruuvitag/test.esp32-idf.yaml b/tests/components/ruuvitag/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/ruuvitag/test.esp32-idf.yaml +++ b/tests/components/ruuvitag/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/scd30/common.yaml b/tests/components/scd30/common.yaml index 1c45c67af0..f21d8944dc 100644 --- a/tests/components/scd30/common.yaml +++ b/tests/components/scd30/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_scd30 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: scd30 + i2c_id: i2c_bus co2: name: SCD30 CO2 temperature: diff --git a/tests/components/scd30/test.esp32-c3-idf.yaml b/tests/components/scd30/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/scd30/test.esp32-c3-idf.yaml +++ b/tests/components/scd30/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/scd30/test.esp32-idf.yaml b/tests/components/scd30/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/scd30/test.esp32-idf.yaml +++ b/tests/components/scd30/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/scd30/test.esp8266-ard.yaml b/tests/components/scd30/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/scd30/test.esp8266-ard.yaml +++ b/tests/components/scd30/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/scd30/test.rp2040-ard.yaml b/tests/components/scd30/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/scd30/test.rp2040-ard.yaml +++ b/tests/components/scd30/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/scd4x/common.yaml b/tests/components/scd4x/common.yaml index dfd35e57de..cedb88977e 100644 --- a/tests/components/scd4x/common.yaml +++ b/tests/components/scd4x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_scd4x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: scd4x + i2c_id: i2c_bus id: scd40 co2: name: SCD4X CO2 diff --git a/tests/components/scd4x/test.esp32-c3-idf.yaml b/tests/components/scd4x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/scd4x/test.esp32-c3-idf.yaml +++ b/tests/components/scd4x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/scd4x/test.esp32-idf.yaml b/tests/components/scd4x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/scd4x/test.esp32-idf.yaml +++ b/tests/components/scd4x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/scd4x/test.esp8266-ard.yaml b/tests/components/scd4x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/scd4x/test.esp8266-ard.yaml +++ b/tests/components/scd4x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/scd4x/test.rp2040-ard.yaml b/tests/components/scd4x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/scd4x/test.rp2040-ard.yaml +++ b/tests/components/scd4x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sdm_meter/common.yaml b/tests/components/sdm_meter/common.yaml index 60c71a796b..760f134451 100644 --- a/tests/components/sdm_meter/common.yaml +++ b/tests/components/sdm_meter/common.yaml @@ -1,11 +1,6 @@ -uart: - - id: uart_sdm_meter - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: sdm_meter + modbus_id: modbus_bus phase_a: current: name: Phase A Current diff --git a/tests/components/sdm_meter/test.esp32-c3-idf.yaml b/tests/components/sdm_meter/test.esp32-c3-idf.yaml index b516342f3b..6c6e95488f 100644 --- a/tests/components/sdm_meter/test.esp32-c3-idf.yaml +++ b/tests/components/sdm_meter/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sdm_meter/test.esp32-idf.yaml b/tests/components/sdm_meter/test.esp32-idf.yaml index f486544afa..37d98696cc 100644 --- a/tests/components/sdm_meter/test.esp32-idf.yaml +++ b/tests/components/sdm_meter/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sdm_meter/test.esp8266-ard.yaml b/tests/components/sdm_meter/test.esp8266-ard.yaml index b516342f3b..421389ae97 100644 --- a/tests/components/sdm_meter/test.esp8266-ard.yaml +++ b/tests/components/sdm_meter/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sdm_meter/test.rp2040-ard.yaml b/tests/components/sdm_meter/test.rp2040-ard.yaml index b516342f3b..d78d84c983 100644 --- a/tests/components/sdm_meter/test.rp2040-ard.yaml +++ b/tests/components/sdm_meter/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sdp3x/common.yaml b/tests/components/sdp3x/common.yaml index d3c5491ca5..5d06f8eddb 100644 --- a/tests/components/sdp3x/common.yaml +++ b/tests/components/sdp3x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sdp3x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sdp3x + i2c_id: i2c_bus id: filter_pressure name: HVAC Filter Pressure drop accuracy_decimals: 3 diff --git a/tests/components/sdp3x/test.esp32-c3-idf.yaml b/tests/components/sdp3x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sdp3x/test.esp32-c3-idf.yaml +++ b/tests/components/sdp3x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sdp3x/test.esp32-idf.yaml b/tests/components/sdp3x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sdp3x/test.esp32-idf.yaml +++ b/tests/components/sdp3x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sdp3x/test.esp8266-ard.yaml b/tests/components/sdp3x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sdp3x/test.esp8266-ard.yaml +++ b/tests/components/sdp3x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sdp3x/test.rp2040-ard.yaml b/tests/components/sdp3x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sdp3x/test.rp2040-ard.yaml +++ b/tests/components/sdp3x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sds011/common.yaml b/tests/components/sds011/common.yaml index c7574e1d7d..abae0f9bd8 100644 --- a/tests/components/sds011/common.yaml +++ b/tests/components/sds011/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_sdm_sds011 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - sensor: - platform: sds011 pm_2_5: diff --git a/tests/components/sds011/test.esp32-c3-idf.yaml b/tests/components/sds011/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/sds011/test.esp32-c3-idf.yaml +++ b/tests/components/sds011/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sds011/test.esp32-idf.yaml b/tests/components/sds011/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/sds011/test.esp32-idf.yaml +++ b/tests/components/sds011/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sds011/test.esp8266-ard.yaml b/tests/components/sds011/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/sds011/test.esp8266-ard.yaml +++ b/tests/components/sds011/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sds011/test.rp2040-ard.yaml b/tests/components/sds011/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/sds011/test.rp2040-ard.yaml +++ b/tests/components/sds011/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/seeed_mr24hpc1/common.yaml b/tests/components/seeed_mr24hpc1/common.yaml index 38692b3e5e..3a52888c5c 100644 --- a/tests/components/seeed_mr24hpc1/common.yaml +++ b/tests/components/seeed_mr24hpc1/common.yaml @@ -1,14 +1,5 @@ -uart: - - id: seeed_mr24hpc1_uart - tx_pin: ${uart_tx_pin} - rx_pin: ${uart_rx_pin} - baud_rate: 115200 - parity: NONE - stop_bits: 1 - seeed_mr24hpc1: id: my_seeed_mr24hpc1 - uart_id: seeed_mr24hpc1_uart sensor: - platform: seeed_mr24hpc1 diff --git a/tests/components/seeed_mr24hpc1/test.esp32-c3-idf.yaml b/tests/components/seeed_mr24hpc1/test.esp32-c3-idf.yaml index 4fb884abf4..a19013bf54 100644 --- a/tests/components/seeed_mr24hpc1/test.esp32-c3-idf.yaml +++ b/tests/components/seeed_mr24hpc1/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - uart_tx_pin: GPIO5 - uart_rx_pin: GPIO4 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/seeed_mr60bha2/common.yaml b/tests/components/seeed_mr60bha2/common.yaml index 9eb0c8d527..7d1a02b3ea 100644 --- a/tests/components/seeed_mr60bha2/common.yaml +++ b/tests/components/seeed_mr60bha2/common.yaml @@ -1,11 +1,3 @@ -uart: - - id: seeed_mr60fda2_uart - tx_pin: ${uart_tx_pin} - rx_pin: ${uart_rx_pin} - baud_rate: 115200 - parity: NONE - stop_bits: 1 - seeed_mr60bha2: id: my_seeed_mr60bha2 diff --git a/tests/components/seeed_mr60bha2/test.esp32-c3-idf.yaml b/tests/components/seeed_mr60bha2/test.esp32-c3-idf.yaml index 4fb884abf4..fea89f5768 100644 --- a/tests/components/seeed_mr60bha2/test.esp32-c3-idf.yaml +++ b/tests/components/seeed_mr60bha2/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - uart_tx_pin: GPIO5 - uart_rx_pin: GPIO4 +packages: + uart_115200: !include ../../test_build_components/common/uart_115200/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/seeed_mr60fda2/common.yaml b/tests/components/seeed_mr60fda2/common.yaml index 55a7cc1ab3..e0e4614481 100644 --- a/tests/components/seeed_mr60fda2/common.yaml +++ b/tests/components/seeed_mr60fda2/common.yaml @@ -1,14 +1,5 @@ -uart: - - id: seeed_mr60fda2_uart - tx_pin: ${uart_tx_pin} - rx_pin: ${uart_rx_pin} - baud_rate: 115200 - parity: NONE - stop_bits: 1 - seeed_mr60fda2: id: my_seeed_mr60fda2 - uart_id: seeed_mr60fda2_uart binary_sensor: - platform: seeed_mr60fda2 diff --git a/tests/components/seeed_mr60fda2/test.esp32-c3-idf.yaml b/tests/components/seeed_mr60fda2/test.esp32-c3-idf.yaml index 4fb884abf4..fea89f5768 100644 --- a/tests/components/seeed_mr60fda2/test.esp32-c3-idf.yaml +++ b/tests/components/seeed_mr60fda2/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - uart_tx_pin: GPIO5 - uart_rx_pin: GPIO4 +packages: + uart_115200: !include ../../test_build_components/common/uart_115200/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/selec_meter/common.yaml b/tests/components/selec_meter/common.yaml index f2714ce828..2febbee540 100644 --- a/tests/components/selec_meter/common.yaml +++ b/tests/components/selec_meter/common.yaml @@ -1,11 +1,6 @@ -uart: - - id: uart_selec_meter - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: selec_meter + modbus_id: modbus_bus total_active_energy: name: SelecEM2M Total Active Energy import_active_energy: diff --git a/tests/components/selec_meter/test.esp32-c3-idf.yaml b/tests/components/selec_meter/test.esp32-c3-idf.yaml index b516342f3b..beb90e1471 100644 --- a/tests/components/selec_meter/test.esp32-c3-idf.yaml +++ b/tests/components/selec_meter/test.esp32-c3-idf.yaml @@ -1,5 +1,7 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + flow_control_pin: GPIO10 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/selec_meter/test.esp32-idf.yaml b/tests/components/selec_meter/test.esp32-idf.yaml index f486544afa..4df9f5863e 100644 --- a/tests/components/selec_meter/test.esp32-idf.yaml +++ b/tests/components/selec_meter/test.esp32-idf.yaml @@ -1,5 +1,9 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + flow_control_pin: GPIO26 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/selec_meter/test.esp8266-ard.yaml b/tests/components/selec_meter/test.esp8266-ard.yaml index b516342f3b..48a7307795 100644 --- a/tests/components/selec_meter/test.esp8266-ard.yaml +++ b/tests/components/selec_meter/test.esp8266-ard.yaml @@ -1,5 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + flow_control_pin: GPIO4 + +packages: + modbus: !include ../../test_build_components/common/modbus/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/selec_meter/test.rp2040-ard.yaml b/tests/components/selec_meter/test.rp2040-ard.yaml index b516342f3b..a65500ccc3 100644 --- a/tests/components/selec_meter/test.rp2040-ard.yaml +++ b/tests/components/selec_meter/test.rp2040-ard.yaml @@ -1,5 +1,9 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 + flow_control_pin: GPIO6 + +packages: + modbus: !include ../../test_build_components/common/modbus/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sen0321/common.yaml b/tests/components/sen0321/common.yaml index 8b9fdff4a1..9228c7b820 100644 --- a/tests/components/sen0321/common.yaml +++ b/tests/components/sen0321/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sen0321 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sen0321 + i2c_id: i2c_bus name: Workshop Ozone Sensor id: sen0321_ozone update_interval: 10s diff --git a/tests/components/sen0321/test.esp32-c3-idf.yaml b/tests/components/sen0321/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sen0321/test.esp32-c3-idf.yaml +++ b/tests/components/sen0321/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sen0321/test.esp32-idf.yaml b/tests/components/sen0321/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sen0321/test.esp32-idf.yaml +++ b/tests/components/sen0321/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sen0321/test.esp8266-ard.yaml b/tests/components/sen0321/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sen0321/test.esp8266-ard.yaml +++ b/tests/components/sen0321/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sen0321/test.rp2040-ard.yaml b/tests/components/sen0321/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sen0321/test.rp2040-ard.yaml +++ b/tests/components/sen0321/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sen21231/common.yaml b/tests/components/sen21231/common.yaml index 6fa1d04aa2..bfe0f9d7f8 100644 --- a/tests/components/sen21231/common.yaml +++ b/tests/components/sen21231/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_sen21231 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sen21231 + i2c_id: i2c_bus id: sen21231_sensor1 name: Person Sensor diff --git a/tests/components/sen21231/test.esp32-c3-idf.yaml b/tests/components/sen21231/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sen21231/test.esp32-c3-idf.yaml +++ b/tests/components/sen21231/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sen21231/test.esp32-idf.yaml b/tests/components/sen21231/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sen21231/test.esp32-idf.yaml +++ b/tests/components/sen21231/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sen21231/test.esp8266-ard.yaml b/tests/components/sen21231/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sen21231/test.esp8266-ard.yaml +++ b/tests/components/sen21231/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sen21231/test.rp2040-ard.yaml b/tests/components/sen21231/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sen21231/test.rp2040-ard.yaml +++ b/tests/components/sen21231/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sen5x/common.yaml b/tests/components/sen5x/common.yaml index 9adf268048..a4462a16ea 100644 --- a/tests/components/sen5x/common.yaml +++ b/tests/components/sen5x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sen5x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sen5x + i2c_id: i2c_bus id: sen54 temperature: name: Temperature diff --git a/tests/components/sen5x/test.esp32-c3-idf.yaml b/tests/components/sen5x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sen5x/test.esp32-c3-idf.yaml +++ b/tests/components/sen5x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sen5x/test.esp32-idf.yaml b/tests/components/sen5x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sen5x/test.esp32-idf.yaml +++ b/tests/components/sen5x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sen5x/test.esp8266-ard.yaml b/tests/components/sen5x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sen5x/test.esp8266-ard.yaml +++ b/tests/components/sen5x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sen5x/test.rp2040-ard.yaml b/tests/components/sen5x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sen5x/test.rp2040-ard.yaml +++ b/tests/components/sen5x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/senseair/common.yaml b/tests/components/senseair/common.yaml index 23a933affe..c8066896d0 100644 --- a/tests/components/senseair/common.yaml +++ b/tests/components/senseair/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_senseair - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: senseair id: senseair0 diff --git a/tests/components/senseair/test.esp32-c3-idf.yaml b/tests/components/senseair/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/senseair/test.esp32-c3-idf.yaml +++ b/tests/components/senseair/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/senseair/test.esp32-idf.yaml b/tests/components/senseair/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/senseair/test.esp32-idf.yaml +++ b/tests/components/senseair/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/senseair/test.esp8266-ard.yaml b/tests/components/senseair/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/senseair/test.esp8266-ard.yaml +++ b/tests/components/senseair/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/senseair/test.rp2040-ard.yaml b/tests/components/senseair/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/senseair/test.rp2040-ard.yaml +++ b/tests/components/senseair/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sfa30/common.yaml b/tests/components/sfa30/common.yaml index e3b38aa7fb..3cd2483abc 100644 --- a/tests/components/sfa30/common.yaml +++ b/tests/components/sfa30/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sfa30 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sfa30 + i2c_id: i2c_bus formaldehyde: name: SFA30 formaldehyde temperature: diff --git a/tests/components/sfa30/test.esp32-c3-idf.yaml b/tests/components/sfa30/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sfa30/test.esp32-c3-idf.yaml +++ b/tests/components/sfa30/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sfa30/test.esp32-idf.yaml b/tests/components/sfa30/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sfa30/test.esp32-idf.yaml +++ b/tests/components/sfa30/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sfa30/test.esp8266-ard.yaml b/tests/components/sfa30/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sfa30/test.esp8266-ard.yaml +++ b/tests/components/sfa30/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sfa30/test.rp2040-ard.yaml b/tests/components/sfa30/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sfa30/test.rp2040-ard.yaml +++ b/tests/components/sfa30/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sgp30/common.yaml b/tests/components/sgp30/common.yaml index 1db5bc67d1..9d4ed46615 100644 --- a/tests/components/sgp30/common.yaml +++ b/tests/components/sgp30/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sgp30 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sgp30 + i2c_id: i2c_bus eco2: name: Workshop eCO2 accuracy_decimals: 1 diff --git a/tests/components/sgp30/test.esp32-c3-idf.yaml b/tests/components/sgp30/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sgp30/test.esp32-c3-idf.yaml +++ b/tests/components/sgp30/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sgp30/test.esp32-idf.yaml b/tests/components/sgp30/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sgp30/test.esp32-idf.yaml +++ b/tests/components/sgp30/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sgp30/test.esp8266-ard.yaml b/tests/components/sgp30/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sgp30/test.esp8266-ard.yaml +++ b/tests/components/sgp30/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sgp30/test.rp2040-ard.yaml b/tests/components/sgp30/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sgp30/test.rp2040-ard.yaml +++ b/tests/components/sgp30/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sgp4x/common.yaml b/tests/components/sgp4x/common.yaml index adb678d542..4edda8fd1b 100644 --- a/tests/components/sgp4x/common.yaml +++ b/tests/components/sgp4x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sgp4x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sgp4x + i2c_id: i2c_bus voc: name: VOC Index id: sgp40_voc_index diff --git a/tests/components/sgp4x/test.esp32-c3-idf.yaml b/tests/components/sgp4x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sgp4x/test.esp32-c3-idf.yaml +++ b/tests/components/sgp4x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sgp4x/test.esp32-idf.yaml b/tests/components/sgp4x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sgp4x/test.esp32-idf.yaml +++ b/tests/components/sgp4x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sgp4x/test.esp8266-ard.yaml b/tests/components/sgp4x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sgp4x/test.esp8266-ard.yaml +++ b/tests/components/sgp4x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sgp4x/test.rp2040-ard.yaml b/tests/components/sgp4x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sgp4x/test.rp2040-ard.yaml +++ b/tests/components/sgp4x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/shelly_dimmer/common.yaml b/tests/components/shelly_dimmer/common.yaml index 3acd0260d5..ba36fa995d 100644 --- a/tests/components/shelly_dimmer/common.yaml +++ b/tests/components/shelly_dimmer/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_shelly_dimmer - tx_pin: 4 - rx_pin: 5 - baud_rate: 9600 - light: - platform: shelly_dimmer name: Shelly Dimmer Light diff --git a/tests/components/shelly_dimmer/test.esp8266-ard.yaml b/tests/components/shelly_dimmer/test.esp8266-ard.yaml index dade44d145..80a2cb2fc0 100644 --- a/tests/components/shelly_dimmer/test.esp8266-ard.yaml +++ b/tests/components/shelly_dimmer/test.esp8266-ard.yaml @@ -1 +1,4 @@ +packages: + uart_115200: !include ../../test_build_components/common/uart_115200/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sht3xd/common.yaml b/tests/components/sht3xd/common.yaml index 2426ebfbb9..02ce521747 100644 --- a/tests/components/sht3xd/common.yaml +++ b/tests/components/sht3xd/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sht3xd - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sht3xd + i2c_id: i2c_bus temperature: name: SHT3XD Temperature humidity: diff --git a/tests/components/sht3xd/test.esp32-c3-idf.yaml b/tests/components/sht3xd/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sht3xd/test.esp32-c3-idf.yaml +++ b/tests/components/sht3xd/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sht3xd/test.esp32-idf.yaml b/tests/components/sht3xd/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sht3xd/test.esp32-idf.yaml +++ b/tests/components/sht3xd/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sht3xd/test.esp8266-ard.yaml b/tests/components/sht3xd/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sht3xd/test.esp8266-ard.yaml +++ b/tests/components/sht3xd/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sht3xd/test.rp2040-ard.yaml b/tests/components/sht3xd/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sht3xd/test.rp2040-ard.yaml +++ b/tests/components/sht3xd/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sht4x/common.yaml b/tests/components/sht4x/common.yaml index 703a8fa32b..50d5ad8ca4 100644 --- a/tests/components/sht4x/common.yaml +++ b/tests/components/sht4x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sht4x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sht4x + i2c_id: i2c_bus temperature: name: SHT4X Temperature humidity: diff --git a/tests/components/sht4x/test.esp32-c3-idf.yaml b/tests/components/sht4x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sht4x/test.esp32-c3-idf.yaml +++ b/tests/components/sht4x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sht4x/test.esp32-idf.yaml b/tests/components/sht4x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sht4x/test.esp32-idf.yaml +++ b/tests/components/sht4x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sht4x/test.esp8266-ard.yaml b/tests/components/sht4x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sht4x/test.esp8266-ard.yaml +++ b/tests/components/sht4x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sht4x/test.rp2040-ard.yaml b/tests/components/sht4x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sht4x/test.rp2040-ard.yaml +++ b/tests/components/sht4x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/shtcx/common.yaml b/tests/components/shtcx/common.yaml index 0211319124..a326a1b4d6 100644 --- a/tests/components/shtcx/common.yaml +++ b/tests/components/shtcx/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_shtcx - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: shtcx + i2c_id: i2c_bus temperature: name: SHTCX Temperature humidity: diff --git a/tests/components/shtcx/test.esp32-c3-idf.yaml b/tests/components/shtcx/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/shtcx/test.esp32-c3-idf.yaml +++ b/tests/components/shtcx/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/shtcx/test.esp32-idf.yaml b/tests/components/shtcx/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/shtcx/test.esp32-idf.yaml +++ b/tests/components/shtcx/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/shtcx/test.esp8266-ard.yaml b/tests/components/shtcx/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/shtcx/test.esp8266-ard.yaml +++ b/tests/components/shtcx/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/shtcx/test.rp2040-ard.yaml b/tests/components/shtcx/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/shtcx/test.rp2040-ard.yaml +++ b/tests/components/shtcx/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sim800l/common.yaml b/tests/components/sim800l/common.yaml index 1b4e2e1af6..503637b35f 100644 --- a/tests/components/sim800l/common.yaml +++ b/tests/components/sim800l/common.yaml @@ -11,12 +11,6 @@ esphome: - sim800l.send_ussd: ussd: test_ussd -uart: - - id: uart_sim800l - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sim800l: on_sms_received: - lambda: |- diff --git a/tests/components/sim800l/test.esp32-c3-idf.yaml b/tests/components/sim800l/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/sim800l/test.esp32-c3-idf.yaml +++ b/tests/components/sim800l/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sim800l/test.esp32-idf.yaml b/tests/components/sim800l/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/sim800l/test.esp32-idf.yaml +++ b/tests/components/sim800l/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sim800l/test.esp8266-ard.yaml b/tests/components/sim800l/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/sim800l/test.esp8266-ard.yaml +++ b/tests/components/sim800l/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sim800l/test.rp2040-ard.yaml b/tests/components/sim800l/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/sim800l/test.rp2040-ard.yaml +++ b/tests/components/sim800l/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sm16716/test.esp32-idf.yaml b/tests/components/sm16716/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/sm16716/test.esp32-idf.yaml +++ b/tests/components/sm16716/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/sm16716/test.esp8266-ard.yaml b/tests/components/sm16716/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/sm16716/test.esp8266-ard.yaml +++ b/tests/components/sm16716/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/sm2135/test.esp32-idf.yaml b/tests/components/sm2135/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/sm2135/test.esp32-idf.yaml +++ b/tests/components/sm2135/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/sm2135/test.esp8266-ard.yaml b/tests/components/sm2135/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/sm2135/test.esp8266-ard.yaml +++ b/tests/components/sm2135/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/sm2235/test.esp32-idf.yaml b/tests/components/sm2235/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/sm2235/test.esp32-idf.yaml +++ b/tests/components/sm2235/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/sm2235/test.esp8266-ard.yaml b/tests/components/sm2235/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/sm2235/test.esp8266-ard.yaml +++ b/tests/components/sm2235/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/sm2335/test.esp32-idf.yaml b/tests/components/sm2335/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/sm2335/test.esp32-idf.yaml +++ b/tests/components/sm2335/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/sm2335/test.esp8266-ard.yaml b/tests/components/sm2335/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/sm2335/test.esp8266-ard.yaml +++ b/tests/components/sm2335/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/sm300d2/common.yaml b/tests/components/sm300d2/common.yaml index a231b63816..729f243a65 100644 --- a/tests/components/sm300d2/common.yaml +++ b/tests/components/sm300d2/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_sm300d2 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: sm300d2 co2: diff --git a/tests/components/sm300d2/test.esp32-c3-idf.yaml b/tests/components/sm300d2/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/sm300d2/test.esp32-c3-idf.yaml +++ b/tests/components/sm300d2/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sm300d2/test.esp32-idf.yaml b/tests/components/sm300d2/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/sm300d2/test.esp32-idf.yaml +++ b/tests/components/sm300d2/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sm300d2/test.esp8266-ard.yaml b/tests/components/sm300d2/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/sm300d2/test.esp8266-ard.yaml +++ b/tests/components/sm300d2/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sm300d2/test.rp2040-ard.yaml b/tests/components/sm300d2/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/sm300d2/test.rp2040-ard.yaml +++ b/tests/components/sm300d2/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sml/common.yaml b/tests/components/sml/common.yaml index a50d25eeee..b1bd5949b6 100644 --- a/tests/components/sml/common.yaml +++ b/tests/components/sml/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_sml - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sml: id: mysml on_data: diff --git a/tests/components/sml/test.esp32-c3-idf.yaml b/tests/components/sml/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/sml/test.esp32-c3-idf.yaml +++ b/tests/components/sml/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sml/test.esp32-idf.yaml b/tests/components/sml/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/sml/test.esp32-idf.yaml +++ b/tests/components/sml/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sml/test.esp8266-ard.yaml b/tests/components/sml/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/sml/test.esp8266-ard.yaml +++ b/tests/components/sml/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sml/test.rp2040-ard.yaml b/tests/components/sml/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/sml/test.rp2040-ard.yaml +++ b/tests/components/sml/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/smt100/common.yaml b/tests/components/smt100/common.yaml index b12d7198fd..86c5636b94 100644 --- a/tests/components/smt100/common.yaml +++ b/tests/components/smt100/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_smt100 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: smt100 counts: diff --git a/tests/components/smt100/test.esp32-c3-idf.yaml b/tests/components/smt100/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/smt100/test.esp32-c3-idf.yaml +++ b/tests/components/smt100/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/smt100/test.esp32-idf.yaml b/tests/components/smt100/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/smt100/test.esp32-idf.yaml +++ b/tests/components/smt100/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/smt100/test.esp8266-ard.yaml b/tests/components/smt100/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/smt100/test.esp8266-ard.yaml +++ b/tests/components/smt100/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/smt100/test.rp2040-ard.yaml b/tests/components/smt100/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/smt100/test.rp2040-ard.yaml +++ b/tests/components/smt100/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sn74hc165/test.esp32-idf.yaml b/tests/components/sn74hc165/test.esp32-idf.yaml index 27f963312f..8a997e16e1 100644 --- a/tests/components/sn74hc165/test.esp32-idf.yaml +++ b/tests/components/sn74hc165/test.esp32-idf.yaml @@ -2,6 +2,6 @@ substitutions: clock_pin: GPIO13 data_pin: GPIO14 load_pin: GPIO15 - clock_inhibit_pin: GPIO16 + clock_inhibit_pin: GPIO4 <<: !include common.yaml diff --git a/tests/components/sn74hc165/test.esp8266-ard.yaml b/tests/components/sn74hc165/test.esp8266-ard.yaml index 27f963312f..00ffc10a9e 100644 --- a/tests/components/sn74hc165/test.esp8266-ard.yaml +++ b/tests/components/sn74hc165/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - clock_pin: GPIO13 - data_pin: GPIO14 + clock_pin: GPIO0 + data_pin: GPIO2 load_pin: GPIO15 clock_inhibit_pin: GPIO16 diff --git a/tests/components/sn74hc595/common.yaml b/tests/components/sn74hc595/common.yaml index fc297909f5..3892c0564b 100644 --- a/tests/components/sn74hc595/common.yaml +++ b/tests/components/sn74hc595/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_sn74hc595 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sn74hc595: - id: sn74hc595_hub clock_pin: ${clock_pin} diff --git a/tests/components/sn74hc595/test.esp32-c3-idf.yaml b/tests/components/sn74hc595/test.esp32-c3-idf.yaml index 14c928be88..74b5e855fa 100644 --- a/tests/components/sn74hc595/test.esp32-c3-idf.yaml +++ b/tests/components/sn74hc595/test.esp32-c3-idf.yaml @@ -1,9 +1,9 @@ +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO8 - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO7 + data_pin: GPIO10 latch_pin1: GPIO1 oe_pin1: GPIO2 latch_pin2: GPIO3 diff --git a/tests/components/sn74hc595/test.esp32-idf.yaml b/tests/components/sn74hc595/test.esp32-idf.yaml index a4bab64862..4b47d2aeaa 100644 --- a/tests/components/sn74hc595/test.esp32-idf.yaml +++ b/tests/components/sn74hc595/test.esp32-idf.yaml @@ -1,12 +1,12 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO18 clock_pin: GPIO15 data_pin: GPIO14 latch_pin1: GPIO21 oe_pin1: GPIO22 - latch_pin2: GPIO23 - oe_pin2: GPIO25 + latch_pin2: GPIO25 + oe_pin2: GPIO26 + +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sn74hc595/test.esp8266-ard.yaml b/tests/components/sn74hc595/test.esp8266-ard.yaml index cad11feca8..cc011e01d4 100644 --- a/tests/components/sn74hc595/test.esp8266-ard.yaml +++ b/tests/components/sn74hc595/test.esp8266-ard.yaml @@ -1,7 +1,7 @@ +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 clock_pin: GPIO5 data_pin: GPIO4 latch_pin1: GPIO2 diff --git a/tests/components/sn74hc595/test.rp2040-ard.yaml b/tests/components/sn74hc595/test.rp2040-ard.yaml index 14c928be88..93cf5efb0c 100644 --- a/tests/components/sn74hc595/test.rp2040-ard.yaml +++ b/tests/components/sn74hc595/test.rp2040-ard.yaml @@ -1,12 +1,12 @@ +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO8 clock_pin: GPIO5 - data_pin: GPIO4 + data_pin: GPIO0 latch_pin1: GPIO1 - oe_pin1: GPIO2 - latch_pin2: GPIO3 + oe_pin1: GPIO6 + latch_pin2: GPIO7 oe_pin2: GPIO9 <<: !include common.yaml diff --git a/tests/components/sonoff_d1/common.yaml b/tests/components/sonoff_d1/common.yaml index d2d4043b95..dc08380683 100644 --- a/tests/components/sonoff_d1/common.yaml +++ b/tests/components/sonoff_d1/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_sonoff_d1 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - light: - platform: sonoff_d1 id: d1_light diff --git a/tests/components/sonoff_d1/test.esp32-c3-idf.yaml b/tests/components/sonoff_d1/test.esp32-c3-idf.yaml index b516342f3b..a19013bf54 100644 --- a/tests/components/sonoff_d1/test.esp32-c3-idf.yaml +++ b/tests/components/sonoff_d1/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.esp32-idf.yaml b/tests/components/sonoff_d1/test.esp32-idf.yaml index f486544afa..2d29656c94 100644 --- a/tests/components/sonoff_d1/test.esp32-idf.yaml +++ b/tests/components/sonoff_d1/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.esp8266-ard.yaml b/tests/components/sonoff_d1/test.esp8266-ard.yaml index b516342f3b..5a05efa259 100644 --- a/tests/components/sonoff_d1/test.esp8266-ard.yaml +++ b/tests/components/sonoff_d1/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sonoff_d1/test.rp2040-ard.yaml b/tests/components/sonoff_d1/test.rp2040-ard.yaml index b516342f3b..f1df2daf83 100644 --- a/tests/components/sonoff_d1/test.rp2040-ard.yaml +++ b/tests/components/sonoff_d1/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sound_level/test.esp32-idf.yaml b/tests/components/sound_level/test.esp32-idf.yaml index c6d1bfa330..20e38e8df8 100644 --- a/tests/components/sound_level/test.esp32-idf.yaml +++ b/tests/components/sound_level/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: i2s_lrclk_pin: GPIO26 i2s_dout_pin: GPIO27 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/speaker/audio_dac.esp32-ard.yaml b/tests/components/speaker/audio_dac.esp32-ard.yaml index 75d9ddf92b..3f5d1bba7c 100644 --- a/tests/components/speaker/audio_dac.esp32-ard.yaml +++ b/tests/components/speaker/audio_dac.esp32-ard.yaml @@ -1,9 +1,10 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 i2s_bclk_pin: GPIO27 i2s_lrclk_pin: GPIO26 i2s_mclk_pin: GPIO25 i2s_dout_pin: GPIO23 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-ard.yaml + <<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/audio_dac.esp32-c3-idf.yaml b/tests/components/speaker/audio_dac.esp32-c3-idf.yaml index 1004d2143e..30900f1920 100644 --- a/tests/components/speaker/audio_dac.esp32-c3-idf.yaml +++ b/tests/components/speaker/audio_dac.esp32-c3-idf.yaml @@ -1,9 +1,10 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 i2s_bclk_pin: GPIO7 i2s_lrclk_pin: GPIO6 i2s_mclk_pin: GPIO9 i2s_dout_pin: GPIO8 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/audio_dac.esp32-idf.yaml b/tests/components/speaker/audio_dac.esp32-idf.yaml index 75d9ddf92b..71c8b06e24 100644 --- a/tests/components/speaker/audio_dac.esp32-idf.yaml +++ b/tests/components/speaker/audio_dac.esp32-idf.yaml @@ -1,9 +1,10 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 i2s_bclk_pin: GPIO27 i2s_lrclk_pin: GPIO26 i2s_mclk_pin: GPIO25 i2s_dout_pin: GPIO23 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common-audio_dac.yaml diff --git a/tests/components/speaker/common-audio_dac.yaml b/tests/components/speaker/common-audio_dac.yaml index 41b994d4d4..67bd6c28ef 100644 --- a/tests/components/speaker/common-audio_dac.yaml +++ b/tests/components/speaker/common-audio_dac.yaml @@ -14,11 +14,6 @@ esphome: - speaker.finish: - speaker.stop: -i2c: - - id: i2c_audio_dac - scl: ${scl_pin} - sda: ${sda_pin} - i2s_audio: i2s_lrclk_pin: ${i2s_bclk_pin} i2s_bclk_pin: ${i2s_lrclk_pin} @@ -26,6 +21,7 @@ i2s_audio: audio_dac: - platform: aic3204 + i2c_id: i2c_bus id: internal_dac speaker: diff --git a/tests/components/speaker/test.esp32-ard.yaml b/tests/components/speaker/test.esp32-ard.yaml index e2439ebdf2..13350cd097 100644 --- a/tests/components/speaker/test.esp32-ard.yaml +++ b/tests/components/speaker/test.esp32-ard.yaml @@ -1,9 +1,10 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 i2s_bclk_pin: GPIO27 i2s_lrclk_pin: GPIO26 i2s_mclk_pin: GPIO25 - i2s_dout_pin: GPIO23 + i2s_dout_pin: GPIO4 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-ard.yaml <<: !include common.yaml diff --git a/tests/components/speaker/test.esp32-c3-idf.yaml b/tests/components/speaker/test.esp32-c3-idf.yaml index ddcf051fab..9d1a1cca3b 100644 --- a/tests/components/speaker/test.esp32-c3-idf.yaml +++ b/tests/components/speaker/test.esp32-c3-idf.yaml @@ -6,4 +6,7 @@ substitutions: i2s_mclk_pin: GPIO9 i2s_dout_pin: GPIO8 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/speaker/test.esp32-idf.yaml b/tests/components/speaker/test.esp32-idf.yaml index e2439ebdf2..27b8604656 100644 --- a/tests/components/speaker/test.esp32-idf.yaml +++ b/tests/components/speaker/test.esp32-idf.yaml @@ -1,9 +1,10 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 i2s_bclk_pin: GPIO27 i2s_lrclk_pin: GPIO26 i2s_mclk_pin: GPIO25 - i2s_dout_pin: GPIO23 + i2s_dout_pin: GPIO12 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/spi/common.yaml b/tests/components/spi/common.yaml index 04b4779957..e69de29bb2 100644 --- a/tests/components/spi/common.yaml +++ b/tests/components/spi/common.yaml @@ -1,5 +0,0 @@ -spi: - - id: spi_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} diff --git a/tests/components/spi/test.esp32-c3-idf.yaml b/tests/components/spi/test.esp32-c3-idf.yaml index bfa12b1755..54463271a9 100644 --- a/tests/components/spi/test.esp32-c3-idf.yaml +++ b/tests/components/spi/test.esp32-c3-idf.yaml @@ -1,6 +1,5 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/spi/test.esp32-idf.yaml b/tests/components/spi/test.esp32-idf.yaml index 448e54fea6..a8e18ca503 100644 --- a/tests/components/spi/test.esp32-idf.yaml +++ b/tests/components/spi/test.esp32-idf.yaml @@ -1,6 +1,4 @@ -substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/spi/test.esp8266-ard.yaml b/tests/components/spi/test.esp8266-ard.yaml index b9545d4f6a..4f9c816740 100644 --- a/tests/components/spi/test.esp8266-ard.yaml +++ b/tests/components/spi/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO15 <<: !include common.yaml diff --git a/tests/components/spi_device/common.yaml b/tests/components/spi_device/common.yaml index 0f6a5038fb..8511603bc2 100644 --- a/tests/components/spi_device/common.yaml +++ b/tests/components/spi_device/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_device1 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - spi_device: - id: spi_device_test data_rate: 2MHz diff --git a/tests/components/spi_device/test.esp32-c3-idf.yaml b/tests/components/spi_device/test.esp32-c3-idf.yaml index bfa12b1755..6d64c2b23b 100644 --- a/tests/components/spi_device/test.esp32-c3-idf.yaml +++ b/tests/components/spi_device/test.esp32-c3-idf.yaml @@ -1,6 +1,4 @@ -substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/spi_device/test.esp32-idf.yaml b/tests/components/spi_device/test.esp32-idf.yaml index c4989cccbf..aace9192b1 100644 --- a/tests/components/spi_device/test.esp32-idf.yaml +++ b/tests/components/spi_device/test.esp32-idf.yaml @@ -1,7 +1,5 @@ -substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 - miso_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml spi_device: diff --git a/tests/components/spi_device/test.esp8266-ard.yaml b/tests/components/spi_device/test.esp8266-ard.yaml index b9545d4f6a..433a931284 100644 --- a/tests/components/spi_device/test.esp8266-ard.yaml +++ b/tests/components/spi_device/test.esp8266-ard.yaml @@ -1,6 +1,4 @@ -substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/spi_device/test.rp2040-ard.yaml b/tests/components/spi_device/test.rp2040-ard.yaml index 81a8acafd8..149d530753 100644 --- a/tests/components/spi_device/test.rp2040-ard.yaml +++ b/tests/components/spi_device/test.rp2040-ard.yaml @@ -1,6 +1,4 @@ -substitutions: - clk_pin: GPIO2 - mosi_pin: GPIO3 - miso_pin: GPIO4 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/spi_led_strip/common.yaml b/tests/components/spi_led_strip/common.yaml index 80b98a63a4..30e2ef22f7 100644 --- a/tests/components/spi_led_strip/common.yaml +++ b/tests/components/spi_led_strip/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_spi_led_strip - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - light: - platform: spi_led_strip num_leds: 4 diff --git a/tests/components/spi_led_strip/test.esp32-c3-idf.yaml b/tests/components/spi_led_strip/test.esp32-c3-idf.yaml index a85b587070..6d64c2b23b 100644 --- a/tests/components/spi_led_strip/test.esp32-c3-idf.yaml +++ b/tests/components/spi_led_strip/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.esp32-idf.yaml b/tests/components/spi_led_strip/test.esp32-idf.yaml index 8906602ef4..a8e18ca503 100644 --- a/tests/components/spi_led_strip/test.esp32-idf.yaml +++ b/tests/components/spi_led_strip/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.esp8266-ard.yaml b/tests/components/spi_led_strip/test.esp8266-ard.yaml index 7baaa62ed5..433a931284 100644 --- a/tests/components/spi_led_strip/test.esp8266-ard.yaml +++ b/tests/components/spi_led_strip/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/spi_led_strip/test.rp2040-ard.yaml b/tests/components/spi_led_strip/test.rp2040-ard.yaml index 411cfbe00e..149d530753 100644 --- a/tests/components/spi_led_strip/test.rp2040-ard.yaml +++ b/tests/components/spi_led_strip/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - clk_pin: GPIO2 - mosi_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sps30/common.yaml b/tests/components/sps30/common.yaml index 2fbe2c747a..d40cd16b6d 100644 --- a/tests/components/sps30/common.yaml +++ b/tests/components/sps30/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sps30 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sps30 + i2c_id: i2c_bus pm_1_0: name: Workshop PM <1µm Weight concentration id: workshop_PM_1_0 diff --git a/tests/components/sps30/test.esp32-c3-idf.yaml b/tests/components/sps30/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sps30/test.esp32-c3-idf.yaml +++ b/tests/components/sps30/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sps30/test.esp32-idf.yaml b/tests/components/sps30/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sps30/test.esp32-idf.yaml +++ b/tests/components/sps30/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sps30/test.esp8266-ard.yaml b/tests/components/sps30/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sps30/test.esp8266-ard.yaml +++ b/tests/components/sps30/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sps30/test.rp2040-ard.yaml b/tests/components/sps30/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sps30/test.rp2040-ard.yaml +++ b/tests/components/sps30/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/common.yaml b/tests/components/ssd1306_i2c/common.yaml index d17f83f03a..e876fcb36a 100644 --- a/tests/components/ssd1306_i2c/common.yaml +++ b/tests/components/ssd1306_i2c/common.yaml @@ -1,25 +1,21 @@ -i2c: - - id: i2c_ssd1306_i2c - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c + i2c_id: i2c_bus model: SSD1306_128X64 reset_pin: ${reset_pin} address: 0x3C id: display1 contrast: 60% pages: - - id: page1 + - id: ssd1306_i2c_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1306_i2c_page2 lambda: |- it.rectangle(0, 0, 10, 10); on_page_change: - from: page1 - to: page2 + from: ssd1306_i2c_page1 + to: ssd1306_i2c_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml b/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml index 4eaff7fa4a..f8bfab2319 100644 --- a/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1306_i2c/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.esp32-idf.yaml b/tests/components/ssd1306_i2c/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/ssd1306_i2c/test.esp32-idf.yaml +++ b/tests/components/ssd1306_i2c/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.esp8266-ard.yaml b/tests/components/ssd1306_i2c/test.esp8266-ard.yaml index af91c21a0d..352cc8cda8 100644 --- a/tests/components/ssd1306_i2c/test.esp8266-ard.yaml +++ b/tests/components/ssd1306_i2c/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO2 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1306_i2c/test.rp2040-ard.yaml b/tests/components/ssd1306_i2c/test.rp2040-ard.yaml index 4eaff7fa4a..2972fde8a5 100644 --- a/tests/components/ssd1306_i2c/test.rp2040-ard.yaml +++ b/tests/components/ssd1306_i2c/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1306_spi/common.yaml b/tests/components/ssd1306_spi/common.yaml index 71705f32d2..2a2adb4146 100644 --- a/tests/components/ssd1306_spi/common.yaml +++ b/tests/components/ssd1306_spi/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_ssd1306_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ssd1306_spi model: SSD1306 128x64 @@ -10,15 +5,15 @@ display: dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: ssd1306_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1306_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: ssd1306_spi_page1 + to: ssd1306_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1306_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.esp32-idf.yaml b/tests/components/ssd1306_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/ssd1306_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1306_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.esp8266-ard.yaml b/tests/components/ssd1306_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/ssd1306_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1306_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1306_spi/test.rp2040-ard.yaml b/tests/components/ssd1306_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/ssd1306_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1306_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1322_spi/common.yaml b/tests/components/ssd1322_spi/common.yaml index b67392794c..c0e16b6f09 100644 --- a/tests/components/ssd1322_spi/common.yaml +++ b/tests/components/ssd1322_spi/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_ssd1322_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ssd1322_spi model: SSD1322 256x64 @@ -10,15 +5,15 @@ display: dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: ssd1322_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1322_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: ssd1322_spi_page1 + to: ssd1322_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1322_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.esp32-idf.yaml b/tests/components/ssd1322_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/ssd1322_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1322_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.esp8266-ard.yaml b/tests/components/ssd1322_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/ssd1322_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1322_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1322_spi/test.rp2040-ard.yaml b/tests/components/ssd1322_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/ssd1322_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1322_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1325_spi/common.yaml b/tests/components/ssd1325_spi/common.yaml index eaa8b619ca..dea8502538 100644 --- a/tests/components/ssd1325_spi/common.yaml +++ b/tests/components/ssd1325_spi/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_ssd1325_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ssd1325_spi model: SSD1325 128x64 @@ -10,15 +5,15 @@ display: dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: ssd1325_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1325_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: ssd1325_spi_page1 + to: ssd1325_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1325_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.esp32-idf.yaml b/tests/components/ssd1325_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/ssd1325_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1325_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.esp8266-ard.yaml b/tests/components/ssd1325_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/ssd1325_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1325_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1325_spi/test.rp2040-ard.yaml b/tests/components/ssd1325_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/ssd1325_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1325_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/common.yaml b/tests/components/ssd1327_i2c/common.yaml index 72a122c3d7..c90e9678dd 100644 --- a/tests/components/ssd1327_i2c/common.yaml +++ b/tests/components/ssd1327_i2c/common.yaml @@ -1,24 +1,20 @@ -i2c: - - id: i2c_ssd1327_i2c - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1327_i2c + i2c_id: i2c_bus model: SSD1327_128x128 reset_pin: ${reset_pin} address: 0x3C id: display1 pages: - - id: page1 + - id: ssd1327_i2c_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1327_i2c_page2 lambda: |- it.rectangle(0, 0, 10, 10); on_page_change: - from: page1 - to: page2 + from: ssd1327_i2c_page1 + to: ssd1327_i2c_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml b/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml index 4eaff7fa4a..f8bfab2319 100644 --- a/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1327_i2c/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.esp32-idf.yaml b/tests/components/ssd1327_i2c/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/ssd1327_i2c/test.esp32-idf.yaml +++ b/tests/components/ssd1327_i2c/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.esp8266-ard.yaml b/tests/components/ssd1327_i2c/test.esp8266-ard.yaml index af91c21a0d..352cc8cda8 100644 --- a/tests/components/ssd1327_i2c/test.esp8266-ard.yaml +++ b/tests/components/ssd1327_i2c/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO2 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_i2c/test.rp2040-ard.yaml b/tests/components/ssd1327_i2c/test.rp2040-ard.yaml index 4eaff7fa4a..2972fde8a5 100644 --- a/tests/components/ssd1327_i2c/test.rp2040-ard.yaml +++ b/tests/components/ssd1327_i2c/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_spi/common.yaml b/tests/components/ssd1327_spi/common.yaml index 85f4d4736b..1aa4fb5a1c 100644 --- a/tests/components/ssd1327_spi/common.yaml +++ b/tests/components/ssd1327_spi/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_ssd1327_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ssd1327_spi model: SSD1327 128x128 @@ -10,15 +5,15 @@ display: dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: ssd1327_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1327_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: ssd1327_spi_page1 + to: ssd1327_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1327_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.esp32-idf.yaml b/tests/components/ssd1327_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/ssd1327_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1327_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.esp8266-ard.yaml b/tests/components/ssd1327_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/ssd1327_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1327_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1327_spi/test.rp2040-ard.yaml b/tests/components/ssd1327_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/ssd1327_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1327_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1331_spi/common.yaml b/tests/components/ssd1331_spi/common.yaml index 40726101e8..2b708e9bd9 100644 --- a/tests/components/ssd1331_spi/common.yaml +++ b/tests/components/ssd1331_spi/common.yaml @@ -1,23 +1,18 @@ -spi: - - id: spi_ssd1331_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ssd1331_spi cs_pin: ${cs_pin} dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: ssd1331_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1331_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: ssd1331_spi_page1 + to: ssd1331_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1331_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.esp32-idf.yaml b/tests/components/ssd1331_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/ssd1331_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1331_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.esp8266-ard.yaml b/tests/components/ssd1331_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/ssd1331_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1331_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1331_spi/test.rp2040-ard.yaml b/tests/components/ssd1331_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/ssd1331_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1331_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1351_spi/common.yaml b/tests/components/ssd1351_spi/common.yaml index fa495ff0c3..e4d3d55f3f 100644 --- a/tests/components/ssd1351_spi/common.yaml +++ b/tests/components/ssd1351_spi/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_ssd1351_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: ssd1351_spi model: "SSD1351 128x128" @@ -10,15 +5,15 @@ display: dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: ssd1351_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: ssd1351_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: ssd1351_spi_page1 + to: ssd1351_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml b/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml +++ b/tests/components/ssd1351_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.esp32-idf.yaml b/tests/components/ssd1351_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/ssd1351_spi/test.esp32-idf.yaml +++ b/tests/components/ssd1351_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.esp8266-ard.yaml b/tests/components/ssd1351_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/ssd1351_spi/test.esp8266-ard.yaml +++ b/tests/components/ssd1351_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ssd1351_spi/test.rp2040-ard.yaml b/tests/components/ssd1351_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/ssd1351_spi/test.rp2040-ard.yaml +++ b/tests/components/ssd1351_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_i2c/common.yaml b/tests/components/st7567_i2c/common.yaml index 41c65e5110..9a4cd79faa 100644 --- a/tests/components/st7567_i2c/common.yaml +++ b/tests/components/st7567_i2c/common.yaml @@ -1,23 +1,19 @@ -i2c: - - id: i2c_st7567_i2c - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: st7567_i2c + i2c_id: i2c_bus reset_pin: ${reset_pin} address: 0x3C id: display1 pages: - - id: page1 + - id: st7567_i2c_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: st7567_i2c_page2 lambda: |- it.rectangle(0, 0, 10, 10); on_page_change: - from: page1 - to: page2 + from: st7567_i2c_page1 + to: st7567_i2c_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7567_i2c/test.esp32-c3-idf.yaml b/tests/components/st7567_i2c/test.esp32-c3-idf.yaml index 4eaff7fa4a..f8bfab2319 100644 --- a/tests/components/st7567_i2c/test.esp32-c3-idf.yaml +++ b/tests/components/st7567_i2c/test.esp32-c3-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.esp32-idf.yaml b/tests/components/st7567_i2c/test.esp32-idf.yaml index 1ca773e06c..4ff2241ec9 100644 --- a/tests/components/st7567_i2c/test.esp32-idf.yaml +++ b/tests/components/st7567_i2c/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 reset_pin: GPIO15 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.esp8266-ard.yaml b/tests/components/st7567_i2c/test.esp8266-ard.yaml index af91c21a0d..352cc8cda8 100644 --- a/tests/components/st7567_i2c/test.esp8266-ard.yaml +++ b/tests/components/st7567_i2c/test.esp8266-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO2 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_i2c/test.rp2040-ard.yaml b/tests/components/st7567_i2c/test.rp2040-ard.yaml index 4eaff7fa4a..2972fde8a5 100644 --- a/tests/components/st7567_i2c/test.rp2040-ard.yaml +++ b/tests/components/st7567_i2c/test.rp2040-ard.yaml @@ -1,6 +1,7 @@ substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_spi/common.yaml b/tests/components/st7567_spi/common.yaml index 037a700239..b5a4074e13 100644 --- a/tests/components/st7567_spi/common.yaml +++ b/tests/components/st7567_spi/common.yaml @@ -1,23 +1,18 @@ -spi: - - id: spi_st7567_spi - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: st7567_spi cs_pin: ${cs_pin} dc_pin: ${dc_pin} reset_pin: ${reset_pin} pages: - - id: page1 + - id: st7567_spi_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: st7567_spi_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: st7567_spi_page1 + to: st7567_spi_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7567_spi/test.esp32-c3-idf.yaml b/tests/components/st7567_spi/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/st7567_spi/test.esp32-c3-idf.yaml +++ b/tests/components/st7567_spi/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/st7567_spi/test.esp32-idf.yaml b/tests/components/st7567_spi/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/st7567_spi/test.esp32-idf.yaml +++ b/tests/components/st7567_spi/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_spi/test.esp8266-ard.yaml b/tests/components/st7567_spi/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/st7567_spi/test.esp8266-ard.yaml +++ b/tests/components/st7567_spi/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7567_spi/test.rp2040-ard.yaml b/tests/components/st7567_spi/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/st7567_spi/test.rp2040-ard.yaml +++ b/tests/components/st7567_spi/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7701s/common.yaml b/tests/components/st7701s/common.yaml index b94fadfe52..751862dea5 100644 --- a/tests/components/st7701s/common.yaml +++ b/tests/components/st7701s/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_st7701s - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: st7701s spi_mode: MODE3 diff --git a/tests/components/st7701s/test.esp32-s3-idf.yaml b/tests/components/st7701s/test.esp32-s3-idf.yaml index cd09b31f6e..87e5248888 100644 --- a/tests/components/st7701s/test.esp32-s3-idf.yaml +++ b/tests/components/st7701s/test.esp32-s3-idf.yaml @@ -1,5 +1,7 @@ +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml + substitutions: - clk_pin: GPIO41 mosi_pin: GPIO48 cs_pin: GPIO44 de_pin: GPIO18 diff --git a/tests/components/st7735/common.yaml b/tests/components/st7735/common.yaml index c140652eda..242c4bccd6 100644 --- a/tests/components/st7735/common.yaml +++ b/tests/components/st7735/common.yaml @@ -1,8 +1,3 @@ -spi: - - id: spi_st7735 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: st7735 model: INITR_18BLACKTAB @@ -14,15 +9,15 @@ display: col_start: 0 row_start: 0 pages: - - id: page1 + - id: st7735_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: st7735_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: st7735_page1 + to: st7735_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7735/test.esp32-c3-idf.yaml b/tests/components/st7735/test.esp32-c3-idf.yaml index c5c932c92c..b112cf4c31 100644 --- a/tests/components/st7735/test.esp32-c3-idf.yaml +++ b/tests/components/st7735/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/st7735/test.esp32-idf.yaml b/tests/components/st7735/test.esp32-idf.yaml index bad5241f79..ff174a4656 100644 --- a/tests/components/st7735/test.esp32-idf.yaml +++ b/tests/components/st7735/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/st7735/test.esp8266-ard.yaml b/tests/components/st7735/test.esp8266-ard.yaml index 3f023a60eb..56cb29f29e 100644 --- a/tests/components/st7735/test.esp8266-ard.yaml +++ b/tests/components/st7735/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7735/test.rp2040-ard.yaml b/tests/components/st7735/test.rp2040-ard.yaml index d7fd6ee294..66caa956f7 100644 --- a/tests/components/st7735/test.rp2040-ard.yaml +++ b/tests/components/st7735/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: dc_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/st7789v/common.yaml b/tests/components/st7789v/common.yaml index d5f74809e0..19cef5656a 100644 --- a/tests/components/st7789v/common.yaml +++ b/tests/components/st7789v/common.yaml @@ -1,24 +1,20 @@ -spi: - - id: spi_st7789v - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: st7789v model: TTGO TDisplay 135x240 cs_pin: ${cs_pin} dc_pin: ${dc_pin} reset_pin: ${reset_pin} + backlight_pin: ${backlight_pin} pages: - - id: page1 + - id: st7789v_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: st7789v_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: st7789v_page1 + to: st7789v_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7789v/test.esp32-c3-idf.yaml b/tests/components/st7789v/test.esp32-c3-idf.yaml index c5c932c92c..b4d70edb31 100644 --- a/tests/components/st7789v/test.esp32-c3-idf.yaml +++ b/tests/components/st7789v/test.esp32-c3-idf.yaml @@ -1,9 +1,10 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 dc_pin: GPIO9 reset_pin: GPIO10 + backlight_pin: GPIO7 + +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/st7789v/test.esp32-idf.yaml b/tests/components/st7789v/test.esp32-idf.yaml index bad5241f79..3b6d584e5c 100644 --- a/tests/components/st7789v/test.esp32-idf.yaml +++ b/tests/components/st7789v/test.esp32-idf.yaml @@ -1,8 +1,10 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 dc_pin: GPIO13 reset_pin: GPIO14 + backlight_pin: GPIO15 + +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/st7789v/test.esp8266-ard.yaml b/tests/components/st7789v/test.esp8266-ard.yaml index 3f023a60eb..0ddca66ef4 100644 --- a/tests/components/st7789v/test.esp8266-ard.yaml +++ b/tests/components/st7789v/test.esp8266-ard.yaml @@ -1,9 +1,13 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 miso_pin: GPIO12 cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 + backlight_pin: GPIO4 + +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/st7789v/test.rp2040-ard.yaml b/tests/components/st7789v/test.rp2040-ard.yaml index d7fd6ee294..464e720549 100644 --- a/tests/components/st7789v/test.rp2040-ard.yaml +++ b/tests/components/st7789v/test.rp2040-ard.yaml @@ -5,5 +5,9 @@ substitutions: cs_pin: GPIO5 dc_pin: GPIO15 reset_pin: GPIO16 + backlight_pin: GPIO6 + +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/st7920/common.yaml b/tests/components/st7920/common.yaml index 9ede271f01..477ac14bd4 100644 --- a/tests/components/st7920/common.yaml +++ b/tests/components/st7920/common.yaml @@ -1,23 +1,18 @@ -spi: - - id: spi_st7920 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: - platform: st7920 cs_pin: ${cs_pin} height: 128 width: 64 pages: - - id: page1 + - id: st7920_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); - - id: page2 + - id: st7920_page2 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); on_page_change: - from: page1 - to: page2 + from: st7920_page1 + to: st7920_page2 then: lambda: |- ESP_LOGD("display", "1 -> 2"); diff --git a/tests/components/st7920/test.esp32-c3-idf.yaml b/tests/components/st7920/test.esp32-c3-idf.yaml index 2415ba5dc6..15d986e157 100644 --- a/tests/components/st7920/test.esp32-c3-idf.yaml +++ b/tests/components/st7920/test.esp32-c3-idf.yaml @@ -1,7 +1,6 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - miso_pin: GPIO5 cs_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/st7920/test.esp32-idf.yaml b/tests/components/st7920/test.esp32-idf.yaml index 04d2633d2b..9bb524aa65 100644 --- a/tests/components/st7920/test.esp32-idf.yaml +++ b/tests/components/st7920/test.esp32-idf.yaml @@ -1,6 +1,7 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO12 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/st7920/test.esp8266-ard.yaml b/tests/components/st7920/test.esp8266-ard.yaml index bd5c203e35..1aac800592 100644 --- a/tests/components/st7920/test.esp8266-ard.yaml +++ b/tests/components/st7920/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 - miso_pin: GPIO12 - cs_pin: GPIO5 + clk_pin: GPIO0 + mosi_pin: GPIO2 + miso_pin: GPIO15 + cs_pin: GPIO16 + +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/st7920/test.rp2040-ard.yaml b/tests/components/st7920/test.rp2040-ard.yaml index f6c3f1eeca..1ded24de1c 100644 --- a/tests/components/st7920/test.rp2040-ard.yaml +++ b/tests/components/st7920/test.rp2040-ard.yaml @@ -4,4 +4,7 @@ substitutions: miso_pin: GPIO4 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sts3x/common.yaml b/tests/components/sts3x/common.yaml index 1feac4bc3f..1a61fa9212 100644 --- a/tests/components/sts3x/common.yaml +++ b/tests/components/sts3x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sts3x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: sts3x + i2c_id: i2c_bus id: sts3x_sensor name: STS3X Temperature address: 0x4A diff --git a/tests/components/sts3x/test.esp32-c3-idf.yaml b/tests/components/sts3x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sts3x/test.esp32-c3-idf.yaml +++ b/tests/components/sts3x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sts3x/test.esp32-idf.yaml b/tests/components/sts3x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sts3x/test.esp32-idf.yaml +++ b/tests/components/sts3x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sts3x/test.esp8266-ard.yaml b/tests/components/sts3x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sts3x/test.esp8266-ard.yaml +++ b/tests/components/sts3x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sts3x/test.rp2040-ard.yaml b/tests/components/sts3x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sts3x/test.rp2040-ard.yaml +++ b/tests/components/sts3x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/sun_gtil2/common.yaml b/tests/components/sun_gtil2/common.yaml index 15cc892d90..37fd4b056f 100644 --- a/tests/components/sun_gtil2/common.yaml +++ b/tests/components/sun_gtil2/common.yaml @@ -1,8 +1,3 @@ -uart: - - id: uart_sun_gtil2 - rx_pin: ${rx_pin} - baud_rate: 9600 - sun_gtil2: sensor: diff --git a/tests/components/sun_gtil2/test.esp32-c3-idf.yaml b/tests/components/sun_gtil2/test.esp32-c3-idf.yaml index b8a6b85616..4b7c8351a7 100644 --- a/tests/components/sun_gtil2/test.esp32-c3-idf.yaml +++ b/tests/components/sun_gtil2/test.esp32-c3-idf.yaml @@ -1,4 +1,5 @@ substitutions: - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.esp32-idf.yaml b/tests/components/sun_gtil2/test.esp32-idf.yaml index ad420099ff..29c7835b4e 100644 --- a/tests/components/sun_gtil2/test.esp32-idf.yaml +++ b/tests/components/sun_gtil2/test.esp32-idf.yaml @@ -1,4 +1,7 @@ substitutions: - rx_pin: GPIO16 + rx_pin: GPIO4 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.esp8266-ard.yaml b/tests/components/sun_gtil2/test.esp8266-ard.yaml index b8a6b85616..a591df42cb 100644 --- a/tests/components/sun_gtil2/test.esp8266-ard.yaml +++ b/tests/components/sun_gtil2/test.esp8266-ard.yaml @@ -1,4 +1,7 @@ substitutions: - rx_pin: GPIO5 + rx_pin: GPIO0 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sun_gtil2/test.rp2040-ard.yaml b/tests/components/sun_gtil2/test.rp2040-ard.yaml index b8a6b85616..281ea9480e 100644 --- a/tests/components/sun_gtil2/test.rp2040-ard.yaml +++ b/tests/components/sun_gtil2/test.rp2040-ard.yaml @@ -1,4 +1,7 @@ substitutions: rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sx126x/common.yaml b/tests/components/sx126x/common.yaml index 05db2ef812..3f540a4bae 100644 --- a/tests/components/sx126x/common.yaml +++ b/tests/components/sx126x/common.yaml @@ -1,8 +1,3 @@ -spi: - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sx126x: dio1_pin: ${dio1_pin} cs_pin: ${cs_pin} diff --git a/tests/components/sx126x/test.esp32-c3-idf.yaml b/tests/components/sx126x/test.esp32-c3-idf.yaml index 91450e24ce..e27f11032e 100644 --- a/tests/components/sx126x/test.esp32-c3-idf.yaml +++ b/tests/components/sx126x/test.esp32-c3-idf.yaml @@ -1,10 +1,10 @@ substitutions: - clk_pin: GPIO5 - mosi_pin: GPIO18 - miso_pin: GPIO19 cs_pin: GPIO1 rst_pin: GPIO2 - busy_pin: GPIO4 + busy_pin: GPIO7 dio1_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/sx126x/test.esp32-idf.yaml b/tests/components/sx126x/test.esp32-idf.yaml index 9770f52229..854638ea9c 100644 --- a/tests/components/sx126x/test.esp32-idf.yaml +++ b/tests/components/sx126x/test.esp32-idf.yaml @@ -1,10 +1,10 @@ substitutions: - clk_pin: GPIO5 - mosi_pin: GPIO27 - miso_pin: GPIO19 - cs_pin: GPIO18 - rst_pin: GPIO23 + cs_pin: GPIO12 + rst_pin: GPIO13 busy_pin: GPIO25 dio1_pin: GPIO26 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/sx126x/test.esp8266-ard.yaml b/tests/components/sx126x/test.esp8266-ard.yaml index d2c07c5bb7..98a3fbbd67 100644 --- a/tests/components/sx126x/test.esp8266-ard.yaml +++ b/tests/components/sx126x/test.esp8266-ard.yaml @@ -1,10 +1,13 @@ substitutions: - clk_pin: GPIO5 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO15 + miso_pin: GPIO16 cs_pin: GPIO1 rst_pin: GPIO2 busy_pin: GPIO4 dio1_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sx126x/test.rp2040-ard.yaml b/tests/components/sx126x/test.rp2040-ard.yaml index 8881e96971..9bc12a370d 100644 --- a/tests/components/sx126x/test.rp2040-ard.yaml +++ b/tests/components/sx126x/test.rp2040-ard.yaml @@ -7,4 +7,7 @@ substitutions: busy_pin: GPIO8 dio1_pin: GPIO7 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sx127x/common.yaml b/tests/components/sx127x/common.yaml index 63adc2e91c..540381fc08 100644 --- a/tests/components/sx127x/common.yaml +++ b/tests/components/sx127x/common.yaml @@ -1,8 +1,3 @@ -spi: - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - sx127x: cs_pin: ${cs_pin} rst_pin: ${rst_pin} diff --git a/tests/components/sx127x/test.esp32-c3-idf.yaml b/tests/components/sx127x/test.esp32-c3-idf.yaml index 36535a950d..dfee192545 100644 --- a/tests/components/sx127x/test.esp32-c3-idf.yaml +++ b/tests/components/sx127x/test.esp32-c3-idf.yaml @@ -1,9 +1,8 @@ substitutions: - clk_pin: GPIO5 - mosi_pin: GPIO18 - miso_pin: GPIO19 cs_pin: GPIO1 rst_pin: GPIO2 dio0_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sx127x/test.esp32-idf.yaml b/tests/components/sx127x/test.esp32-idf.yaml index 71270462a2..c9d58bb27e 100644 --- a/tests/components/sx127x/test.esp32-idf.yaml +++ b/tests/components/sx127x/test.esp32-idf.yaml @@ -1,9 +1,9 @@ substitutions: - clk_pin: GPIO5 - mosi_pin: GPIO27 - miso_pin: GPIO19 - cs_pin: GPIO18 - rst_pin: GPIO23 + cs_pin: GPIO12 + rst_pin: GPIO13 dio0_pin: GPIO26 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/sx127x/test.esp8266-ard.yaml b/tests/components/sx127x/test.esp8266-ard.yaml index 64c01edd44..d58166137c 100644 --- a/tests/components/sx127x/test.esp8266-ard.yaml +++ b/tests/components/sx127x/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO5 - mosi_pin: GPIO13 - miso_pin: GPIO12 + clk_pin: GPIO0 + mosi_pin: GPIO15 + miso_pin: GPIO16 cs_pin: GPIO1 rst_pin: GPIO2 dio0_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sx127x/test.rp2040-ard.yaml b/tests/components/sx127x/test.rp2040-ard.yaml index 0af7b29790..09a9b3203b 100644 --- a/tests/components/sx127x/test.rp2040-ard.yaml +++ b/tests/components/sx127x/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: rst_pin: GPIO6 dio0_pin: GPIO7 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/sx1509/common.yaml b/tests/components/sx1509/common.yaml index a83217e579..cf7e234f09 100644 --- a/tests/components/sx1509/common.yaml +++ b/tests/components/sx1509/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_sx1509 - scl: ${scl_pin} - sda: ${sda_pin} - sx1509: - id: sx1509_hub + i2c_id: i2c_bus address: 0x3E keypad: key_rows: 2 diff --git a/tests/components/sx1509/test.esp32-c3-idf.yaml b/tests/components/sx1509/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/sx1509/test.esp32-c3-idf.yaml +++ b/tests/components/sx1509/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/sx1509/test.esp32-idf.yaml b/tests/components/sx1509/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/sx1509/test.esp32-idf.yaml +++ b/tests/components/sx1509/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/sx1509/test.esp8266-ard.yaml b/tests/components/sx1509/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/sx1509/test.esp8266-ard.yaml +++ b/tests/components/sx1509/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/sx1509/test.rp2040-ard.yaml b/tests/components/sx1509/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/sx1509/test.rp2040-ard.yaml +++ b/tests/components/sx1509/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/syslog/test.host.yaml b/tests/components/syslog/test.host.yaml index e735c37e4d..31122437d5 100644 --- a/tests/components/syslog/test.host.yaml +++ b/tests/components/syslog/test.host.yaml @@ -1,4 +1,11 @@ -packages: - common: !include common.yaml +udp: + addresses: ["239.0.60.53"] -wifi: !remove +time: + platform: host + +syslog: + port: 514 + strip: true + level: info + facility: 16 diff --git a/tests/components/t6615/common.yaml b/tests/components/t6615/common.yaml index 3ad715ae2b..4317130461 100644 --- a/tests/components/t6615/common.yaml +++ b/tests/components/t6615/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_t6615 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 19200 - sensor: - platform: t6615 co2: diff --git a/tests/components/t6615/test.esp32-c3-idf.yaml b/tests/components/t6615/test.esp32-c3-idf.yaml index b516342f3b..147d967dd4 100644 --- a/tests/components/t6615/test.esp32-c3-idf.yaml +++ b/tests/components/t6615/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/t6615/test.esp32-idf.yaml b/tests/components/t6615/test.esp32-idf.yaml index f486544afa..4bb9e7fff6 100644 --- a/tests/components/t6615/test.esp32-idf.yaml +++ b/tests/components/t6615/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/t6615/test.esp8266-ard.yaml b/tests/components/t6615/test.esp8266-ard.yaml index b516342f3b..1dd8409590 100644 --- a/tests/components/t6615/test.esp8266-ard.yaml +++ b/tests/components/t6615/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/t6615/test.rp2040-ard.yaml b/tests/components/t6615/test.rp2040-ard.yaml index b516342f3b..f4dada6605 100644 --- a/tests/components/t6615/test.rp2040-ard.yaml +++ b/tests/components/t6615/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/tc74/common.yaml b/tests/components/tc74/common.yaml index 88f5c91e12..c2430ee2d4 100644 --- a/tests/components/tc74/common.yaml +++ b/tests/components/tc74/common.yaml @@ -1,8 +1,4 @@ -i2c: - - id: i2c_tc74 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tc74 + i2c_id: i2c_bus name: TC74 Temperature diff --git a/tests/components/tc74/test.esp32-c3-idf.yaml b/tests/components/tc74/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tc74/test.esp32-c3-idf.yaml +++ b/tests/components/tc74/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tc74/test.esp32-idf.yaml b/tests/components/tc74/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tc74/test.esp32-idf.yaml +++ b/tests/components/tc74/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tc74/test.esp8266-ard.yaml b/tests/components/tc74/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tc74/test.esp8266-ard.yaml +++ b/tests/components/tc74/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tc74/test.rp2040-ard.yaml b/tests/components/tc74/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tc74/test.rp2040-ard.yaml +++ b/tests/components/tc74/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tca9548a/common.yaml b/tests/components/tca9548a/common.yaml index 67e812e08b..bfaf1e26fb 100644 --- a/tests/components/tca9548a/common.yaml +++ b/tests/components/tca9548a/common.yaml @@ -1,15 +1,10 @@ -i2c: - - id: i2c_tca9548a - scl: ${scl_pin} - sda: ${sda_pin} - tca9548a: - id: multiplex0 + i2c_id: i2c_bus address: 0x70 channels: - bus_id: multiplex0_chan0 channel: 0 - i2c_id: i2c_tca9548a - id: multiplex1 + i2c_id: i2c_bus address: 0x71 - i2c_id: multiplex0_chan0 diff --git a/tests/components/tca9548a/test.esp32-c3-idf.yaml b/tests/components/tca9548a/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tca9548a/test.esp32-c3-idf.yaml +++ b/tests/components/tca9548a/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tca9548a/test.esp32-idf.yaml b/tests/components/tca9548a/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tca9548a/test.esp32-idf.yaml +++ b/tests/components/tca9548a/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tca9548a/test.esp8266-ard.yaml b/tests/components/tca9548a/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tca9548a/test.esp8266-ard.yaml +++ b/tests/components/tca9548a/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tca9548a/test.rp2040-ard.yaml b/tests/components/tca9548a/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tca9548a/test.rp2040-ard.yaml +++ b/tests/components/tca9548a/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tca9555/common.yaml b/tests/components/tca9555/common.yaml index 0fc3086786..82b4c959d8 100644 --- a/tests/components/tca9555/common.yaml +++ b/tests/components/tca9555/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_tca9555 - scl: ${scl_pin} - sda: ${sda_pin} - tca9555: - id: tca9555_hub + i2c_id: i2c_bus address: 0x21 binary_sensor: diff --git a/tests/components/tca9555/test.esp32-c3-idf.yaml b/tests/components/tca9555/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tca9555/test.esp32-c3-idf.yaml +++ b/tests/components/tca9555/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tca9555/test.esp32-idf.yaml b/tests/components/tca9555/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tca9555/test.esp32-idf.yaml +++ b/tests/components/tca9555/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tca9555/test.esp8266-ard.yaml b/tests/components/tca9555/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tca9555/test.esp8266-ard.yaml +++ b/tests/components/tca9555/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tca9555/test.rp2040-ard.yaml b/tests/components/tca9555/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tca9555/test.rp2040-ard.yaml +++ b/tests/components/tca9555/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tcs34725/common.yaml b/tests/components/tcs34725/common.yaml index 5296988fa5..e16862035e 100644 --- a/tests/components/tcs34725/common.yaml +++ b/tests/components/tcs34725/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_tcs34725 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tcs34725 + i2c_id: i2c_bus red_channel: name: Red Channel green_channel: diff --git a/tests/components/tcs34725/test.esp32-c3-idf.yaml b/tests/components/tcs34725/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tcs34725/test.esp32-c3-idf.yaml +++ b/tests/components/tcs34725/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tcs34725/test.esp32-idf.yaml b/tests/components/tcs34725/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tcs34725/test.esp32-idf.yaml +++ b/tests/components/tcs34725/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tcs34725/test.esp8266-ard.yaml b/tests/components/tcs34725/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tcs34725/test.esp8266-ard.yaml +++ b/tests/components/tcs34725/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tcs34725/test.rp2040-ard.yaml b/tests/components/tcs34725/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tcs34725/test.rp2040-ard.yaml +++ b/tests/components/tcs34725/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tee501/common.yaml b/tests/components/tee501/common.yaml index c01ab7e37a..82091faccf 100644 --- a/tests/components/tee501/common.yaml +++ b/tests/components/tee501/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_tee501 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tee501 + i2c_id: i2c_bus name: TEE501 Temperature address: 0x48 diff --git a/tests/components/tee501/test.esp32-c3-idf.yaml b/tests/components/tee501/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tee501/test.esp32-c3-idf.yaml +++ b/tests/components/tee501/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tee501/test.esp32-idf.yaml b/tests/components/tee501/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tee501/test.esp32-idf.yaml +++ b/tests/components/tee501/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tee501/test.esp8266-ard.yaml b/tests/components/tee501/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tee501/test.esp8266-ard.yaml +++ b/tests/components/tee501/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tee501/test.rp2040-ard.yaml b/tests/components/tee501/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tee501/test.rp2040-ard.yaml +++ b/tests/components/tee501/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/teleinfo/common.yaml b/tests/components/teleinfo/common.yaml index 90b684e977..dcb2cb14bd 100644 --- a/tests/components/teleinfo/common.yaml +++ b/tests/components/teleinfo/common.yaml @@ -1,10 +1,3 @@ -uart: - - id: uart_teleinfo - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 1200 - parity: EVEN - button: - platform: template name: Poller component suspend test diff --git a/tests/components/teleinfo/test.esp32-c3-idf.yaml b/tests/components/teleinfo/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/teleinfo/test.esp32-c3-idf.yaml +++ b/tests/components/teleinfo/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/teleinfo/test.esp32-idf.yaml b/tests/components/teleinfo/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/teleinfo/test.esp32-idf.yaml +++ b/tests/components/teleinfo/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/teleinfo/test.esp8266-ard.yaml b/tests/components/teleinfo/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/teleinfo/test.esp8266-ard.yaml +++ b/tests/components/teleinfo/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/teleinfo/test.rp2040-ard.yaml b/tests/components/teleinfo/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/teleinfo/test.rp2040-ard.yaml +++ b/tests/components/teleinfo/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/tem3200/common.yaml b/tests/components/tem3200/common.yaml index 392c853bf4..cef7317450 100644 --- a/tests/components/tem3200/common.yaml +++ b/tests/components/tem3200/common.yaml @@ -1,13 +1,7 @@ -i2c: - id: i2c_bus - scl: ${scl_pin} - sda: ${sda_pin} - frequency: 200kHz - sensor: - platform: tem3200 - update_interval: 1s i2c_id: i2c_bus + update_interval: 1s temperature: name: water temperature diff --git a/tests/components/tem3200/test.esp32-idf.yaml b/tests/components/tem3200/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/tem3200/test.esp32-idf.yaml +++ b/tests/components/tem3200/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tem3200/test.esp32-s3-idf.yaml b/tests/components/tem3200/test.esp32-s3-idf.yaml index 4942e3c2b3..e9d826aa7c 100644 --- a/tests/components/tem3200/test.esp32-s3-idf.yaml +++ b/tests/components/tem3200/test.esp32-s3-idf.yaml @@ -2,4 +2,7 @@ substitutions: scl_pin: GPIO40 sda_pin: GPIO41 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/tem3200/test.esp8266-ard.yaml b/tests/components/tem3200/test.esp8266-ard.yaml index 3be5e53dcb..4a98b9388a 100644 --- a/tests/components/tem3200/test.esp8266-ard.yaml +++ b/tests/components/tem3200/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO05 - sda_pin: GPIO04 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/template/common-base.yaml b/tests/components/template/common-base.yaml new file mode 100644 index 0000000000..48537d21bc --- /dev/null +++ b/tests/components/template/common-base.yaml @@ -0,0 +1,342 @@ +esphome: + on_boot: + - sensor.template.publish: + id: template_sens + state: 42.0 + + # Templated + - sensor.template.publish: + id: template_sens + state: !lambda "return 42.0;" + + - datetime.date.set: + id: test_date + date: + year: 2021 + month: 1 + day: 1 + - datetime.date.set: + id: test_date + date: !lambda "return {.day_of_month = 1, .month = 1, .year = 2021};" + - datetime.date.set: + id: test_date + date: "2021-01-01" + +binary_sensor: + - platform: template + id: some_binary_sensor + name: "Garage Door Open" + lambda: |- + if (id(template_sens).state > 30) { + // Garage Door is open. + return true; + } else { + // Garage Door is closed. + return false; + } + - platform: template + id: other_binary_sensor + name: "Garage Door Closed" + condition: + sensor.in_range: + id: template_sens + below: 30.0 + filters: + - invert: + - delayed_on: 100ms + - delayed_off: 100ms + - delayed_on_off: !lambda "if (id(test_switch).state) return 1000; else return 0;" + - delayed_on_off: + time_on: 10s + time_off: !lambda "if (id(test_switch).state) return 1000; else return 0;" + - autorepeat: + - delay: 1s + time_off: 100ms + time_on: 900ms + - delay: 5s + time_off: 100ms + time_on: 400ms + - lambda: |- + if (id(other_binary_sensor).state) { + return x; + } else { + return {}; + } + - settle: 500ms + - timeout: 5s + +sensor: + - platform: template + name: "Template Sensor" + id: template_sens + lambda: |- + if (id(some_binary_sensor).state) { + return 42.0; + } else { + return 0.0; + } + update_interval: 60s + filters: + - calibrate_linear: + - 0.0 -> 0.0 + - 40.0 -> 45.0 + - 100.0 -> 102.5 + - calibrate_polynomial: + degree: 2 + datapoints: + # Map 0.0 (from sensor) to 0.0 (true value) + - 0.0 -> 0.0 + - 10.0 -> 12.1 + - 13.0 -> 14.0 + - clamp: + max_value: 10.0 + min_value: -10.0 + - debounce: 0.1s + - delta: 5.0 + - exponential_moving_average: + alpha: 0.1 + send_every: 15 + - filter_out: + - 10 + - 20 + - !lambda return 10; + - filter_out: 10 + - filter_out: !lambda return NAN; + - heartbeat: 5s + - lambda: return x * (9.0/5.0) + 32.0; + - max: + window_size: 10 + send_every: 2 + send_first_at: 1 + - median: + window_size: 7 + send_every: 4 + send_first_at: 3 + - min: + window_size: 10 + send_every: 2 + send_first_at: 1 + - multiply: 1 + - multiply: !lambda return 2; + - offset: 10 + - offset: !lambda return 10; + - or: + - quantile: + window_size: 7 + send_every: 4 + send_first_at: 3 + quantile: .9 + - round: 1 + - round_to_multiple_of: 0.25 + - skip_initial: 3 + - sliding_window_moving_average: + window_size: 15 + send_every: 15 + - throttle: 1s + - throttle_average: 2s + - throttle_with_priority: 5s + - throttle_with_priority: + timeout: 3s + value: 42.0 + - throttle_with_priority: + timeout: 3s + value: !lambda return 1.0f / 2.0f; + - throttle_with_priority: + timeout: 3s + value: + - 42.0 + - !lambda return 2.0f / 2.0f; + - nan + - timeout: + timeout: 10s + value: !lambda return 10; + - timeout: + timeout: 1h + value: 20.0 + - timeout: + timeout: 1min + value: last + - timeout: + timeout: 1d + - to_ntc_resistance: + calibration: + - 10.0kOhm -> 25°C + - 27.219kOhm -> 0°C + - 14.674kOhm -> 15°C + - to_ntc_temperature: + calibration: + - 10.0kOhm -> 25°C + - 27.219kOhm -> 0°C + - 14.674kOhm -> 15°C + +output: + - platform: template + id: outputsplit + type: float + write_action: + - logger.log: "write_action" + +switch: + - platform: template + id: test_switch + name: "Template Switch" + lambda: |- + if (id(some_binary_sensor).state) { + return true; + } else { + return false; + } + turn_on_action: + - logger.log: "turn_on_action" + turn_off_action: + - logger.log: "turn_off_action" + +button: + - platform: template + name: "Template Button" + on_press: + - logger.log: Button Pressed + +cover: + - platform: template + name: "Template Cover" + lambda: |- + if (id(some_binary_sensor).state) { + return COVER_OPEN; + } else { + return COVER_CLOSED; + } + open_action: + - logger.log: open_action + close_action: + - logger.log: close_action + stop_action: + - logger.log: stop_action + optimistic: true + +number: + - platform: template + name: "Template number" + optimistic: true + min_value: 0 + max_value: 100 + step: 1 + +select: + - platform: template + name: "Template select" + optimistic: true + options: + - one + - two + - three + initial_option: two + +lock: + - platform: template + name: "Template Lock" + lambda: |- + if (id(some_binary_sensor).state) { + return LOCK_STATE_LOCKED; + } else { + return LOCK_STATE_UNLOCKED; + } + lock_action: + - logger.log: lock_action + unlock_action: + - logger.log: unlock_action + open_action: + - logger.log: open_action + +valve: + - platform: template + id: template_valve + name: "Template Valve" + lambda: |- + if (id(some_binary_sensor).state) { + return VALVE_OPEN; + } else { + return VALVE_CLOSED; + } + open_action: + - logger.log: open_action + close_action: + - logger.log: close_action + - valve.template.publish: + id: template_valve + state: CLOSED + stop_action: + - logger.log: stop_action + optimistic: true + +text: + - platform: template + name: "Template text" + optimistic: true + min_length: 0 + max_length: 100 + mode: text + - platform: template + name: "Template text lambda" + mode: text + update_interval: 1s + lambda: | + return std::string{"Hello!"}; + set_action: + then: + - logger.log: + format: Template Text set to %s + args: ["x.c_str()"] + +alarm_control_panel: + - platform: template + name: Alarm Panel + codes: + - "1234" + +datetime: + - platform: template + name: Date + id: test_date + type: date + initial_value: "2000-1-2" + set_action: + - logger.log: "set_value" + on_value: + - logger.log: + format: "Date: %04d-%02d-%02d" + args: + - x.year + - x.month + - x.day_of_month + - platform: template + name: Time + id: test_time + type: time + initial_value: "12:34:56am" + set_action: + - logger.log: "set_value" + on_value: + - logger.log: + format: "Time: %02d:%02d:%02d" + args: + - x.hour + - x.minute + - x.second + - platform: template + name: DateTime + id: test_datetime + type: datetime + initial_value: "2000-1-2 12:34:56" + set_action: + - logger.log: "set_value" + on_value: + - logger.log: + format: "DateTime: %04d-%02d-%02d %02d:%02d:%02d" + args: + - x.year + - x.month + - x.day_of_month + - x.hour + - x.minute + - x.second diff --git a/tests/components/template/common.yaml b/tests/components/template/common.yaml index efbb83ee06..d06f3ce131 100644 --- a/tests/components/template/common.yaml +++ b/tests/components/template/common.yaml @@ -1,343 +1,4 @@ -esphome: - on_boot: - - sensor.template.publish: - id: template_sens - state: 42.0 - - # Templated - - sensor.template.publish: - id: template_sens - state: !lambda "return 42.0;" - - - datetime.date.set: - id: test_date - date: - year: 2021 - month: 1 - day: 1 - - datetime.date.set: - id: test_date - date: !lambda "return {.day_of_month = 1, .month = 1, .year = 2021};" - - datetime.date.set: - id: test_date - date: "2021-01-01" - -binary_sensor: - - platform: template - id: some_binary_sensor - name: "Garage Door Open" - lambda: |- - if (id(template_sens).state > 30) { - // Garage Door is open. - return true; - } else { - // Garage Door is closed. - return false; - } - - platform: template - id: other_binary_sensor - name: "Garage Door Closed" - condition: - sensor.in_range: - id: template_sens - below: 30.0 - filters: - - invert: - - delayed_on: 100ms - - delayed_off: 100ms - - delayed_on_off: !lambda "if (id(test_switch).state) return 1000; else return 0;" - - delayed_on_off: - time_on: 10s - time_off: !lambda "if (id(test_switch).state) return 1000; else return 0;" - - autorepeat: - - delay: 1s - time_off: 100ms - time_on: 900ms - - delay: 5s - time_off: 100ms - time_on: 400ms - - lambda: |- - if (id(other_binary_sensor).state) { - return x; - } else { - return {}; - } - - settle: 500ms - - timeout: 5s - -sensor: - - platform: template - name: "Template Sensor" - id: template_sens - lambda: |- - if (id(some_binary_sensor).state) { - return 42.0; - } else { - return 0.0; - } - update_interval: 60s - filters: - - calibrate_linear: - - 0.0 -> 0.0 - - 40.0 -> 45.0 - - 100.0 -> 102.5 - - calibrate_polynomial: - degree: 2 - datapoints: - # Map 0.0 (from sensor) to 0.0 (true value) - - 0.0 -> 0.0 - - 10.0 -> 12.1 - - 13.0 -> 14.0 - - clamp: - max_value: 10.0 - min_value: -10.0 - - debounce: 0.1s - - delta: 5.0 - - exponential_moving_average: - alpha: 0.1 - send_every: 15 - - filter_out: - - 10 - - 20 - - !lambda return 10; - - filter_out: 10 - - filter_out: !lambda return NAN; - - heartbeat: 5s - - lambda: return x * (9.0/5.0) + 32.0; - - max: - window_size: 10 - send_every: 2 - send_first_at: 1 - - median: - window_size: 7 - send_every: 4 - send_first_at: 3 - - min: - window_size: 10 - send_every: 2 - send_first_at: 1 - - multiply: 1 - - multiply: !lambda return 2; - - offset: 10 - - offset: !lambda return 10; - - or: - - quantile: - window_size: 7 - send_every: 4 - send_first_at: 3 - quantile: .9 - - round: 1 - - round_to_multiple_of: 0.25 - - skip_initial: 3 - - sliding_window_moving_average: - window_size: 15 - send_every: 15 - - throttle: 1s - - throttle_average: 2s - - throttle_with_priority: 5s - - throttle_with_priority: - timeout: 3s - value: 42.0 - - throttle_with_priority: - timeout: 3s - value: !lambda return 1.0f / 2.0f; - - throttle_with_priority: - timeout: 3s - value: - - 42.0 - - !lambda return 2.0f / 2.0f; - - nan - - timeout: - timeout: 10s - value: !lambda return 10; - - timeout: - timeout: 1h - value: 20.0 - - timeout: - timeout: 1min - value: last - - timeout: - timeout: 1d - - to_ntc_resistance: - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C - - to_ntc_temperature: - calibration: - - 10.0kOhm -> 25°C - - 27.219kOhm -> 0°C - - 14.674kOhm -> 15°C - -output: - - platform: template - id: outputsplit - type: float - write_action: - - logger.log: "write_action" - -switch: - - platform: template - id: test_switch - name: "Template Switch" - lambda: |- - if (id(some_binary_sensor).state) { - return true; - } else { - return false; - } - turn_on_action: - - logger.log: "turn_on_action" - turn_off_action: - - logger.log: "turn_off_action" - -button: - - platform: template - name: "Template Button" - on_press: - - logger.log: Button Pressed - -cover: - - platform: template - name: "Template Cover" - lambda: |- - if (id(some_binary_sensor).state) { - return COVER_OPEN; - } else { - return COVER_CLOSED; - } - open_action: - - logger.log: open_action - close_action: - - logger.log: close_action - stop_action: - - logger.log: stop_action - optimistic: true - -number: - - platform: template - name: "Template number" - optimistic: true - min_value: 0 - max_value: 100 - step: 1 - -select: - - platform: template - name: "Template select" - optimistic: true - options: - - one - - two - - three - initial_option: two - -lock: - - platform: template - name: "Template Lock" - lambda: |- - if (id(some_binary_sensor).state) { - return LOCK_STATE_LOCKED; - } else { - return LOCK_STATE_UNLOCKED; - } - lock_action: - - logger.log: lock_action - unlock_action: - - logger.log: unlock_action - open_action: - - logger.log: open_action - -valve: - - platform: template - name: "Template Valve" - lambda: |- - if (id(some_binary_sensor).state) { - return VALVE_OPEN; - } else { - return VALVE_CLOSED; - } - open_action: - - logger.log: open_action - close_action: - - logger.log: close_action - - valve.template.publish: - state: CLOSED - stop_action: - - logger.log: stop_action - optimistic: true - -text: - - platform: template - name: "Template text" - optimistic: true - min_length: 0 - max_length: 100 - mode: text - - platform: template - name: "Template text lambda" - mode: text - update_interval: 1s - lambda: | - return std::string{"Hello!"}; - set_action: - then: - - logger.log: - format: Template Text set to %s - args: ["x.c_str()"] - -alarm_control_panel: - - platform: template - name: Alarm Panel - codes: - - "1234" - -datetime: - - platform: template - name: Date - id: test_date - type: date - initial_value: "2000-1-2" - set_action: - - logger.log: "set_value" - on_value: - - logger.log: - format: "Date: %04d-%02d-%02d" - args: - - x.year - - x.month - - x.day_of_month - - platform: template - name: Time - id: test_time - type: time - initial_value: "12:34:56am" - set_action: - - logger.log: "set_value" - on_value: - - logger.log: - format: "Time: %02d:%02d:%02d" - args: - - x.hour - - x.minute - - x.second - - platform: template - name: DateTime - id: test_datetime - type: datetime - initial_value: "2000-1-2 12:34:56" - set_action: - - logger.log: "set_value" - on_value: - - logger.log: - format: "DateTime: %04d-%02d-%02d %02d:%02d:%02d" - args: - - x.year - - x.month - - x.day_of_month - - x.hour - - x.minute - - x.second +<<: !include common-base.yaml time: - platform: sntp # Required for datetime diff --git a/tests/components/template/test.nrf52-adafruit.yaml b/tests/components/template/test.nrf52-adafruit.yaml index 6a8c01560a..45751c6398 100644 --- a/tests/components/template/test.nrf52-adafruit.yaml +++ b/tests/components/template/test.nrf52-adafruit.yaml @@ -1,6 +1 @@ -packages: !include common.yaml - -time: - - id: !remove sntp_time - -wifi: !remove +<<: !include common-base.yaml diff --git a/tests/components/template/test.nrf52-mcumgr.yaml b/tests/components/template/test.nrf52-mcumgr.yaml index 6a8c01560a..45751c6398 100644 --- a/tests/components/template/test.nrf52-mcumgr.yaml +++ b/tests/components/template/test.nrf52-mcumgr.yaml @@ -1,6 +1 @@ -packages: !include common.yaml - -time: - - id: !remove sntp_time - -wifi: !remove +<<: !include common-base.yaml diff --git a/tests/components/tlc59208f/common.yaml b/tests/components/tlc59208f/common.yaml index 49460dcefc..1943063347 100644 --- a/tests/components/tlc59208f/common.yaml +++ b/tests/components/tlc59208f/common.yaml @@ -1,15 +1,13 @@ -i2c: - - id: i2c_tlc59208f - scl: ${scl_pin} - sda: ${sda_pin} - tlc59208f: - address: 0x20 id: tlc59208f_1 + i2c_id: i2c_bus - address: 0x22 id: tlc59208f_2 + i2c_id: i2c_bus - address: 0x24 id: tlc59208f_3 + i2c_id: i2c_bus output: - platform: tlc59208f diff --git a/tests/components/tlc59208f/test.esp32-c3-idf.yaml b/tests/components/tlc59208f/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tlc59208f/test.esp32-c3-idf.yaml +++ b/tests/components/tlc59208f/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tlc59208f/test.esp32-idf.yaml b/tests/components/tlc59208f/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tlc59208f/test.esp32-idf.yaml +++ b/tests/components/tlc59208f/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tlc59208f/test.esp8266-ard.yaml b/tests/components/tlc59208f/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tlc59208f/test.esp8266-ard.yaml +++ b/tests/components/tlc59208f/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tlc59208f/test.rp2040-ard.yaml b/tests/components/tlc59208f/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tlc59208f/test.rp2040-ard.yaml +++ b/tests/components/tlc59208f/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tlc5947/test.esp8266-ard.yaml b/tests/components/tlc5947/test.esp8266-ard.yaml index 44da5a07b3..1eb9bcfae2 100644 --- a/tests/components/tlc5947/test.esp8266-ard.yaml +++ b/tests/components/tlc5947/test.esp8266-ard.yaml @@ -1,7 +1,7 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 - lat_pin: GPIO13 + clock_pin: GPIO0 + data_pin: GPIO2 + lat_pin: GPIO15 packages: common: !include common.yaml diff --git a/tests/components/tlc5971/test.esp8266-ard.yaml b/tests/components/tlc5971/test.esp8266-ard.yaml index 52411bc1e9..7923874f96 100644 --- a/tests/components/tlc5971/test.esp8266-ard.yaml +++ b/tests/components/tlc5971/test.esp8266-ard.yaml @@ -1,7 +1,7 @@ substitutions: clock_pin: GPIO15 - data_pin: GPIO14 - lat_pin: GPIO13 + data_pin: GPIO0 + lat_pin: GPIO2 packages: common: !include common.yaml diff --git a/tests/components/tm1621/test.esp32-idf.yaml b/tests/components/tm1621/test.esp32-idf.yaml index 0441e4bffe..21402f3216 100644 --- a/tests/components/tm1621/test.esp32-idf.yaml +++ b/tests/components/tm1621/test.esp32-idf.yaml @@ -1,7 +1,10 @@ substitutions: - cs_pin: GPIO16 - data_pin: GPIO17 + cs_pin: GPIO4 + data_pin: GPIO5 read_pin: GPIO12 write_pin: GPIO13 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/tm1621/test.esp8266-ard.yaml b/tests/components/tm1621/test.esp8266-ard.yaml index ee7b62ce35..304ca71eb2 100644 --- a/tests/components/tm1621/test.esp8266-ard.yaml +++ b/tests/components/tm1621/test.esp8266-ard.yaml @@ -1,7 +1,10 @@ substitutions: cs_pin: GPIO15 - data_pin: GPIO14 - read_pin: GPIO12 - write_pin: GPIO13 + data_pin: GPIO0 + read_pin: GPIO2 + write_pin: GPIO16 + +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tm1621/test.rp2040-ard.yaml b/tests/components/tm1621/test.rp2040-ard.yaml index 562ced7485..9a880da876 100644 --- a/tests/components/tm1621/test.rp2040-ard.yaml +++ b/tests/components/tm1621/test.rp2040-ard.yaml @@ -1,7 +1,10 @@ substitutions: cs_pin: GPIO6 data_pin: GPIO7 - read_pin: GPIO2 - write_pin: GPIO3 + read_pin: GPIO8 + write_pin: GPIO9 + +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tm1637/test.esp32-c3-idf.yaml b/tests/components/tm1637/test.esp32-c3-idf.yaml index 96f6708a3b..0c4d4a9a7a 100644 --- a/tests/components/tm1637/test.esp32-c3-idf.yaml +++ b/tests/components/tm1637/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO4 + clk_pin: GPIO7 dio_pin: GPIO3 <<: !include common.yaml diff --git a/tests/components/tm1637/test.esp8266-ard.yaml b/tests/components/tm1637/test.esp8266-ard.yaml index 2c5786c47c..0a4221cbc0 100644 --- a/tests/components/tm1637/test.esp8266-ard.yaml +++ b/tests/components/tm1637/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO14 - dio_pin: GPIO13 + clk_pin: GPIO0 + dio_pin: GPIO2 <<: !include common.yaml diff --git a/tests/components/tmp102/common.yaml b/tests/components/tmp102/common.yaml index afc4a27fad..049a8067da 100644 --- a/tests/components/tmp102/common.yaml +++ b/tests/components/tmp102/common.yaml @@ -1,8 +1,4 @@ -i2c: - - id: i2c_tmp102 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tmp102 + i2c_id: i2c_bus name: TMP102 Temperature diff --git a/tests/components/tmp102/test.esp32-c3-idf.yaml b/tests/components/tmp102/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tmp102/test.esp32-c3-idf.yaml +++ b/tests/components/tmp102/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tmp102/test.esp32-idf.yaml b/tests/components/tmp102/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tmp102/test.esp32-idf.yaml +++ b/tests/components/tmp102/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tmp102/test.esp8266-ard.yaml b/tests/components/tmp102/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tmp102/test.esp8266-ard.yaml +++ b/tests/components/tmp102/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tmp102/test.rp2040-ard.yaml b/tests/components/tmp102/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tmp102/test.rp2040-ard.yaml +++ b/tests/components/tmp102/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tmp1075/common.yaml b/tests/components/tmp1075/common.yaml index 4c4c6c6f35..90025f231e 100644 --- a/tests/components/tmp1075/common.yaml +++ b/tests/components/tmp1075/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_tmp1075 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tmp1075 + i2c_id: i2c_bus name: Temperature TMP1075 conversion_rate: 27.5ms alert: diff --git a/tests/components/tmp1075/test.esp32-c3-idf.yaml b/tests/components/tmp1075/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tmp1075/test.esp32-c3-idf.yaml +++ b/tests/components/tmp1075/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tmp1075/test.esp32-idf.yaml b/tests/components/tmp1075/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tmp1075/test.esp32-idf.yaml +++ b/tests/components/tmp1075/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tmp1075/test.esp8266-ard.yaml b/tests/components/tmp1075/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tmp1075/test.esp8266-ard.yaml +++ b/tests/components/tmp1075/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tmp1075/test.rp2040-ard.yaml b/tests/components/tmp1075/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tmp1075/test.rp2040-ard.yaml +++ b/tests/components/tmp1075/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tmp117/common.yaml b/tests/components/tmp117/common.yaml index f4a5688933..58419c2134 100644 --- a/tests/components/tmp117/common.yaml +++ b/tests/components/tmp117/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_tmp117 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tmp117 + i2c_id: i2c_bus name: TMP117 Temperature update_interval: 5s diff --git a/tests/components/tmp117/test.esp32-c3-idf.yaml b/tests/components/tmp117/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tmp117/test.esp32-c3-idf.yaml +++ b/tests/components/tmp117/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tmp117/test.esp32-idf.yaml b/tests/components/tmp117/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tmp117/test.esp32-idf.yaml +++ b/tests/components/tmp117/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tmp117/test.esp8266-ard.yaml b/tests/components/tmp117/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tmp117/test.esp8266-ard.yaml +++ b/tests/components/tmp117/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tmp117/test.rp2040-ard.yaml b/tests/components/tmp117/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tmp117/test.rp2040-ard.yaml +++ b/tests/components/tmp117/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tof10120/common.yaml b/tests/components/tof10120/common.yaml index 67643323d9..b360a27248 100644 --- a/tests/components/tof10120/common.yaml +++ b/tests/components/tof10120/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_tof10120 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tof10120 + i2c_id: i2c_bus name: Distance sensor update_interval: 5s diff --git a/tests/components/tof10120/test.esp32-c3-idf.yaml b/tests/components/tof10120/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tof10120/test.esp32-c3-idf.yaml +++ b/tests/components/tof10120/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tof10120/test.esp32-idf.yaml b/tests/components/tof10120/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tof10120/test.esp32-idf.yaml +++ b/tests/components/tof10120/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tof10120/test.esp8266-ard.yaml b/tests/components/tof10120/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tof10120/test.esp8266-ard.yaml +++ b/tests/components/tof10120/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tof10120/test.rp2040-ard.yaml b/tests/components/tof10120/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tof10120/test.rp2040-ard.yaml +++ b/tests/components/tof10120/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tormatic/common.yaml b/tests/components/tormatic/common.yaml index 0f1b33ac12..712bf7569b 100644 --- a/tests/components/tormatic/common.yaml +++ b/tests/components/tormatic/common.yaml @@ -1,12 +1,5 @@ -uart: - - id: uart_tormatic - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - cover: - platform: tormatic - uart_id: uart_tormatic id: tormatic_garage_door name: Tormatic Garage Door open_duration: 15s diff --git a/tests/components/tormatic/test.esp32-c3-idf.yaml b/tests/components/tormatic/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/tormatic/test.esp32-c3-idf.yaml +++ b/tests/components/tormatic/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tormatic/test.esp32-idf.yaml b/tests/components/tormatic/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/tormatic/test.esp32-idf.yaml +++ b/tests/components/tormatic/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tormatic/test.esp8266-ard.yaml b/tests/components/tormatic/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/tormatic/test.esp8266-ard.yaml +++ b/tests/components/tormatic/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tormatic/test.rp2040-ard.yaml b/tests/components/tormatic/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/tormatic/test.rp2040-ard.yaml +++ b/tests/components/tormatic/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/total_daily_energy/test.esp8266-ard.yaml b/tests/components/total_daily_energy/test.esp8266-ard.yaml index 8b42b21b54..ec9c0e43dc 100644 --- a/tests/components/total_daily_energy/test.esp8266-ard.yaml +++ b/tests/components/total_daily_energy/test.esp8266-ard.yaml @@ -1,6 +1,6 @@ substitutions: - sel_pin: GPIO12 - cf_pin: GPIO13 - cf1_pin: GPIO14 + sel_pin: GPIO0 + cf_pin: GPIO2 + cf1_pin: GPIO15 <<: !include common.yaml diff --git a/tests/components/tsl2561/common.yaml b/tests/components/tsl2561/common.yaml index d2b4f75df3..132bdb890e 100644 --- a/tests/components/tsl2561/common.yaml +++ b/tests/components/tsl2561/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_tsl2561 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tsl2561 + i2c_id: i2c_bus name: TSL2561 Ambient Light address: 0x39 is_cs_package: true diff --git a/tests/components/tsl2561/test.esp32-c3-idf.yaml b/tests/components/tsl2561/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tsl2561/test.esp32-c3-idf.yaml +++ b/tests/components/tsl2561/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tsl2561/test.esp32-idf.yaml b/tests/components/tsl2561/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tsl2561/test.esp32-idf.yaml +++ b/tests/components/tsl2561/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tsl2561/test.esp8266-ard.yaml b/tests/components/tsl2561/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tsl2561/test.esp8266-ard.yaml +++ b/tests/components/tsl2561/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tsl2561/test.rp2040-ard.yaml b/tests/components/tsl2561/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tsl2561/test.rp2040-ard.yaml +++ b/tests/components/tsl2561/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tsl2591/common.yaml b/tests/components/tsl2591/common.yaml index d58c46fb48..93433cf968 100644 --- a/tests/components/tsl2591/common.yaml +++ b/tests/components/tsl2591/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_tsl2591 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: tsl2591 + i2c_id: i2c_bus id: test_tsl2591 address: 0x29 integration_time: 600ms diff --git a/tests/components/tsl2591/test.esp32-c3-idf.yaml b/tests/components/tsl2591/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/tsl2591/test.esp32-c3-idf.yaml +++ b/tests/components/tsl2591/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tsl2591/test.esp32-idf.yaml b/tests/components/tsl2591/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/tsl2591/test.esp32-idf.yaml +++ b/tests/components/tsl2591/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tsl2591/test.esp8266-ard.yaml b/tests/components/tsl2591/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/tsl2591/test.esp8266-ard.yaml +++ b/tests/components/tsl2591/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tsl2591/test.rp2040-ard.yaml b/tests/components/tsl2591/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/tsl2591/test.rp2040-ard.yaml +++ b/tests/components/tsl2591/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tt21100/common.yaml b/tests/components/tt21100/common.yaml index a5d7970429..bd1830ea8b 100644 --- a/tests/components/tt21100/common.yaml +++ b/tests/components/tt21100/common.yaml @@ -1,25 +1,24 @@ -i2c: - - id: i2c_tt21100 - scl: ${scl_pin} - sda: ${sda_pin} - display: - platform: ssd1306_i2c + i2c_id: i2c_bus id: ssd1306_display model: SSD1306_128X64 reset_pin: ${disp_reset_pin} pages: - - id: page1 + - id: tt21100_page1 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height()); touchscreen: - platform: tt21100 + i2c_id: i2c_bus + id: tt21100_touchscreen display: ssd1306_display interrupt_pin: ${interrupt_pin} reset_pin: ${reset_pin} binary_sensor: - platform: tt21100 + id: tt21100_button name: Home Button index: 1 diff --git a/tests/components/tt21100/test.esp32-c3-idf.yaml b/tests/components/tt21100/test.esp32-c3-idf.yaml index 36a8ce2778..a7265e10b2 100644 --- a/tests/components/tt21100/test.esp32-c3-idf.yaml +++ b/tests/components/tt21100/test.esp32-c3-idf.yaml @@ -1,8 +1,9 @@ substitutions: - disp_reset_pin: GPIO10 - scl_pin: GPIO0 - sda_pin: GPIO1 + disp_reset_pin: GPIO7 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/tt21100/test.esp32-idf.yaml b/tests/components/tt21100/test.esp32-idf.yaml index 05598719f9..033aafb73c 100644 --- a/tests/components/tt21100/test.esp32-idf.yaml +++ b/tests/components/tt21100/test.esp32-idf.yaml @@ -1,8 +1,9 @@ substitutions: disp_reset_pin: GPIO12 - scl_pin: GPIO13 - sda_pin: GPIO14 interrupt_pin: GPIO15 - reset_pin: GPIO16 + reset_pin: GPIO4 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/tt21100/test.esp8266-ard.yaml b/tests/components/tt21100/test.esp8266-ard.yaml index 05598719f9..25d1ff82e3 100644 --- a/tests/components/tt21100/test.esp8266-ard.yaml +++ b/tests/components/tt21100/test.esp8266-ard.yaml @@ -1,8 +1,9 @@ substitutions: - disp_reset_pin: GPIO12 - scl_pin: GPIO13 - sda_pin: GPIO14 + disp_reset_pin: GPIO0 interrupt_pin: GPIO15 reset_pin: GPIO16 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/tt21100/test.rp2040-ard.yaml b/tests/components/tt21100/test.rp2040-ard.yaml index 36a8ce2778..0d13628294 100644 --- a/tests/components/tt21100/test.rp2040-ard.yaml +++ b/tests/components/tt21100/test.rp2040-ard.yaml @@ -1,8 +1,9 @@ substitutions: disp_reset_pin: GPIO10 - scl_pin: GPIO0 - sda_pin: GPIO1 interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ttp229_bsf/common.yaml b/tests/components/ttp229_bsf/common.yaml index 42c26a5d51..91134f5098 100644 --- a/tests/components/ttp229_bsf/common.yaml +++ b/tests/components/ttp229_bsf/common.yaml @@ -1,6 +1,6 @@ ttp229_bsf: - scl_pin: ${scl_pin} - sdo_pin: ${sdo_pin} + scl_pin: ${ttp229_scl_pin} + sdo_pin: ${ttp229_sdo_pin} binary_sensor: - platform: ttp229_bsf diff --git a/tests/components/ttp229_bsf/test.esp32-c3-idf.yaml b/tests/components/ttp229_bsf/test.esp32-c3-idf.yaml index 135b213edc..ad1c58b40e 100644 --- a/tests/components/ttp229_bsf/test.esp32-c3-idf.yaml +++ b/tests/components/ttp229_bsf/test.esp32-c3-idf.yaml @@ -1,5 +1,8 @@ substitutions: - scl_pin: GPIO5 - sdo_pin: GPIO4 + ttp229_scl_pin: GPIO7 + ttp229_sdo_pin: GPIO4 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_bsf/test.esp32-idf.yaml b/tests/components/ttp229_bsf/test.esp32-idf.yaml index 80ed75293f..8b7f6fe6ea 100644 --- a/tests/components/ttp229_bsf/test.esp32-idf.yaml +++ b/tests/components/ttp229_bsf/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - scl_pin: GPIO16 - sdo_pin: GPIO17 + ttp229_scl_pin: GPIO14 + ttp229_sdo_pin: GPIO5 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_bsf/test.esp8266-ard.yaml b/tests/components/ttp229_bsf/test.esp8266-ard.yaml index 135b213edc..1832fde07f 100644 --- a/tests/components/ttp229_bsf/test.esp8266-ard.yaml +++ b/tests/components/ttp229_bsf/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - scl_pin: GPIO5 - sdo_pin: GPIO4 + ttp229_scl_pin: GPIO0 + ttp229_sdo_pin: GPIO2 + +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_bsf/test.rp2040-ard.yaml b/tests/components/ttp229_bsf/test.rp2040-ard.yaml index 135b213edc..1448c82347 100644 --- a/tests/components/ttp229_bsf/test.rp2040-ard.yaml +++ b/tests/components/ttp229_bsf/test.rp2040-ard.yaml @@ -1,5 +1,8 @@ substitutions: - scl_pin: GPIO5 - sdo_pin: GPIO4 + ttp229_scl_pin: GPIO2 + ttp229_sdo_pin: GPIO6 + +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_lsf/common.yaml b/tests/components/ttp229_lsf/common.yaml index 5c0dbf9517..41402f5aac 100644 --- a/tests/components/ttp229_lsf/common.yaml +++ b/tests/components/ttp229_lsf/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_ttp229_lsf - scl: ${scl_pin} - sda: ${sda_pin} - ttp229_lsf: + i2c_id: i2c_bus binary_sensor: - platform: ttp229_lsf diff --git a/tests/components/ttp229_lsf/test.esp32-c3-idf.yaml b/tests/components/ttp229_lsf/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ttp229_lsf/test.esp32-c3-idf.yaml +++ b/tests/components/ttp229_lsf/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_lsf/test.esp32-idf.yaml b/tests/components/ttp229_lsf/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ttp229_lsf/test.esp32-idf.yaml +++ b/tests/components/ttp229_lsf/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_lsf/test.esp8266-ard.yaml b/tests/components/ttp229_lsf/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ttp229_lsf/test.esp8266-ard.yaml +++ b/tests/components/ttp229_lsf/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ttp229_lsf/test.rp2040-ard.yaml b/tests/components/ttp229_lsf/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ttp229_lsf/test.rp2040-ard.yaml +++ b/tests/components/ttp229_lsf/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/tuya/common.yaml b/tests/components/tuya/common.yaml index 2c40628139..e177b7d056 100644 --- a/tests/components/tuya/common.yaml +++ b/tests/components/tuya/common.yaml @@ -2,12 +2,6 @@ wifi: ssid: MySSID password: password1 -uart: - - id: uart_tuya - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - tuya: status_pin: number: ${status_pin} diff --git a/tests/components/tuya/test.esp32-c3-idf.yaml b/tests/components/tuya/test.esp32-c3-idf.yaml index c62a0b10f6..43c28ba7b3 100644 --- a/tests/components/tuya/test.esp32-c3-idf.yaml +++ b/tests/components/tuya/test.esp32-c3-idf.yaml @@ -1,6 +1,6 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 status_pin: GPIO2 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/tuya/test.esp32-idf.yaml b/tests/components/tuya/test.esp32-idf.yaml index 926a46cf73..0baa48a6c5 100644 --- a/tests/components/tuya/test.esp32-idf.yaml +++ b/tests/components/tuya/test.esp32-idf.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 status_pin: GPIO12 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/tuya/test.esp8266-ard.yaml b/tests/components/tuya/test.esp8266-ard.yaml index 11d46ed50e..1565495cf8 100644 --- a/tests/components/tuya/test.esp8266-ard.yaml +++ b/tests/components/tuya/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 - status_pin: GPIO12 + tx_pin: GPIO0 + rx_pin: GPIO2 + status_pin: GPIO15 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/tuya/test.rp2040-ard.yaml b/tests/components/tuya/test.rp2040-ard.yaml index 11d46ed50e..0c3db54644 100644 --- a/tests/components/tuya/test.rp2040-ard.yaml +++ b/tests/components/tuya/test.rp2040-ard.yaml @@ -3,4 +3,7 @@ substitutions: rx_pin: GPIO5 status_pin: GPIO12 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/udp/test.esp32-c3-idf.yaml b/tests/components/udp/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/udp/test.esp32-c3-idf.yaml +++ b/tests/components/udp/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/udp/test.esp32-idf.yaml b/tests/components/udp/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/udp/test.esp32-idf.yaml +++ b/tests/components/udp/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/udp/test.esp8266-ard.yaml b/tests/components/udp/test.esp8266-ard.yaml index dade44d145..4a98b9388a 100644 --- a/tests/components/udp/test.esp8266-ard.yaml +++ b/tests/components/udp/test.esp8266-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/udp/test.host.yaml b/tests/components/udp/test.host.yaml index e735c37e4d..84e78894e5 100644 --- a/tests/components/udp/test.host.yaml +++ b/tests/components/udp/test.host.yaml @@ -1,4 +1,15 @@ -packages: - common: !include common.yaml - -wifi: !remove +udp: + id: my_udp + listen_address: 239.0.60.53 + addresses: ["239.0.60.53"] + on_receive: + - logger.log: + format: "Received %d bytes" + args: [data.size()] + - udp.write: + id: my_udp + data: "hello world" + - udp.write: + id: my_udp + data: !lambda |- + return std::vector{1,3,4,5,6}; diff --git a/tests/components/udp/test.rp2040-ard.yaml b/tests/components/udp/test.rp2040-ard.yaml index dade44d145..319a7c71a6 100644 --- a/tests/components/udp/test.rp2040-ard.yaml +++ b/tests/components/udp/test.rp2040-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/ufire_ec/common.yaml b/tests/components/ufire_ec/common.yaml index dcc957aaee..4260f0ab4c 100644 --- a/tests/components/ufire_ec/common.yaml +++ b/tests/components/ufire_ec/common.yaml @@ -7,16 +7,12 @@ esphome: temperature: !lambda "return id(test_sensor).state;" - ufire_ec.reset: -i2c: - - id: i2c_ufire_ec - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: template id: test_sensor lambda: "return 21;" - platform: ufire_ec + i2c_id: i2c_bus id: ufire_ec_board ec: name: Ufire EC diff --git a/tests/components/ufire_ec/test.esp32-c3-idf.yaml b/tests/components/ufire_ec/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ufire_ec/test.esp32-c3-idf.yaml +++ b/tests/components/ufire_ec/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ec/test.esp32-idf.yaml b/tests/components/ufire_ec/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ufire_ec/test.esp32-idf.yaml +++ b/tests/components/ufire_ec/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ec/test.esp8266-ard.yaml b/tests/components/ufire_ec/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ufire_ec/test.esp8266-ard.yaml +++ b/tests/components/ufire_ec/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ec/test.rp2040-ard.yaml b/tests/components/ufire_ec/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ufire_ec/test.rp2040-ard.yaml +++ b/tests/components/ufire_ec/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ise/common.yaml b/tests/components/ufire_ise/common.yaml index d6ead8c479..f7865ea87b 100644 --- a/tests/components/ufire_ise/common.yaml +++ b/tests/components/ufire_ise/common.yaml @@ -9,16 +9,12 @@ esphome: solution: 4.0 - ufire_ise.reset: -i2c: - - id: i2c_ufire_ise - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: template id: test_sensor lambda: "return 21;" - platform: ufire_ise + i2c_id: i2c_bus id: ufire_ise_sensor temperature_sensor: test_sensor ph: diff --git a/tests/components/ufire_ise/test.esp32-c3-idf.yaml b/tests/components/ufire_ise/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/ufire_ise/test.esp32-c3-idf.yaml +++ b/tests/components/ufire_ise/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ise/test.esp32-idf.yaml b/tests/components/ufire_ise/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/ufire_ise/test.esp32-idf.yaml +++ b/tests/components/ufire_ise/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ise/test.esp8266-ard.yaml b/tests/components/ufire_ise/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/ufire_ise/test.esp8266-ard.yaml +++ b/tests/components/ufire_ise/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/ufire_ise/test.rp2040-ard.yaml b/tests/components/ufire_ise/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/ufire_ise/test.rp2040-ard.yaml +++ b/tests/components/ufire_ise/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/update/common.yaml b/tests/components/update/common.yaml index 45ed110352..521a0a6a5c 100644 --- a/tests/components/update/common.yaml +++ b/tests/components/update/common.yaml @@ -21,10 +21,12 @@ http_request: ota: - platform: http_request + id: update_http_request_ota update: - platform: http_request name: Firmware Update + ota_id: update_http_request_ota source: http://example.com/manifest.json on_update_available: - logger.log: "A new update is available" diff --git a/tests/components/uponor_smatrix/common.yaml b/tests/components/uponor_smatrix/common.yaml index 8ee92bdfc5..786a604aec 100644 --- a/tests/components/uponor_smatrix/common.yaml +++ b/tests/components/uponor_smatrix/common.yaml @@ -2,12 +2,6 @@ wifi: ssid: MySSID password: password1 -uart: - - id: uponor_uart - baud_rate: 19200 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - time: - platform: sntp id: sntp_time @@ -17,7 +11,6 @@ time: - 192.168.178.1 uponor_smatrix: - uart_id: uponor_uart address: 0x110B time_id: sntp_time time_device_address: 0xDE13 diff --git a/tests/components/uponor_smatrix/test.esp32-c3-idf.yaml b/tests/components/uponor_smatrix/test.esp32-c3-idf.yaml index b516342f3b..cd26c783c2 100644 --- a/tests/components/uponor_smatrix/test.esp32-c3-idf.yaml +++ b/tests/components/uponor_smatrix/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp32-c3-idf.yaml + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/uponor_smatrix/test.esp32-idf.yaml b/tests/components/uponor_smatrix/test.esp32-idf.yaml index f486544afa..76222997a8 100644 --- a/tests/components/uponor_smatrix/test.esp32-idf.yaml +++ b/tests/components/uponor_smatrix/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/uponor_smatrix/test.esp8266-ard.yaml b/tests/components/uponor_smatrix/test.esp8266-ard.yaml index b516342f3b..1f4483954b 100644 --- a/tests/components/uponor_smatrix/test.esp8266-ard.yaml +++ b/tests/components/uponor_smatrix/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/esp8266-ard.yaml + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/uponor_smatrix/test.rp2040-ard.yaml b/tests/components/uponor_smatrix/test.rp2040-ard.yaml index b516342f3b..65ba185aef 100644 --- a/tests/components/uponor_smatrix/test.rp2040-ard.yaml +++ b/tests/components/uponor_smatrix/test.rp2040-ard.yaml @@ -1,5 +1,5 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart_19200: !include ../../test_build_components/common/uart_19200/rp2040-ard.yaml + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/vbus/common.yaml b/tests/components/vbus/common.yaml index a1f94cd839..33d9e2935d 100644 --- a/tests/components/vbus/common.yaml +++ b/tests/components/vbus/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_vbus - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - vbus: binary_sensor: diff --git a/tests/components/vbus/test.esp32-c3-idf.yaml b/tests/components/vbus/test.esp32-c3-idf.yaml index b516342f3b..a19013bf54 100644 --- a/tests/components/vbus/test.esp32-c3-idf.yaml +++ b/tests/components/vbus/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/vbus/test.esp32-idf.yaml b/tests/components/vbus/test.esp32-idf.yaml index f486544afa..2d29656c94 100644 --- a/tests/components/vbus/test.esp32-idf.yaml +++ b/tests/components/vbus/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/vbus/test.esp8266-ard.yaml b/tests/components/vbus/test.esp8266-ard.yaml index b516342f3b..5a05efa259 100644 --- a/tests/components/vbus/test.esp8266-ard.yaml +++ b/tests/components/vbus/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/vbus/test.rp2040-ard.yaml b/tests/components/vbus/test.rp2040-ard.yaml index b516342f3b..f1df2daf83 100644 --- a/tests/components/vbus/test.rp2040-ard.yaml +++ b/tests/components/vbus/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/veml3235/common.yaml b/tests/components/veml3235/common.yaml index b89a9e12c7..98ffb0729c 100644 --- a/tests/components/veml3235/common.yaml +++ b/tests/components/veml3235/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_veml3235 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: veml3235 + i2c_id: i2c_bus id: veml3235_sensor name: VEML3235 Light Sensor auto_gain: true diff --git a/tests/components/veml3235/test.esp32-c3-idf.yaml b/tests/components/veml3235/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/veml3235/test.esp32-c3-idf.yaml +++ b/tests/components/veml3235/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/veml3235/test.esp32-idf.yaml b/tests/components/veml3235/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/veml3235/test.esp32-idf.yaml +++ b/tests/components/veml3235/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/veml3235/test.esp8266-ard.yaml b/tests/components/veml3235/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/veml3235/test.esp8266-ard.yaml +++ b/tests/components/veml3235/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/veml3235/test.rp2040-ard.yaml b/tests/components/veml3235/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/veml3235/test.rp2040-ard.yaml +++ b/tests/components/veml3235/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/veml7700/common.yaml b/tests/components/veml7700/common.yaml index af4ebee6e7..06c1d304c3 100644 --- a/tests/components/veml7700/common.yaml +++ b/tests/components/veml7700/common.yaml @@ -1,12 +1,7 @@ -i2c: - - id: i2c_veml7700 - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: veml7700 + i2c_id: i2c_bus address: 0x10 - i2c_id: i2c_veml7700 ambient_light: Ambient light ambient_light_counts: Ambient light counts full_spectrum: Full spectrum diff --git a/tests/components/veml7700/test.esp32-c3-idf.yaml b/tests/components/veml7700/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/veml7700/test.esp32-c3-idf.yaml +++ b/tests/components/veml7700/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/veml7700/test.esp32-idf.yaml b/tests/components/veml7700/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/veml7700/test.esp32-idf.yaml +++ b/tests/components/veml7700/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/veml7700/test.esp8266-ard.yaml b/tests/components/veml7700/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/veml7700/test.esp8266-ard.yaml +++ b/tests/components/veml7700/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/veml7700/test.rp2040-ard.yaml b/tests/components/veml7700/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/veml7700/test.rp2040-ard.yaml +++ b/tests/components/veml7700/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/vl53l0x/common.yaml b/tests/components/vl53l0x/common.yaml index 8346eae854..98277639cf 100644 --- a/tests/components/vl53l0x/common.yaml +++ b/tests/components/vl53l0x/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_vl53l0x - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: vl53l0x + i2c_id: i2c_bus name: VL53L0x Distance address: 0x29 enable_pin: 3 diff --git a/tests/components/vl53l0x/test.esp32-c3-idf.yaml b/tests/components/vl53l0x/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/vl53l0x/test.esp32-c3-idf.yaml +++ b/tests/components/vl53l0x/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/vl53l0x/test.esp32-idf.yaml b/tests/components/vl53l0x/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/vl53l0x/test.esp32-idf.yaml +++ b/tests/components/vl53l0x/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/vl53l0x/test.esp8266-ard.yaml b/tests/components/vl53l0x/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/vl53l0x/test.esp8266-ard.yaml +++ b/tests/components/vl53l0x/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/vl53l0x/test.rp2040-ard.yaml b/tests/components/vl53l0x/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/vl53l0x/test.rp2040-ard.yaml +++ b/tests/components/vl53l0x/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/voice_assistant/common-idf.yaml b/tests/components/voice_assistant/common-idf.yaml index b1d249d5b4..ab8cbf2434 100644 --- a/tests/components/voice_assistant/common-idf.yaml +++ b/tests/components/voice_assistant/common-idf.yaml @@ -18,6 +18,7 @@ i2s_audio: micro_wake_word: id: mww_id + microphone: mic_id_external on_wake_word_detected: - voice_assistant.start: wake_word: !lambda return wake_word; diff --git a/tests/components/voice_assistant/test.esp32-idf.yaml b/tests/components/voice_assistant/test.esp32-idf.yaml index 0fe5d347be..1c5c9ddf99 100644 --- a/tests/components/voice_assistant/test.esp32-idf.yaml +++ b/tests/components/voice_assistant/test.esp32-idf.yaml @@ -1,6 +1,6 @@ substitutions: - i2s_lrclk_pin: GPIO16 - i2s_bclk_pin: GPIO17 + i2s_lrclk_pin: GPIO4 + i2s_bclk_pin: GPIO5 i2s_mclk_pin: GPIO15 i2s_din_pin: GPIO13 i2s_dout_pin: GPIO12 diff --git a/tests/components/wake_on_lan/test.esp32-c3-idf.yaml b/tests/components/wake_on_lan/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/wake_on_lan/test.esp32-c3-idf.yaml +++ b/tests/components/wake_on_lan/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wake_on_lan/test.esp32-idf.yaml b/tests/components/wake_on_lan/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/wake_on_lan/test.esp32-idf.yaml +++ b/tests/components/wake_on_lan/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wake_on_lan/test.esp8266-ard.yaml b/tests/components/wake_on_lan/test.esp8266-ard.yaml index dade44d145..4a98b9388a 100644 --- a/tests/components/wake_on_lan/test.esp8266-ard.yaml +++ b/tests/components/wake_on_lan/test.esp8266-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/wake_on_lan/test.rp2040-ard.yaml b/tests/components/wake_on_lan/test.rp2040-ard.yaml index dade44d145..319a7c71a6 100644 --- a/tests/components/wake_on_lan/test.rp2040-ard.yaml +++ b/tests/components/wake_on_lan/test.rp2040-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/waveshare_epaper/common.yaml b/tests/components/waveshare_epaper/common.yaml index a2aa3134b5..b80a352c1f 100644 --- a/tests/components/waveshare_epaper/common.yaml +++ b/tests/components/waveshare_epaper/common.yaml @@ -1,14 +1,8 @@ -spi: - - id: spi_waveshare_epaper - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - display: # 1.54 inch displays - platform: waveshare_epaper id: epd_1_54 model: 1.54in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -28,7 +22,6 @@ display: - platform: waveshare_epaper id: epd_1_54v2 model: 1.54inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -48,7 +41,6 @@ display: - platform: waveshare_epaper id: epd_1_54v2b model: 1.54inv2-b - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -67,7 +59,6 @@ display: - platform: waveshare_epaper id: epd_1_54m09 model: 1.54in-m5coreink-m09 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -87,7 +78,6 @@ display: - platform: waveshare_epaper id: epd_2_13 model: 2.13in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -107,7 +97,6 @@ display: - platform: waveshare_epaper id: epd_2_13v2 model: 2.13inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -127,7 +116,6 @@ display: - platform: waveshare_epaper id: epd_2_13ttgo model: 2.13in-ttgo - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -147,7 +135,6 @@ display: - platform: waveshare_epaper id: epd_2_13ttgo_b1 model: 2.13in-ttgo-b1 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -167,7 +154,6 @@ display: - platform: waveshare_epaper id: epd_2_13ttgo_b73 model: 2.13in-ttgo-b73 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -187,7 +173,6 @@ display: - platform: waveshare_epaper id: epd_2_13ttgo_b74 model: 2.13in-ttgo-b74 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -207,7 +192,6 @@ display: - platform: waveshare_epaper id: epd_2_13dke model: 2.13in-ttgo-dke - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -227,7 +211,6 @@ display: - platform: waveshare_epaper id: epd_2_13v3 model: 2.13inv3 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -248,7 +231,6 @@ display: - platform: waveshare_epaper id: epd_2_70 model: 2.70in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -267,7 +249,6 @@ display: - platform: waveshare_epaper id: epd_2_70b model: 2.70in-b - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -286,7 +267,6 @@ display: - platform: waveshare_epaper id: epd_2_70bv2 model: 2.70in-bv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -305,7 +285,6 @@ display: - platform: waveshare_epaper id: epd_2_70v2 model: 2.70inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -325,7 +304,6 @@ display: - platform: waveshare_epaper id: epd_2_90 model: 2.90in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -346,7 +324,6 @@ display: - platform: waveshare_epaper id: epd_2_90v2 model: 2.90inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -367,7 +344,6 @@ display: - platform: waveshare_epaper id: epd_2_90b model: 2.90in-b - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -386,7 +362,6 @@ display: - platform: waveshare_epaper id: epd_2_90bv3 model: 2.90in-bv3 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -405,7 +380,6 @@ display: - platform: waveshare_epaper id: epd_2_90v2r2 model: 2.90inv2-r2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -425,7 +399,6 @@ display: - platform: waveshare_epaper id: epd_2_90dke model: 2.90in-dke - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -446,7 +419,6 @@ display: - platform: waveshare_epaper id: epd_gdew029t5 model: gdew029t5 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -466,7 +438,6 @@ display: - platform: waveshare_epaper id: epd_gdew042t81 model: gdey042t81 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -487,7 +458,6 @@ display: - platform: waveshare_epaper id: epd_4_20 model: 4.20in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -506,7 +476,6 @@ display: - platform: waveshare_epaper id: epd_4_20bv2 model: 4.20in-bv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -525,7 +494,6 @@ display: - platform: waveshare_epaper id: epd_4_20in_bv2_bwr model: 4.20in-bv2-bwr - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -545,7 +513,6 @@ display: - platform: waveshare_epaper id: epd_5_65 model: 5.65in-f - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -565,7 +532,6 @@ display: - platform: waveshare_epaper id: epd_5_83 model: 5.83in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -584,7 +550,6 @@ display: - platform: waveshare_epaper id: epd_5_83v2 model: 5.83inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -604,7 +569,6 @@ display: - platform: waveshare_epaper id: epd_7_50 model: 7.50in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -623,7 +587,6 @@ display: - platform: waveshare_epaper id: epd_7_50bv2 model: 7.50in-bv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -642,7 +605,6 @@ display: - platform: waveshare_epaper id: epd_7_50bv3 model: 7.50in-bv3 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -661,7 +623,6 @@ display: - platform: waveshare_epaper id: epd_7_50bv3_bwr model: 7.50in-bv3-bwr - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -680,7 +641,6 @@ display: - platform: waveshare_epaper id: epd_7_50bc model: 7.50in-bc - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -699,7 +659,6 @@ display: - platform: waveshare_epaper id: epd_7_50v2 model: 7.50inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -718,7 +677,6 @@ display: - platform: waveshare_epaper id: epd_7_50v2alt model: 7.50inv2alt - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -737,7 +695,6 @@ display: - platform: waveshare_epaper id: epd_7_50inv2p model: 7.50inv2p - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -757,7 +714,6 @@ display: - platform: waveshare_epaper id: epd_7_50hdb model: 7.50in-hd-b - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -777,7 +733,6 @@ display: - platform: waveshare_epaper id: epd_13_3k model: 13.3in-k - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -795,7 +750,6 @@ display: - platform: waveshare_epaper model: 2.90in-d - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -814,7 +768,6 @@ display: - platform: waveshare_epaper model: 2.90in - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -834,7 +787,6 @@ display: - platform: waveshare_epaper model: 2.90inv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -853,7 +805,6 @@ display: - platform: waveshare_epaper model: 2.70in-b - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} @@ -871,7 +822,6 @@ display: - platform: waveshare_epaper model: 2.70in-bv2 - spi_id: spi_waveshare_epaper cs_pin: allow_other_uses: true number: ${cs_pin} diff --git a/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml b/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml index 4cb230f6f2..bdd7e1d350 100644 --- a/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml +++ b/tests/components/waveshare_epaper/test.esp32-c3-idf.yaml @@ -1,9 +1,9 @@ substitutions: - clk_pin: GPIO6 - mosi_pin: GPIO7 - cs_pin: GPIO4 + cs_pin: GPIO7 dc_pin: GPIO1 busy_pin: GPIO2 reset_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.esp32-idf.yaml b/tests/components/waveshare_epaper/test.esp32-idf.yaml index 9e8b2fdec8..b7b12c8c66 100644 --- a/tests/components/waveshare_epaper/test.esp32-idf.yaml +++ b/tests/components/waveshare_epaper/test.esp32-idf.yaml @@ -1,9 +1,10 @@ substitutions: - clk_pin: GPIO16 - mosi_pin: GPIO17 cs_pin: GPIO4 dc_pin: GPIO5 - busy_pin: GPIO18 - reset_pin: GPIO19 + busy_pin: GPIO14 + reset_pin: GPIO15 + +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.esp8266-ard.yaml b/tests/components/waveshare_epaper/test.esp8266-ard.yaml index ee8199bcc0..92452c840a 100644 --- a/tests/components/waveshare_epaper/test.esp8266-ard.yaml +++ b/tests/components/waveshare_epaper/test.esp8266-ard.yaml @@ -1,9 +1,12 @@ substitutions: - clk_pin: GPIO14 - mosi_pin: GPIO13 + clk_pin: GPIO0 + mosi_pin: GPIO2 cs_pin: GPIO4 dc_pin: GPIO5 busy_pin: GPIO15 reset_pin: GPIO16 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/waveshare_epaper/test.rp2040-ard.yaml b/tests/components/waveshare_epaper/test.rp2040-ard.yaml index e92f6d421d..e9e001cdd4 100644 --- a/tests/components/waveshare_epaper/test.rp2040-ard.yaml +++ b/tests/components/waveshare_epaper/test.rp2040-ard.yaml @@ -6,4 +6,7 @@ substitutions: busy_pin: GPIO7 reset_pin: GPIO8 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/web_server/test_ota.esp32-idf.yaml b/tests/components/web_server/test_ota.esp32-idf.yaml index 99873aa27b..98b080386b 100644 --- a/tests/components/web_server/test_ota.esp32-idf.yaml +++ b/tests/components/web_server/test_ota.esp32-idf.yaml @@ -12,8 +12,10 @@ packages: # Enable OTA for multipart upload testing ota: - platform: esphome + id: web_server_esphome_ota password: "test_ota_password" - platform: web_server + id: web_server_web_server_ota # Web server configuration web_server: diff --git a/tests/components/wifi_info/test.esp32-c3-idf.yaml b/tests/components/wifi_info/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/wifi_info/test.esp32-c3-idf.yaml +++ b/tests/components/wifi_info/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wifi_info/test.esp32-idf.yaml b/tests/components/wifi_info/test.esp32-idf.yaml index dade44d145..b47e39c389 100644 --- a/tests/components/wifi_info/test.esp32-idf.yaml +++ b/tests/components/wifi_info/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wifi_info/test.esp8266-ard.yaml b/tests/components/wifi_info/test.esp8266-ard.yaml index dade44d145..4a98b9388a 100644 --- a/tests/components/wifi_info/test.esp8266-ard.yaml +++ b/tests/components/wifi_info/test.esp8266-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/wifi_info/test.rp2040-ard.yaml b/tests/components/wifi_info/test.rp2040-ard.yaml index dade44d145..319a7c71a6 100644 --- a/tests/components/wifi_info/test.rp2040-ard.yaml +++ b/tests/components/wifi_info/test.rp2040-ard.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/wireguard/test.esp32-c3-idf.yaml b/tests/components/wireguard/test.esp32-c3-idf.yaml index dade44d145..9990d96d29 100644 --- a/tests/components/wireguard/test.esp32-c3-idf.yaml +++ b/tests/components/wireguard/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wireguard/test.esp32-idf.yaml b/tests/components/wireguard/test.esp32-idf.yaml index 2798f8e566..90dbc1cf7d 100644 --- a/tests/components/wireguard/test.esp32-idf.yaml +++ b/tests/components/wireguard/test.esp32-idf.yaml @@ -1,3 +1,6 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + <<: !include common.yaml network: diff --git a/tests/components/wireguard/test.esp8266-ard.yaml b/tests/components/wireguard/test.esp8266-ard.yaml index 2798f8e566..ae6a3d6ce0 100644 --- a/tests/components/wireguard/test.esp8266-ard.yaml +++ b/tests/components/wireguard/test.esp8266-ard.yaml @@ -1,3 +1,6 @@ +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml + <<: !include common.yaml network: diff --git a/tests/components/wk2132_i2c/common.yaml b/tests/components/wk2132_i2c/common.yaml index 942e01aafc..39013baeb2 100644 --- a/tests/components/wk2132_i2c/common.yaml +++ b/tests/components/wk2132_i2c/common.yaml @@ -1,14 +1,7 @@ -i2c: - id: i2c_bus - scl: ${scl_pin} - sda: ${sda_pin} - scan: true - frequency: 600kHz - wk2132_i2c: - id: wk2132_i2c_id - address: 0x70 i2c_id: i2c_bus + address: 0x70 uart: - id: wk2132_id_0 channel: 0 diff --git a/tests/components/wk2132_i2c/test.esp32-idf.yaml b/tests/components/wk2132_i2c/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/wk2132_i2c/test.esp32-idf.yaml +++ b/tests/components/wk2132_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/wk2132_i2c/test.esp32-s3-idf.yaml b/tests/components/wk2132_i2c/test.esp32-s3-idf.yaml index 4942e3c2b3..e9d826aa7c 100644 --- a/tests/components/wk2132_i2c/test.esp32-s3-idf.yaml +++ b/tests/components/wk2132_i2c/test.esp32-s3-idf.yaml @@ -2,4 +2,7 @@ substitutions: scl_pin: GPIO40 sda_pin: GPIO41 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2132_spi/common.yaml b/tests/components/wk2132_spi/common.yaml index a077b36998..a762c10c92 100644 --- a/tests/components/wk2132_spi/common.yaml +++ b/tests/components/wk2132_spi/common.yaml @@ -1,13 +1,6 @@ -spi: - id: spi_bus - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - wk2132_spi: - id: wk2132_spi_id cs_pin: ${cs_pin} - spi_id: spi_bus crystal: 11059200 data_rate: 1MHz uart: diff --git a/tests/components/wk2132_spi/test.esp32-idf.yaml b/tests/components/wk2132_spi/test.esp32-idf.yaml index 76e7138ab0..a3352cf880 100644 --- a/tests/components/wk2132_spi/test.esp32-idf.yaml +++ b/tests/components/wk2132_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO18 - miso_pin: GPIO19 - mosi_pin: GPIO23 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2132_spi/test.esp32-s3-idf.yaml b/tests/components/wk2132_spi/test.esp32-s3-idf.yaml index b0aadf620a..6a60c90fb2 100644 --- a/tests/components/wk2132_spi/test.esp32-s3-idf.yaml +++ b/tests/components/wk2132_spi/test.esp32-s3-idf.yaml @@ -4,4 +4,7 @@ substitutions: mosi_pin: GPIO6 cs_pin: GPIO19 +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2168_i2c/common.yaml b/tests/components/wk2168_i2c/common.yaml index 10463e8abf..49f0d1ec6b 100644 --- a/tests/components/wk2168_i2c/common.yaml +++ b/tests/components/wk2168_i2c/common.yaml @@ -1,35 +1,28 @@ -i2c: - id: i2c_bus - scl: ${scl_pin} - sda: ${sda_pin} - scan: true - frequency: 600kHz - # component declaration wk2168_i2c: - - id: bridge_i2c + - id: wk2168_i2c_bridge i2c_id: i2c_bus address: 0x70 uart: - - id: id0 + - id: wk2168_i2c_uart0 channel: 0 baud_rate: 115200 stop_bits: 1 parity: none - - id: id1 + - id: wk2168_i2c_uart1 channel: 1 baud_rate: 115200 - - id: id2 + - id: wk2168_i2c_uart2 channel: 2 baud_rate: 115200 - - id: id3 + - id: wk2168_i2c_uart3 channel: 3 baud_rate: 9600 # Ensures a sensor doesn't break validation sensor: - platform: a02yyuw - uart_id: id3 + uart_id: wk2168_i2c_uart3 id: distance_sensor # individual binary_sensor inputs @@ -37,14 +30,14 @@ binary_sensor: - platform: gpio name: "pin_0" pin: - wk2168_i2c: bridge_i2c + wk2168_i2c: wk2168_i2c_bridge number: 0 mode: input: true - platform: gpio name: "pin_1" pin: - wk2168_i2c: bridge_i2c + wk2168_i2c: wk2168_i2c_bridge number: 1 mode: input: true @@ -55,14 +48,14 @@ switch: - platform: gpio name: "pin_2" pin: - wk2168_i2c: bridge_i2c + wk2168_i2c: wk2168_i2c_bridge number: 2 mode: output: true - platform: gpio name: "pin_3" pin: - wk2168_i2c: bridge_i2c + wk2168_i2c: wk2168_i2c_bridge number: 3 mode: output: true diff --git a/tests/components/wk2168_i2c/test.esp32-idf.yaml b/tests/components/wk2168_i2c/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/wk2168_i2c/test.esp32-idf.yaml +++ b/tests/components/wk2168_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/wk2168_i2c/test.esp32-s3-idf.yaml b/tests/components/wk2168_i2c/test.esp32-s3-idf.yaml index 4942e3c2b3..e9d826aa7c 100644 --- a/tests/components/wk2168_i2c/test.esp32-s3-idf.yaml +++ b/tests/components/wk2168_i2c/test.esp32-s3-idf.yaml @@ -2,4 +2,7 @@ substitutions: scl_pin: GPIO40 sda_pin: GPIO41 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2168_spi/common.yaml b/tests/components/wk2168_spi/common.yaml index fb126193fc..b402077aa3 100644 --- a/tests/components/wk2168_spi/common.yaml +++ b/tests/components/wk2168_spi/common.yaml @@ -1,35 +1,28 @@ -spi: - id: spi_bus - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - wk2168_spi: - - id: bridge_spi + - id: wk2168_spi_bridge cs_pin: ${cs_pin} - spi_id: spi_bus crystal: 11059200 data_rate: 1MHz uart: - - id: id0 + - id: wk2168_spi_uart0 channel: 0 baud_rate: 115200 stop_bits: 1 parity: none - - id: id1 + - id: wk2168_spi_uart1 channel: 1 baud_rate: 115200 - - id: id2 + - id: wk2168_spi_uart2 channel: 2 baud_rate: 115200 - - id: id3 + - id: wk2168_spi_uart3 channel: 3 baud_rate: 9600 # Ensures a sensor doesn't break validation sensor: - platform: a02yyuw - uart_id: id3 + uart_id: wk2168_spi_uart3 id: distance_sensor # individual binary_sensor inputs @@ -37,14 +30,14 @@ binary_sensor: - platform: gpio name: "pin_0" pin: - wk2168_spi: bridge_spi + wk2168_spi: wk2168_spi_bridge number: 0 mode: input: true - platform: gpio name: "pin_1" pin: - wk2168_spi: bridge_spi + wk2168_spi: wk2168_spi_bridge number: 1 mode: input: true @@ -55,14 +48,14 @@ switch: - platform: gpio name: "pin_2" pin: - wk2168_spi: bridge_spi + wk2168_spi: wk2168_spi_bridge number: 2 mode: output: true - platform: gpio name: "pin_3" pin: - wk2168_spi: bridge_spi + wk2168_spi: wk2168_spi_bridge number: 3 mode: output: true diff --git a/tests/components/wk2168_spi/test.esp32-idf.yaml b/tests/components/wk2168_spi/test.esp32-idf.yaml index 76e7138ab0..a3352cf880 100644 --- a/tests/components/wk2168_spi/test.esp32-idf.yaml +++ b/tests/components/wk2168_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO18 - miso_pin: GPIO19 - mosi_pin: GPIO23 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2168_spi/test.esp32-s3-idf.yaml b/tests/components/wk2168_spi/test.esp32-s3-idf.yaml index b0aadf620a..6a60c90fb2 100644 --- a/tests/components/wk2168_spi/test.esp32-s3-idf.yaml +++ b/tests/components/wk2168_spi/test.esp32-s3-idf.yaml @@ -4,4 +4,7 @@ substitutions: mosi_pin: GPIO6 cs_pin: GPIO19 +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2204_i2c/common.yaml b/tests/components/wk2204_i2c/common.yaml index 70c0f4babf..863633937b 100644 --- a/tests/components/wk2204_i2c/common.yaml +++ b/tests/components/wk2204_i2c/common.yaml @@ -1,10 +1,3 @@ -i2c: - id: i2c_bus - scl: ${scl_pin} - sda: ${sda_pin} - scan: true - frequency: 600kHz - wk2204_i2c: - id: wk2204_i2c_id i2c_id: i2c_bus diff --git a/tests/components/wk2204_i2c/test.esp32-idf.yaml b/tests/components/wk2204_i2c/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/wk2204_i2c/test.esp32-idf.yaml +++ b/tests/components/wk2204_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/wk2204_i2c/test.esp32-s3-idf.yaml b/tests/components/wk2204_i2c/test.esp32-s3-idf.yaml index 4942e3c2b3..e9d826aa7c 100644 --- a/tests/components/wk2204_i2c/test.esp32-s3-idf.yaml +++ b/tests/components/wk2204_i2c/test.esp32-s3-idf.yaml @@ -2,4 +2,7 @@ substitutions: scl_pin: GPIO40 sda_pin: GPIO41 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2204_spi/common.yaml b/tests/components/wk2204_spi/common.yaml index a08cdb906f..939c54cc40 100644 --- a/tests/components/wk2204_spi/common.yaml +++ b/tests/components/wk2204_spi/common.yaml @@ -1,13 +1,6 @@ -spi: - id: spi_bus - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - wk2204_spi: - id: wk2204_spi_id cs_pin: ${cs_pin} - spi_id: spi_bus crystal: 11059200 data_rate: 1MHz uart: diff --git a/tests/components/wk2204_spi/test.esp32-idf.yaml b/tests/components/wk2204_spi/test.esp32-idf.yaml index 76e7138ab0..a3352cf880 100644 --- a/tests/components/wk2204_spi/test.esp32-idf.yaml +++ b/tests/components/wk2204_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO18 - miso_pin: GPIO19 - mosi_pin: GPIO23 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2204_spi/test.esp32-s3-idf.yaml b/tests/components/wk2204_spi/test.esp32-s3-idf.yaml index b0aadf620a..6a60c90fb2 100644 --- a/tests/components/wk2204_spi/test.esp32-s3-idf.yaml +++ b/tests/components/wk2204_spi/test.esp32-s3-idf.yaml @@ -4,4 +4,7 @@ substitutions: mosi_pin: GPIO6 cs_pin: GPIO19 +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2212_i2c/common.yaml b/tests/components/wk2212_i2c/common.yaml index 0759ef8688..a754bec5c7 100644 --- a/tests/components/wk2212_i2c/common.yaml +++ b/tests/components/wk2212_i2c/common.yaml @@ -1,13 +1,6 @@ -i2c: - id: i2c_bus - scl: ${scl_pin} - sda: ${sda_pin} - scan: true - frequency: 600kHz - # component declaration wk2212_i2c: - - id: bridge_i2c + - id: wk2212_i2c_bridge i2c_id: i2c_bus address: 0x70 uart: @@ -33,14 +26,14 @@ binary_sensor: - platform: gpio name: "pin_0" pin: - wk2212_i2c: bridge_i2c + wk2212_i2c: wk2212_i2c_bridge number: 0 mode: input: true - platform: gpio name: "pin_1" pin: - wk2212_i2c: bridge_i2c + wk2212_i2c: wk2212_i2c_bridge number: 1 mode: input: true @@ -51,14 +44,14 @@ switch: - platform: gpio name: "pin_2" pin: - wk2212_i2c: bridge_i2c + wk2212_i2c: wk2212_i2c_bridge number: 2 mode: output: true - platform: gpio name: "pin_3" pin: - wk2212_i2c: bridge_i2c + wk2212_i2c: wk2212_i2c_bridge number: 3 mode: output: true diff --git a/tests/components/wk2212_i2c/test.esp32-idf.yaml b/tests/components/wk2212_i2c/test.esp32-idf.yaml index 3b761d3fc1..b47e39c389 100644 --- a/tests/components/wk2212_i2c/test.esp32-idf.yaml +++ b/tests/components/wk2212_i2c/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO22 - sda_pin: GPIO21 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/wk2212_i2c/test.esp32-s3-idf.yaml b/tests/components/wk2212_i2c/test.esp32-s3-idf.yaml index 4942e3c2b3..e9d826aa7c 100644 --- a/tests/components/wk2212_i2c/test.esp32-s3-idf.yaml +++ b/tests/components/wk2212_i2c/test.esp32-s3-idf.yaml @@ -2,4 +2,7 @@ substitutions: scl_pin: GPIO40 sda_pin: GPIO41 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2212_spi/common.yaml b/tests/components/wk2212_spi/common.yaml index 693d2a9ab2..969f16bb12 100644 --- a/tests/components/wk2212_spi/common.yaml +++ b/tests/components/wk2212_spi/common.yaml @@ -1,29 +1,22 @@ -spi: - id: spi_bus - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - wk2212_spi: - - id: bridge_spi + - id: wk2212_spi_bridge cs_pin: ${cs_pin} - spi_id: spi_bus crystal: 11059200 data_rate: 1MHz uart: - - id: id0 + - id: wk2212_spi_uart0 channel: 0 baud_rate: 115200 stop_bits: 1 parity: none - - id: id1 + - id: wk2212_spi_uart1 channel: 1 baud_rate: 9600 # Ensures a sensor doesn't break validation sensor: - platform: a02yyuw - uart_id: id1 + uart_id: wk2212_spi_uart1 id: distance_sensor # individual binary_sensor inputs @@ -31,14 +24,14 @@ binary_sensor: - platform: gpio name: "pin_0" pin: - wk2212_spi: bridge_spi + wk2212_spi: wk2212_spi_bridge number: 0 mode: input: true - platform: gpio name: "pin_1" pin: - wk2212_spi: bridge_spi + wk2212_spi: wk2212_spi_bridge number: 1 mode: input: true @@ -49,14 +42,14 @@ switch: - platform: gpio name: "pin_2" pin: - wk2212_spi: bridge_spi + wk2212_spi: wk2212_spi_bridge number: 2 mode: output: true - platform: gpio name: "pin_3" pin: - wk2212_spi: bridge_spi + wk2212_spi: wk2212_spi_bridge number: 3 mode: output: true diff --git a/tests/components/wk2212_spi/test.esp32-idf.yaml b/tests/components/wk2212_spi/test.esp32-idf.yaml index 76e7138ab0..a3352cf880 100644 --- a/tests/components/wk2212_spi/test.esp32-idf.yaml +++ b/tests/components/wk2212_spi/test.esp32-idf.yaml @@ -1,7 +1,7 @@ substitutions: - clk_pin: GPIO18 - miso_pin: GPIO19 - mosi_pin: GPIO23 cs_pin: GPIO5 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wk2212_spi/test.esp32-s3-idf.yaml b/tests/components/wk2212_spi/test.esp32-s3-idf.yaml index b0aadf620a..6a60c90fb2 100644 --- a/tests/components/wk2212_spi/test.esp32-s3-idf.yaml +++ b/tests/components/wk2212_spi/test.esp32-s3-idf.yaml @@ -4,4 +4,7 @@ substitutions: mosi_pin: GPIO6 cs_pin: GPIO19 +packages: + spi: !include ../../test_build_components/common/spi/esp32-s3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/wl_134/common.yaml b/tests/components/wl_134/common.yaml index 71c50be79b..e79331cb52 100644 --- a/tests/components/wl_134/common.yaml +++ b/tests/components/wl_134/common.yaml @@ -1,9 +1,3 @@ -uart: - - id: uart_wl_134 - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 9600 - text_sensor: - platform: wl_134 name: Transponder Code diff --git a/tests/components/wl_134/test.esp32-c3-idf.yaml b/tests/components/wl_134/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/wl_134/test.esp32-c3-idf.yaml +++ b/tests/components/wl_134/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/wl_134/test.esp32-idf.yaml b/tests/components/wl_134/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/wl_134/test.esp32-idf.yaml +++ b/tests/components/wl_134/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/wl_134/test.esp8266-ard.yaml b/tests/components/wl_134/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/wl_134/test.esp8266-ard.yaml +++ b/tests/components/wl_134/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/wl_134/test.rp2040-ard.yaml b/tests/components/wl_134/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/wl_134/test.rp2040-ard.yaml +++ b/tests/components/wl_134/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/wts01/common.yaml b/tests/components/wts01/common.yaml index c26cc3e475..966588c82a 100644 --- a/tests/components/wts01/common.yaml +++ b/tests/components/wts01/common.yaml @@ -1,7 +1,3 @@ -uart: - rx_pin: ${rx_pin} - baud_rate: 9600 - sensor: - platform: wts01 id: wts01_sensor diff --git a/tests/components/wts01/test.esp32-c3-idf.yaml b/tests/components/wts01/test.esp32-c3-idf.yaml index 00cec5b3b8..4b7c8351a7 100644 --- a/tests/components/wts01/test.esp32-c3-idf.yaml +++ b/tests/components/wts01/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO6 - rx_pin: GPIO7 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/wts01/test.esp32-idf.yaml b/tests/components/wts01/test.esp32-idf.yaml index 4904e1f54f..b415125e84 100644 --- a/tests/components/wts01/test.esp32-idf.yaml +++ b/tests/components/wts01/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO16 - rx_pin: GPIO17 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/wts01/test.esp8266-ard.yaml b/tests/components/wts01/test.esp8266-ard.yaml index 3b44f9c9c3..89ca3ab5ae 100644 --- a/tests/components/wts01/test.esp8266-ard.yaml +++ b/tests/components/wts01/test.esp8266-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO1 rx_pin: GPIO3 +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/wts01/test.rp2040-ard.yaml b/tests/components/wts01/test.rp2040-ard.yaml index 16b2a4b006..9246c39f08 100644 --- a/tests/components/wts01/test.rp2040-ard.yaml +++ b/tests/components/wts01/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO0 rx_pin: GPIO1 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/x9c/test.esp32-idf.yaml b/tests/components/x9c/test.esp32-idf.yaml index 6dfe3a67eb..7beb6e67cb 100644 --- a/tests/components/x9c/test.esp32-idf.yaml +++ b/tests/components/x9c/test.esp32-idf.yaml @@ -3,4 +3,7 @@ substitutions: inc_pin: GPIO14 ud_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/x9c/test.esp8266-ard.yaml b/tests/components/x9c/test.esp8266-ard.yaml index 6dfe3a67eb..ae6b775ff7 100644 --- a/tests/components/x9c/test.esp8266-ard.yaml +++ b/tests/components/x9c/test.esp8266-ard.yaml @@ -1,6 +1,9 @@ substitutions: - cs_pin: GPIO13 - inc_pin: GPIO14 + cs_pin: GPIO0 + inc_pin: GPIO2 ud_pin: GPIO15 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/x9c/test.rp2040-ard.yaml b/tests/components/x9c/test.rp2040-ard.yaml index b06e15a98c..f17627baf3 100644 --- a/tests/components/x9c/test.rp2040-ard.yaml +++ b/tests/components/x9c/test.rp2040-ard.yaml @@ -1,6 +1,9 @@ substitutions: - cs_pin: GPIO3 - inc_pin: GPIO4 - ud_pin: GPIO5 + cs_pin: GPIO6 + inc_pin: GPIO7 + ud_pin: GPIO8 + +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/xgzp68xx/common.yaml b/tests/components/xgzp68xx/common.yaml index 224dd9ed14..f76b1de508 100644 --- a/tests/components/xgzp68xx/common.yaml +++ b/tests/components/xgzp68xx/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_xgzp68xx - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: xgzp68xx + i2c_id: i2c_bus k_value: 4096 temperature: name: Pressure Temperature diff --git a/tests/components/xgzp68xx/test.esp32-c3-idf.yaml b/tests/components/xgzp68xx/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/xgzp68xx/test.esp32-c3-idf.yaml +++ b/tests/components/xgzp68xx/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.esp32-idf.yaml b/tests/components/xgzp68xx/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/xgzp68xx/test.esp32-idf.yaml +++ b/tests/components/xgzp68xx/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.esp8266-ard.yaml b/tests/components/xgzp68xx/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/xgzp68xx/test.esp8266-ard.yaml +++ b/tests/components/xgzp68xx/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/xgzp68xx/test.rp2040-ard.yaml b/tests/components/xgzp68xx/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/xgzp68xx/test.rp2040-ard.yaml +++ b/tests/components/xgzp68xx/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml b/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_ble/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_ble/test.esp32-idf.yaml b/tests/components/xiaomi_ble/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_ble/test.esp32-idf.yaml +++ b/tests/components/xiaomi_ble/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgd1/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgd1/test.esp32-idf.yaml b/tests/components/xiaomi_cgd1/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_cgd1/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgd1/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgdk2/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml b/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgdk2/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgg1/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgg1/test.esp32-idf.yaml b/tests/components/xiaomi_cgg1/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_cgg1/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgg1/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml b/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_cgpr1/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml b/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml +++ b/tests/components/xiaomi_cgpr1/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml b/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_gcls002/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_gcls002/test.esp32-idf.yaml b/tests/components/xiaomi_gcls002/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_gcls002/test.esp32-idf.yaml +++ b/tests/components/xiaomi_gcls002/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml b/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_hhccjcy01/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml b/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml +++ b/tests/components/xiaomi_hhccjcy01/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml b/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_hhccpot002/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml b/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml +++ b/tests/components/xiaomi_hhccpot002/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml b/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_jqjcy01ym/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml b/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml +++ b/tests/components/xiaomi_jqjcy01ym/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsd02/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml b/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsd02/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02mmc/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsd02mmc/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_lywsd02mmc/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsd02mmc/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd02mmc/test.esp32-idf.yaml b/tests/components/xiaomi_lywsd02mmc/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_lywsd02mmc/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsd02mmc/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsd03mmc/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml b/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsd03mmc/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml b/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_lywsdcgq/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml b/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml +++ b/tests/components/xiaomi_lywsdcgq/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mhoc303/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml b/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mhoc303/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mhoc401/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml b/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mhoc401/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/common.yaml b/tests/components/xiaomi_miscale copy/common.yaml deleted file mode 100644 index 89f32ad199..0000000000 --- a/tests/components/xiaomi_miscale copy/common.yaml +++ /dev/null @@ -1,9 +0,0 @@ -esp32_ble_tracker: - -sensor: - - platform: xiaomi_miscale - mac_address: '5C:CA:D3:70:D4:A2' - weight: - name: "Xiaomi Mi Scale Weight" - impedance: - name: "Xiaomi Mi Scale Impedance" diff --git a/tests/components/xiaomi_miscale copy/test.esp32-ard.yaml b/tests/components/xiaomi_miscale copy/test.esp32-ard.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/xiaomi_miscale copy/test.esp32-ard.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/test.esp32-c3-ard.yaml b/tests/components/xiaomi_miscale copy/test.esp32-c3-ard.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/xiaomi_miscale copy/test.esp32-c3-ard.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml b/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/xiaomi_miscale copy/test.esp32-c3-idf.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml b/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml deleted file mode 100644 index dade44d145..0000000000 --- a/tests/components/xiaomi_miscale copy/test.esp32-idf.yaml +++ /dev/null @@ -1 +0,0 @@ -<<: !include common.yaml diff --git a/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml b/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_miscale/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_miscale/test.esp32-idf.yaml b/tests/components/xiaomi_miscale/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_miscale/test.esp32-idf.yaml +++ b/tests/components/xiaomi_miscale/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mjyd02yla/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml b/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mjyd02yla/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml b/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_mue4094rt/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml b/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml +++ b/tests/components/xiaomi_mue4094rt/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml b/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_rtcgq02lm/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml b/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml +++ b/tests/components/xiaomi_rtcgq02lm/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml b/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_wx08zm/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml b/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml +++ b/tests/components/xiaomi_wx08zm/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_xmwsdj04mmc/test.esp32-c3-idf.yaml b/tests/components/xiaomi_xmwsdj04mmc/test.esp32-c3-idf.yaml index dade44d145..9f2634f967 100644 --- a/tests/components/xiaomi_xmwsdj04mmc/test.esp32-c3-idf.yaml +++ b/tests/components/xiaomi_xmwsdj04mmc/test.esp32-c3-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-c3-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xiaomi_xmwsdj04mmc/test.esp32-idf.yaml b/tests/components/xiaomi_xmwsdj04mmc/test.esp32-idf.yaml index dade44d145..7a6541ae76 100644 --- a/tests/components/xiaomi_xmwsdj04mmc/test.esp32-idf.yaml +++ b/tests/components/xiaomi_xmwsdj04mmc/test.esp32-idf.yaml @@ -1 +1,4 @@ +packages: + ble: !include ../../test_build_components/common/ble/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xl9535/common.yaml b/tests/components/xl9535/common.yaml index e01163cf12..81e96131ab 100644 --- a/tests/components/xl9535/common.yaml +++ b/tests/components/xl9535/common.yaml @@ -1,10 +1,6 @@ -i2c: - - id: i2c_xl9535 - scl: ${scl_pin} - sda: ${sda_pin} - xl9535: - id: xl9535_hub + i2c_id: i2c_bus address: 0x20 binary_sensor: diff --git a/tests/components/xl9535/test.esp32-c3-idf.yaml b/tests/components/xl9535/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/xl9535/test.esp32-c3-idf.yaml +++ b/tests/components/xl9535/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/xl9535/test.esp32-idf.yaml b/tests/components/xl9535/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/xl9535/test.esp32-idf.yaml +++ b/tests/components/xl9535/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/xl9535/test.esp8266-ard.yaml b/tests/components/xl9535/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/xl9535/test.esp8266-ard.yaml +++ b/tests/components/xl9535/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/xl9535/test.rp2040-ard.yaml b/tests/components/xl9535/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/xl9535/test.rp2040-ard.yaml +++ b/tests/components/xl9535/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/xpt2046/common.yaml b/tests/components/xpt2046/common.yaml index 9ef680cff4..3a8e3286a6 100644 --- a/tests/components/xpt2046/common.yaml +++ b/tests/components/xpt2046/common.yaml @@ -1,9 +1,3 @@ -spi: - - id: spi_xpt2046 - clk_pin: ${clk_pin} - mosi_pin: ${mosi_pin} - miso_pin: ${miso_pin} - display: - platform: ili9xxx id: xpt_display diff --git a/tests/components/xpt2046/test.esp32-c3-idf.yaml b/tests/components/xpt2046/test.esp32-c3-idf.yaml index 79b84902ac..ff7a32c26c 100644 --- a/tests/components/xpt2046/test.esp32-c3-idf.yaml +++ b/tests/components/xpt2046/test.esp32-c3-idf.yaml @@ -1,11 +1,10 @@ substitutions: - clk_pin: GPIO4 - mosi_pin: GPIO5 - miso_pin: GPIO6 dc_pin: GPIO7 cs_pin: GPIO0 disp_cs_pin: GPIO1 interrupt_pin: GPIO3 reset_pin: GPIO10 +packages: + spi: !include ../../test_build_components/common/spi/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/xpt2046/test.esp32-idf.yaml b/tests/components/xpt2046/test.esp32-idf.yaml index b39174947b..608e135d74 100644 --- a/tests/components/xpt2046/test.esp32-idf.yaml +++ b/tests/components/xpt2046/test.esp32-idf.yaml @@ -1,11 +1,11 @@ substitutions: - clk_pin: GPIO17 - mosi_pin: GPIO18 - miso_pin: GPIO19 dc_pin: GPIO13 cs_pin: GPIO14 disp_cs_pin: GPIO4 interrupt_pin: GPIO21 reset_pin: GPIO22 +packages: + spi: !include ../../test_build_components/common/spi/esp32-idf.yaml + <<: !include common.yaml diff --git a/tests/components/xpt2046/test.esp8266-ard.yaml b/tests/components/xpt2046/test.esp8266-ard.yaml index 246c5c8953..e2779a03b9 100644 --- a/tests/components/xpt2046/test.esp8266-ard.yaml +++ b/tests/components/xpt2046/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clk_pin: GPIO14 + clk_pin: GPIO0 mosi_pin: GPIO13 miso_pin: GPIO12 dc_pin: GPIO15 @@ -8,4 +8,7 @@ substitutions: interrupt_pin: GPIO5 reset_pin: GPIO2 +packages: + spi: !include ../../test_build_components/common/spi/esp8266-ard.yaml + <<: !include common.yaml diff --git a/tests/components/xpt2046/test.rp2040-ard.yaml b/tests/components/xpt2046/test.rp2040-ard.yaml index e693b363d9..c547bdc0c9 100644 --- a/tests/components/xpt2046/test.rp2040-ard.yaml +++ b/tests/components/xpt2046/test.rp2040-ard.yaml @@ -8,4 +8,7 @@ substitutions: interrupt_pin: GPIO2 reset_pin: GPIO3 +packages: + spi: !include ../../test_build_components/common/spi/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/common.yaml b/tests/components/zio_ultrasonic/common.yaml index e13853d8f1..34a3144db9 100644 --- a/tests/components/zio_ultrasonic/common.yaml +++ b/tests/components/zio_ultrasonic/common.yaml @@ -1,9 +1,5 @@ -i2c: - - id: i2c_zio_ultrasonic - scl: ${scl_pin} - sda: ${sda_pin} - sensor: - platform: zio_ultrasonic + i2c_id: i2c_bus name: "Distance" update_interval: 60s diff --git a/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml b/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml index ee2c29ca4e..9990d96d29 100644 --- a/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml +++ b/tests/components/zio_ultrasonic/test.esp32-c3-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.esp32-idf.yaml b/tests/components/zio_ultrasonic/test.esp32-idf.yaml index 63c3bd6afd..b47e39c389 100644 --- a/tests/components/zio_ultrasonic/test.esp32-idf.yaml +++ b/tests/components/zio_ultrasonic/test.esp32-idf.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO16 - sda_pin: GPIO17 +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.esp8266-ard.yaml b/tests/components/zio_ultrasonic/test.esp8266-ard.yaml index ee2c29ca4e..4a98b9388a 100644 --- a/tests/components/zio_ultrasonic/test.esp8266-ard.yaml +++ b/tests/components/zio_ultrasonic/test.esp8266-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/zio_ultrasonic/test.rp2040-ard.yaml b/tests/components/zio_ultrasonic/test.rp2040-ard.yaml index ee2c29ca4e..319a7c71a6 100644 --- a/tests/components/zio_ultrasonic/test.rp2040-ard.yaml +++ b/tests/components/zio_ultrasonic/test.rp2040-ard.yaml @@ -1,5 +1,4 @@ -substitutions: - scl_pin: GPIO5 - sda_pin: GPIO4 +packages: + i2c: !include ../../test_build_components/common/i2c/rp2040-ard.yaml <<: !include common.yaml diff --git a/tests/components/zwave_proxy/common.yaml b/tests/components/zwave_proxy/common.yaml index 08092ebe55..097e4b43a5 100644 --- a/tests/components/zwave_proxy/common.yaml +++ b/tests/components/zwave_proxy/common.yaml @@ -3,12 +3,6 @@ wifi: password: password1 power_save_mode: none -uart: - - id: uart_zwave_proxy - tx_pin: ${tx_pin} - rx_pin: ${rx_pin} - baud_rate: 115200 - api: zwave_proxy: diff --git a/tests/components/zwave_proxy/test.esp32-c3-idf.yaml b/tests/components/zwave_proxy/test.esp32-c3-idf.yaml index b516342f3b..4b7c8351a7 100644 --- a/tests/components/zwave_proxy/test.esp32-c3-idf.yaml +++ b/tests/components/zwave_proxy/test.esp32-c3-idf.yaml @@ -1,5 +1,5 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/esp32-c3-idf.yaml <<: !include common.yaml diff --git a/tests/components/zwave_proxy/test.esp32-idf.yaml b/tests/components/zwave_proxy/test.esp32-idf.yaml index f486544afa..b415125e84 100644 --- a/tests/components/zwave_proxy/test.esp32-idf.yaml +++ b/tests/components/zwave_proxy/test.esp32-idf.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO17 - rx_pin: GPIO16 + tx_pin: GPIO4 + rx_pin: GPIO5 + +packages: + uart: !include ../../test_build_components/common/uart/esp32-idf.yaml <<: !include common.yaml diff --git a/tests/components/zwave_proxy/test.esp8266-ard.yaml b/tests/components/zwave_proxy/test.esp8266-ard.yaml index b516342f3b..96ab4ef6ac 100644 --- a/tests/components/zwave_proxy/test.esp8266-ard.yaml +++ b/tests/components/zwave_proxy/test.esp8266-ard.yaml @@ -1,5 +1,8 @@ substitutions: - tx_pin: GPIO4 - rx_pin: GPIO5 + tx_pin: GPIO0 + rx_pin: GPIO2 + +packages: + uart: !include ../../test_build_components/common/uart/esp8266-ard.yaml <<: !include common.yaml diff --git a/tests/components/zwave_proxy/test.rp2040-ard.yaml b/tests/components/zwave_proxy/test.rp2040-ard.yaml index b516342f3b..b28f2b5e05 100644 --- a/tests/components/zwave_proxy/test.rp2040-ard.yaml +++ b/tests/components/zwave_proxy/test.rp2040-ard.yaml @@ -2,4 +2,7 @@ substitutions: tx_pin: GPIO4 rx_pin: GPIO5 +packages: + uart: !include ../../test_build_components/common/uart/rp2040-ard.yaml + <<: !include common.yaml diff --git a/tests/components/zyaura/test.esp32-idf.yaml b/tests/components/zyaura/test.esp32-idf.yaml index d295973e3f..a4ecdb6c49 100644 --- a/tests/components/zyaura/test.esp32-idf.yaml +++ b/tests/components/zyaura/test.esp32-idf.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO16 - data_pin: GPIO17 + clock_pin: GPIO4 + data_pin: GPIO5 <<: !include common.yaml diff --git a/tests/components/zyaura/test.esp8266-ard.yaml b/tests/components/zyaura/test.esp8266-ard.yaml index 7808481215..7c7f1e1a11 100644 --- a/tests/components/zyaura/test.esp8266-ard.yaml +++ b/tests/components/zyaura/test.esp8266-ard.yaml @@ -1,5 +1,5 @@ substitutions: - clock_pin: GPIO5 - data_pin: GPIO4 + clock_pin: GPIO0 + data_pin: GPIO2 <<: !include common.yaml diff --git a/tests/test_build_components/build_components_base.bk72xx-ard.yaml b/tests/test_build_components/build_components_base.bk72xx-ard.yaml index 9a4e15d5cf..817acc3c39 100644 --- a/tests/test_build_components/build_components_base.bk72xx-ard.yaml +++ b/tests/test_build_components/build_components_base.bk72xx-ard.yaml @@ -3,7 +3,7 @@ esphome: friendly_name: $component_name bk72xx: - board: generic-bk7231n-qfn32-tuya + board: generic-bk7252 logger: level: VERY_VERBOSE diff --git a/tests/test_build_components/common/README.md b/tests/test_build_components/common/README.md new file mode 100644 index 0000000000..76f14b8664 --- /dev/null +++ b/tests/test_build_components/common/README.md @@ -0,0 +1,248 @@ +# Common Bus Configurations for Component Tests + +This directory contains standardized bus configurations (I2C, SPI, UART, Modbus, BLE) that component tests use, enabling multiple components to be tested together with intelligent grouping. + +## Purpose + +These common configs allow multiple components to **share a single bus**, dramatically reducing CI time by compiling multiple compatible components together. Components with identical bus configurations are automatically grouped and tested together. + +## Structure + +``` +common/ +├── i2c/ # Standard I2C (50kHz) +│ ├── esp32-idf.yaml +│ ├── esp32-ard.yaml +│ ├── esp32-c3-idf.yaml +│ ├── esp32-c3-ard.yaml +│ ├── esp32-s2-idf.yaml +│ ├── esp32-s2-ard.yaml +│ ├── esp32-s3-idf.yaml +│ ├── esp32-s3-ard.yaml +│ ├── esp8266-ard.yaml +│ ├── rp2040-ard.yaml +│ └── bk72xx-ard.yaml +├── i2c_low_freq/ # Low frequency I2C (10kHz) +│ └── (same platform variants) +├── spi/ +│ └── (same platform variants) +├── uart/ +│ ├── esp32-idf.yaml +│ ├── esp32-c3-idf.yaml +│ ├── esp8266-ard.yaml +│ └── rp2040-ard.yaml +├── modbus/ # Modbus (includes uart via packages) +│ ├── esp32-idf.yaml +│ ├── esp32-c3-idf.yaml +│ ├── esp8266-ard.yaml +│ └── rp2040-ard.yaml +└── ble/ + ├── esp32-idf.yaml + ├── esp32-ard.yaml + └── esp32-c3-idf.yaml +``` + +## How It Works + +### Component Test Structure +Each component test includes the common bus config: + +```yaml +# tests/components/bh1750/test.esp32-idf.yaml +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + +<<: !include common.yaml +``` + +The common config provides: +- Standardized pin assignments +- A shared bus instance (`i2c_bus`, `spi_bus`, `uart_bus`, `modbus_bus`, etc.) + +The component's `common.yaml` references the shared bus: +```yaml +# tests/components/bh1750/common.yaml +sensor: + - platform: bh1750 + i2c_id: i2c_bus + name: Living Room Brightness + address: 0x23 +``` + +### Intelligent Grouping (Implemented) +Components with identical bus configurations are automatically grouped and tested together: + +```yaml +# Auto-generated merged config (created by test_build_components.py) +packages: + i2c: !include ../../test_build_components/common/i2c/esp32-idf.yaml + +sensor: + - platform: bme280_i2c + i2c_id: i2c_bus + temperature: + name: BME280 Temperature + - platform: bh1750 + i2c_id: i2c_bus + name: BH1750 Illuminance + - platform: sht3xd + i2c_id: i2c_bus + temperature: + name: SHT3xD Temperature +``` + +**Result**: 3 components compile in one test instead of 3 separate tests! + +### Package Dependencies +Some packages include other packages to avoid duplication: + +```yaml +# tests/test_build_components/common/modbus/esp32-idf.yaml +packages: + uart: !include ../uart/esp32-idf.yaml # Modbus requires UART + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} +``` + +Components using `modbus` packages automatically get `uart` as well. + +## Pin Allocations + +### I2C (Standard - 50kHz) +- **ESP32 IDF**: SCL=GPIO16, SDA=GPIO17 +- **ESP32 Arduino**: SCL=GPIO22, SDA=GPIO21 +- **ESP32-C3**: SCL=GPIO5, SDA=GPIO4 +- **ESP32-S2/S3**: SCL=GPIO9, SDA=GPIO8 +- **ESP8266**: SCL=GPIO5, SDA=GPIO4 +- **RP2040**: SCL=GPIO5, SDA=GPIO4 +- **BK72xx**: SCL=P20, SDA=P21 + +### I2C Low Frequency (10kHz) +Same pin allocations as standard I2C, but with 10kHz frequency for components requiring slower speeds. + +### SPI +- **ESP32**: CLK=GPIO18, MOSI=GPIO23, MISO=GPIO19 +- **ESP32-C3**: CLK=GPIO6, MOSI=GPIO7, MISO=GPIO5 +- **ESP32-S2**: CLK=GPIO36, MOSI=GPIO35, MISO=GPIO37 +- **ESP32-S3**: CLK=GPIO40, MOSI=GPIO6, MISO=GPIO41 +- **ESP8266**: CLK=GPIO14, MOSI=GPIO13, MISO=GPIO12 +- **RP2040**: CLK=GPIO18, MOSI=GPIO19, MISO=GPIO16 +- CS pins are component-specific (each SPI device needs unique CS) + +### UART +- **ESP32 IDF**: TX=GPIO17, RX=GPIO16 (baud: 19200) +- **ESP32-C3 IDF**: TX=GPIO7, RX=GPIO6 (baud: 19200) +- **ESP8266**: TX=GPIO1, RX=GPIO3 (baud: 19200) +- **RP2040**: TX=GPIO0, RX=GPIO1 (baud: 19200) + +### Modbus (includes UART) +Same UART pins as above, plus: +- **flow_control_pin**: GPIO4 (all platforms) + +### BLE +- **ESP32**: Shared `esp32_ble_tracker` infrastructure +- Each component defines unique `ble_client` with different MAC addresses + +## Benefits + +1. **Shared bus = less duplication** + - 200+ I2C components use common bus configs + - 60+ SPI components use common bus configs + - 80+ UART components use common bus configs + - 6 Modbus components use common modbus configs (which include UART) + +2. **Intelligent grouping reduces CI time** + - Components with identical bus configs are automatically grouped + - Typical reduction: 80-90% fewer builds + - Example: 3 I2C components → 1 merged build (saves 2 builds) + - CI runs 5 component batches in parallel (configurable via `max-parallel` in `.github/workflows/ci.yml`) + +3. **Easier maintenance** + - Change bus pins for a platform once, affects all component tests + - Consistent pin assignments across all components + - Centralized bus configuration + +## Component Compatibility + +### Groupable Components +Components are automatically grouped when they have: +- Identical bus package references (e.g., all use `i2c/esp32-idf.yaml`) +- No local file references (`$component_dir`) +- No `!extend` or `!remove` directives +- Proper bus ID references (`i2c_id: i2c_bus`, `spi_id: spi_bus`, etc.) + +### Non-Groupable Components +Components tested individually when they: +- Use different bus frequencies (e.g., `i2c` vs `i2c_low_freq`) +- Reference local files with `$component_dir` +- Are platform components (abstract base classes with `IS_PLATFORM_COMPONENT = True`) +- Define buses directly (not migrated to packages yet) +- Are in `ISOLATED_COMPONENTS` list (known build conflicts) + +### Bus Variants +- **i2c** (50kHz): Standard I2C frequency for most sensors +- **i2c_low_freq** (10kHz): For sensors requiring slower I2C speeds +- **modbus**: Includes UART via package dependencies + +### Making Components Groupable + +**WARNING**: Using `!extend` or `!remove` directives in component test files prevents automatic component grouping in CI, making builds slower. + +When platform-specific parameters are needed, inline the full configuration rather than using `!extend` or `!remove`. This allows the component to be grouped with other compatible components, reducing CI build time. + +**Note**: Some components legitimately require `!extend` or `!remove` for platform-specific features (e.g., `adc` removing ESP32-only `attenuation` parameter on ESP8266). These are correctly identified as non-groupable. + +## Testing Components + +### Testing Individual Components +Test specific components using `test_build_components`: +```bash +# Test a single component +./script/test_build_components -c bme280_i2c -t esp32-idf -e config + +# Test multiple components +./script/test_build_components -c bme280_i2c,bh1750,sht3xd -t esp32-idf -e compile +``` + +### Testing All Components Together +To verify that all components can be tested together without ID conflicts or configuration issues: +```bash +./script/test_component_grouping.py -e config --all +``` + +This tests all components in a single build to catch conflicts that might not appear when testing components individually. This is useful for: +- Detecting ID conflicts between components +- Validating that components can coexist in the same configuration +- Ensuring proper `i2c_id`, `spi_id`, `uart_id` specifications + +Use `-e config` for fast configuration validation, or `-e compile` for full compilation testing. + +### Testing Component Groups +Test specific groups of components by bus signature: +```bash +# Test all I2C components together +./script/test_component_grouping.py -s i2c -e config + +# Test with custom group sizes +./script/test_component_grouping.py --min-size 5 --max-size 20 --max-groups 3 +``` + +## Implementation Details + +### Scripts +- `script/analyze_component_buses.py`: Analyzes components to detect bus usage and grouping compatibility +- `script/merge_component_configs.py`: Merges multiple component configs into a single test file +- `script/test_build_components.py`: Main test runner with intelligent grouping +- `script/test_component_grouping.py`: Test component groups or all components together +- `script/split_components_for_ci.py`: Splits components into batches for parallel CI execution + +### Configuration +- `.github/workflows/ci.yml`: CI workflow with `max-parallel: 5` for component testing +- Package dependencies defined in `PACKAGE_DEPENDENCIES` (e.g., modbus → uart) +- Base bus components excluded from migration warnings: `i2c`, `spi`, `uart`, `modbus`, `canbus` diff --git a/tests/test_build_components/common/ble/esp32-ard.yaml b/tests/test_build_components/common/ble/esp32-ard.yaml new file mode 100644 index 0000000000..e1b5aec694 --- /dev/null +++ b/tests/test_build_components/common/ble/esp32-ard.yaml @@ -0,0 +1,9 @@ +# Common BLE tracker configuration for ESP32 Arduino tests +# BLE client components share this tracker infrastructure +# Each component defines its own ble_client with unique MAC address + +esp32_ble_tracker: + scan_parameters: + interval: 1100ms + window: 1100ms + active: true diff --git a/tests/test_build_components/common/ble/esp32-c3-idf.yaml b/tests/test_build_components/common/ble/esp32-c3-idf.yaml new file mode 100644 index 0000000000..6671722f21 --- /dev/null +++ b/tests/test_build_components/common/ble/esp32-c3-idf.yaml @@ -0,0 +1,9 @@ +# Common BLE tracker configuration for ESP32-C3 IDF tests +# BLE client components share this tracker infrastructure +# Each component defines its own ble_client with unique MAC address + +esp32_ble_tracker: + scan_parameters: + interval: 1100ms + window: 1100ms + active: true diff --git a/tests/test_build_components/common/ble/esp32-idf.yaml b/tests/test_build_components/common/ble/esp32-idf.yaml new file mode 100644 index 0000000000..7cdcea71f0 --- /dev/null +++ b/tests/test_build_components/common/ble/esp32-idf.yaml @@ -0,0 +1,9 @@ +# Common BLE tracker configuration for ESP32 IDF tests +# BLE client components share this tracker infrastructure +# Each component defines its own ble_client with unique MAC address + +esp32_ble_tracker: + scan_parameters: + interval: 1100ms + window: 1100ms + active: true diff --git a/tests/test_build_components/common/camera/esp32-idf.yaml b/tests/test_build_components/common/camera/esp32-idf.yaml new file mode 100644 index 0000000000..64f75c699a --- /dev/null +++ b/tests/test_build_components/common/camera/esp32-idf.yaml @@ -0,0 +1,29 @@ +esp32_camera: + name: ESP32 Camera + data_pins: + - number: 17 + - number: 35 + - number: 34 + - number: 5 + - number: 39 + - number: 18 + - number: 36 + - number: 19 + vsync_pin: 22 + href_pin: 26 + pixel_clock_pin: 21 + external_clock: + pin: 27 + frequency: 20MHz + i2c_pins: + sda: 25 + scl: 23 + reset_pin: 15 + power_down_pin: 1 + resolution: 640x480 + jpeg_quality: 10 + frame_buffer_location: PSRAM + on_image: + then: + - lambda: |- + ESP_LOGD("main", "image len=%d, data=%c", image.length, image.data[0]); diff --git a/tests/test_build_components/common/i2c/bk72xx-ard.yaml b/tests/test_build_components/common/i2c/bk72xx-ard.yaml new file mode 100644 index 0000000000..7d00546721 --- /dev/null +++ b/tests/test_build_components/common/i2c/bk72xx-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for BK72XX Arduino tests + +substitutions: + scl_pin: P26 + sda_pin: P24 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-ard.yaml b/tests/test_build_components/common/i2c/esp32-ard.yaml new file mode 100644 index 0000000000..fff09ab85c --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32 Arduino tests + +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-c3-ard.yaml b/tests/test_build_components/common/i2c/esp32-c3-ard.yaml new file mode 100644 index 0000000000..0216dccbfa --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32-C3 Arduino tests + +substitutions: + scl_pin: GPIO8 + sda_pin: GPIO10 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-c3-idf.yaml b/tests/test_build_components/common/i2c/esp32-c3-idf.yaml new file mode 100644 index 0000000000..fd873b6db8 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-c3-idf.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32-C3 IDF tests + +substitutions: + scl_pin: GPIO8 + sda_pin: GPIO10 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-idf.yaml b/tests/test_build_components/common/i2c/esp32-idf.yaml new file mode 100644 index 0000000000..bb2376e7d6 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-idf.yaml @@ -0,0 +1,13 @@ +# Common I2C configuration for ESP32 IDF tests +# Provides a shared I2C bus that all components can use +# Components will auto-use this bus if they don't specify i2c_id + +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-p4-idf.yaml b/tests/test_build_components/common/i2c/esp32-p4-idf.yaml new file mode 100644 index 0000000000..0c7d7e3414 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-p4-idf.yaml @@ -0,0 +1,13 @@ +# Common I2C configuration for ESP32-P4 IDF tests +# Provides a shared I2C bus that all components can use +# Components will auto-use this bus if they don't specify i2c_id + +substitutions: + scl_pin: GPIO8 + sda_pin: GPIO7 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-s2-ard.yaml b/tests/test_build_components/common/i2c/esp32-s2-ard.yaml new file mode 100644 index 0000000000..d8201db042 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-s2-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32-S2 Arduino tests + +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-s2-idf.yaml b/tests/test_build_components/common/i2c/esp32-s2-idf.yaml new file mode 100644 index 0000000000..f23f7e35cc --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-s2-idf.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32-S2 IDF tests + +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-s3-ard.yaml b/tests/test_build_components/common/i2c/esp32-s3-ard.yaml new file mode 100644 index 0000000000..3499770cb7 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-s3-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32-S3 Arduino tests + +substitutions: + scl_pin: GPIO9 + sda_pin: GPIO8 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp32-s3-idf.yaml b/tests/test_build_components/common/i2c/esp32-s3-idf.yaml new file mode 100644 index 0000000000..9f5b002eb3 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp32-s3-idf.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP32-S3 IDF tests + +substitutions: + scl_pin: GPIO9 + sda_pin: GPIO8 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/esp8266-ard.yaml b/tests/test_build_components/common/i2c/esp8266-ard.yaml new file mode 100644 index 0000000000..6aa28524b2 --- /dev/null +++ b/tests/test_build_components/common/i2c/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for ESP8266 Arduino tests + +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c/rp2040-ard.yaml b/tests/test_build_components/common/i2c/rp2040-ard.yaml new file mode 100644 index 0000000000..cb241aef76 --- /dev/null +++ b/tests/test_build_components/common/i2c/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common I2C configuration for RP2040 Arduino tests + +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + scan: true diff --git a/tests/test_build_components/common/i2c_low_freq/esp32-ard.yaml b/tests/test_build_components/common/i2c_low_freq/esp32-ard.yaml new file mode 100644 index 0000000000..53d051f174 --- /dev/null +++ b/tests/test_build_components/common/i2c_low_freq/esp32-ard.yaml @@ -0,0 +1,12 @@ +# Common I2C configuration for ESP32 Arduino tests - Low Frequency (10kHz) + +substitutions: + scl_pin: GPIO22 + sda_pin: GPIO21 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + scan: true diff --git a/tests/test_build_components/common/i2c_low_freq/esp32-c3-ard.yaml b/tests/test_build_components/common/i2c_low_freq/esp32-c3-ard.yaml new file mode 100644 index 0000000000..c9856c6b29 --- /dev/null +++ b/tests/test_build_components/common/i2c_low_freq/esp32-c3-ard.yaml @@ -0,0 +1,12 @@ +# Common I2C configuration for ESP32-C3 Arduino tests - Low Frequency (10kHz) + +substitutions: + scl_pin: GPIO6 + sda_pin: GPIO5 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + scan: true diff --git a/tests/test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml b/tests/test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml new file mode 100644 index 0000000000..e9d44b585e --- /dev/null +++ b/tests/test_build_components/common/i2c_low_freq/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common I2C configuration for ESP32-C3 IDF tests - Low Frequency (10kHz) + +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + scan: true diff --git a/tests/test_build_components/common/i2c_low_freq/esp32-idf.yaml b/tests/test_build_components/common/i2c_low_freq/esp32-idf.yaml new file mode 100644 index 0000000000..4afe220315 --- /dev/null +++ b/tests/test_build_components/common/i2c_low_freq/esp32-idf.yaml @@ -0,0 +1,13 @@ +# Common I2C configuration for ESP32 IDF tests - Low Frequency (10kHz) +# For components that require I2C frequency <= 15kHz (ags10, ltr501, ltr_als_ps) + +substitutions: + scl_pin: GPIO16 + sda_pin: GPIO17 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + scan: true diff --git a/tests/test_build_components/common/i2c_low_freq/esp8266-ard.yaml b/tests/test_build_components/common/i2c_low_freq/esp8266-ard.yaml new file mode 100644 index 0000000000..281177ebbd --- /dev/null +++ b/tests/test_build_components/common/i2c_low_freq/esp8266-ard.yaml @@ -0,0 +1,12 @@ +# Common I2C configuration for ESP8266 Arduino tests - Low Frequency (10kHz) + +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + scan: true diff --git a/tests/test_build_components/common/i2c_low_freq/rp2040-ard.yaml b/tests/test_build_components/common/i2c_low_freq/rp2040-ard.yaml new file mode 100644 index 0000000000..67d893e733 --- /dev/null +++ b/tests/test_build_components/common/i2c_low_freq/rp2040-ard.yaml @@ -0,0 +1,12 @@ +# Common I2C configuration for RP2040 Arduino tests - Low Frequency (10kHz) + +substitutions: + scl_pin: GPIO5 + sda_pin: GPIO4 + +i2c: + - id: i2c_bus + scl: ${scl_pin} + sda: ${sda_pin} + frequency: 10kHz + scan: true diff --git a/tests/test_build_components/common/modbus/bk72xx-ard.yaml b/tests/test_build_components/common/modbus/bk72xx-ard.yaml new file mode 100644 index 0000000000..c428f0a7be --- /dev/null +++ b/tests/test_build_components/common/modbus/bk72xx-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for BK72XX Arduino tests + +packages: + uart: !include ../uart/bk72xx-ard.yaml + +substitutions: + flow_control_pin: P6 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-ard.yaml b/tests/test_build_components/common/modbus/esp32-ard.yaml new file mode 100644 index 0000000000..f327cf266e --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32 Arduino tests + +packages: + uart: !include ../uart/esp32-ard.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-c3-ard.yaml b/tests/test_build_components/common/modbus/esp32-c3-ard.yaml new file mode 100644 index 0000000000..f12e5518c0 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-c3-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32-C3 Arduino tests + +packages: + uart: !include ../uart/esp32-c3-ard.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-c3-idf.yaml b/tests/test_build_components/common/modbus/esp32-c3-idf.yaml new file mode 100644 index 0000000000..98fc11b0b7 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32-C3 IDF tests + +packages: + uart: !include ../uart/esp32-c3-idf.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-idf.yaml b/tests/test_build_components/common/modbus/esp32-idf.yaml new file mode 100644 index 0000000000..c2d777c3d7 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-idf.yaml @@ -0,0 +1,13 @@ +# Common Modbus configuration for ESP32 IDF tests +# Provides a shared Modbus bus that all components can use + +packages: + uart: !include ../uart/esp32-idf.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-s2-ard.yaml b/tests/test_build_components/common/modbus/esp32-s2-ard.yaml new file mode 100644 index 0000000000..a47036f379 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-s2-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32-S2 Arduino tests + +packages: + uart: !include ../uart/esp32-s2-ard.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-s2-idf.yaml b/tests/test_build_components/common/modbus/esp32-s2-idf.yaml new file mode 100644 index 0000000000..2cac82aa15 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-s2-idf.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32-S2 IDF tests + +packages: + uart: !include ../uart/esp32-s2-idf.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-s3-ard.yaml b/tests/test_build_components/common/modbus/esp32-s3-ard.yaml new file mode 100644 index 0000000000..3031f57159 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-s3-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32-S3 Arduino tests + +packages: + uart: !include ../uart/esp32-s3-ard.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp32-s3-idf.yaml b/tests/test_build_components/common/modbus/esp32-s3-idf.yaml new file mode 100644 index 0000000000..0a0d4dbd07 --- /dev/null +++ b/tests/test_build_components/common/modbus/esp32-s3-idf.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP32-S3 IDF tests + +packages: + uart: !include ../uart/esp32-s3-idf.yaml + +substitutions: + flow_control_pin: GPIO4 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/esp8266-ard.yaml b/tests/test_build_components/common/modbus/esp8266-ard.yaml new file mode 100644 index 0000000000..fce4c6df1d --- /dev/null +++ b/tests/test_build_components/common/modbus/esp8266-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for ESP8266 Arduino tests + +packages: + uart: !include ../uart/esp8266-ard.yaml + +substitutions: + flow_control_pin: GPIO5 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/modbus/rp2040-ard.yaml b/tests/test_build_components/common/modbus/rp2040-ard.yaml new file mode 100644 index 0000000000..264ad8944f --- /dev/null +++ b/tests/test_build_components/common/modbus/rp2040-ard.yaml @@ -0,0 +1,12 @@ +# Common Modbus configuration for RP2040 Arduino tests + +packages: + uart: !include ../uart/rp2040-ard.yaml + +substitutions: + flow_control_pin: GPIO2 + +modbus: + - id: modbus_bus + uart_id: uart_bus + flow_control_pin: ${flow_control_pin} diff --git a/tests/test_build_components/common/qspi/esp32-s3-idf.yaml b/tests/test_build_components/common/qspi/esp32-s3-idf.yaml new file mode 100644 index 0000000000..22c98ef664 --- /dev/null +++ b/tests/test_build_components/common/qspi/esp32-s3-idf.yaml @@ -0,0 +1,13 @@ +# Common QSPI configuration for ESP32-S3 IDF tests +# For components that need QuadSPI (qspi_dbi displays) + +spi: + - id: quad_spi + type: quad + interface: spi3 + clk_pin: 47 + data_pins: + - 40 + - 41 + - 42 + - 43 diff --git a/tests/test_build_components/common/spi/bk72xx-ard.yaml b/tests/test_build_components/common/spi/bk72xx-ard.yaml new file mode 100644 index 0000000000..471b147bfa --- /dev/null +++ b/tests/test_build_components/common/spi/bk72xx-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for BK72XX Arduino tests + +substitutions: + clk_pin: P10 + mosi_pin: P11 + miso_pin: P6 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-ard.yaml b/tests/test_build_components/common/spi/esp32-ard.yaml new file mode 100644 index 0000000000..816609688c --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP32 Arduino tests + +substitutions: + clk_pin: GPIO18 + mosi_pin: GPIO23 + miso_pin: GPIO19 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-c3-ard.yaml b/tests/test_build_components/common/spi/esp32-c3-ard.yaml new file mode 100644 index 0000000000..da3182f259 --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-c3-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP32-C3 Arduino tests + +substitutions: + clk_pin: GPIO4 + mosi_pin: GPIO6 + miso_pin: GPIO5 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-c3-idf.yaml b/tests/test_build_components/common/spi/esp32-c3-idf.yaml new file mode 100644 index 0000000000..6a8f76c38c --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-c3-idf.yaml @@ -0,0 +1,15 @@ +# Common SPI configuration for ESP32-C3 IDF tests +# Provides a shared SPI bus that all components can use +# Components will auto-use this bus if they don't specify spi_id +# CS pins are component-specific + +substitutions: + clk_pin: GPIO4 + mosi_pin: GPIO6 + miso_pin: GPIO5 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-idf.yaml b/tests/test_build_components/common/spi/esp32-idf.yaml new file mode 100644 index 0000000000..c2c39a2bc0 --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-idf.yaml @@ -0,0 +1,15 @@ +# Common SPI configuration for ESP32 IDF tests +# Provides a shared SPI bus that all components can use +# Components will auto-use this bus if they don't specify spi_id +# CS pins are component-specific + +substitutions: + clk_pin: GPIO18 + mosi_pin: GPIO23 + miso_pin: GPIO19 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-s2-ard.yaml b/tests/test_build_components/common/spi/esp32-s2-ard.yaml new file mode 100644 index 0000000000..7c8997ae7f --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-s2-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP32-S2 Arduino tests + +substitutions: + clk_pin: GPIO36 + mosi_pin: GPIO35 + miso_pin: GPIO37 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-s2-idf.yaml b/tests/test_build_components/common/spi/esp32-s2-idf.yaml new file mode 100644 index 0000000000..afcd83e94e --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-s2-idf.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP32-S2 IDF tests + +substitutions: + clk_pin: GPIO36 + mosi_pin: GPIO35 + miso_pin: GPIO37 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-s3-ard.yaml b/tests/test_build_components/common/spi/esp32-s3-ard.yaml new file mode 100644 index 0000000000..06d5f65771 --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-s3-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP32-S3 Arduino tests + +substitutions: + clk_pin: GPIO40 + mosi_pin: GPIO6 + miso_pin: GPIO41 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp32-s3-idf.yaml b/tests/test_build_components/common/spi/esp32-s3-idf.yaml new file mode 100644 index 0000000000..ee47396ec7 --- /dev/null +++ b/tests/test_build_components/common/spi/esp32-s3-idf.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP32-S3 IDF tests + +substitutions: + clk_pin: GPIO40 + mosi_pin: GPIO6 + miso_pin: GPIO41 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/esp8266-ard.yaml b/tests/test_build_components/common/spi/esp8266-ard.yaml new file mode 100644 index 0000000000..4320afebb9 --- /dev/null +++ b/tests/test_build_components/common/spi/esp8266-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for ESP8266 Arduino tests + +substitutions: + clk_pin: GPIO14 + mosi_pin: GPIO13 + miso_pin: GPIO12 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/spi/rp2040-ard.yaml b/tests/test_build_components/common/spi/rp2040-ard.yaml new file mode 100644 index 0000000000..916a636318 --- /dev/null +++ b/tests/test_build_components/common/spi/rp2040-ard.yaml @@ -0,0 +1,12 @@ +# Common SPI configuration for RP2040 Arduino tests + +substitutions: + clk_pin: GPIO18 + mosi_pin: GPIO19 + miso_pin: GPIO16 + +spi: + - id: spi_bus + clk_pin: ${clk_pin} + mosi_pin: ${mosi_pin} + miso_pin: ${miso_pin} diff --git a/tests/test_build_components/common/uart/bk72xx-ard.yaml b/tests/test_build_components/common/uart/bk72xx-ard.yaml new file mode 100644 index 0000000000..8d1abca70b --- /dev/null +++ b/tests/test_build_components/common/uart/bk72xx-ard.yaml @@ -0,0 +1,13 @@ +# Common UART configuration for BK72XX Arduino tests +# Provides a shared UART bus that components can use +# Components will auto-use this bus if they don't specify uart_id + +substitutions: + tx_pin: TX1 + rx_pin: RX1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart/esp32-ard.yaml b/tests/test_build_components/common/uart/esp32-ard.yaml new file mode 100644 index 0000000000..805695def6 --- /dev/null +++ b/tests/test_build_components/common/uart/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 Arduino tests + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart/esp32-c3-ard.yaml b/tests/test_build_components/common/uart/esp32-c3-ard.yaml new file mode 100644 index 0000000000..565b109f9a --- /dev/null +++ b/tests/test_build_components/common/uart/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 Arduino tests + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart/esp32-c3-idf.yaml b/tests/test_build_components/common/uart/esp32-c3-idf.yaml new file mode 100644 index 0000000000..944aa013dd --- /dev/null +++ b/tests/test_build_components/common/uart/esp32-c3-idf.yaml @@ -0,0 +1,13 @@ +# Common UART configuration for ESP32-C3 IDF tests +# Provides a shared UART bus that components can use +# Components will auto-use this bus if they don't specify uart_id + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart/esp32-idf.yaml b/tests/test_build_components/common/uart/esp32-idf.yaml new file mode 100644 index 0000000000..95e5db9fb1 --- /dev/null +++ b/tests/test_build_components/common/uart/esp32-idf.yaml @@ -0,0 +1,13 @@ +# Common UART configuration for ESP32 IDF tests +# Provides a shared UART bus that components can use +# Components will auto-use this bus if they don't specify uart_id + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart/esp8266-ard.yaml b/tests/test_build_components/common/uart/esp8266-ard.yaml new file mode 100644 index 0000000000..e326f4fc0d --- /dev/null +++ b/tests/test_build_components/common/uart/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP8266 Arduino tests + +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart/rp2040-ard.yaml b/tests/test_build_components/common/uart/rp2040-ard.yaml new file mode 100644 index 0000000000..cd1e54a13b --- /dev/null +++ b/tests/test_build_components/common/uart/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for RP2040 Arduino tests + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 diff --git a/tests/test_build_components/common/uart_115200/esp32-ard.yaml b/tests/test_build_components/common/uart_115200/esp32-ard.yaml new file mode 100644 index 0000000000..9102910f31 --- /dev/null +++ b/tests/test_build_components/common/uart_115200/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 Arduino tests - 115200 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 diff --git a/tests/test_build_components/common/uart_115200/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_115200/esp32-c3-ard.yaml new file mode 100644 index 0000000000..87a969c6a3 --- /dev/null +++ b/tests/test_build_components/common/uart_115200/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 115200 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 diff --git a/tests/test_build_components/common/uart_115200/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_115200/esp32-c3-idf.yaml new file mode 100644 index 0000000000..f3768592e5 --- /dev/null +++ b/tests/test_build_components/common/uart_115200/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 IDF tests - 115200 baud +# For components that require UART baud rate 115200 (bl0906) + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 diff --git a/tests/test_build_components/common/uart_115200/esp32-idf.yaml b/tests/test_build_components/common/uart_115200/esp32-idf.yaml new file mode 100644 index 0000000000..e405f74fe7 --- /dev/null +++ b/tests/test_build_components/common/uart_115200/esp32-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 IDF tests - 115200 baud +# For components that require UART baud rate 115200 (bl0906) + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 diff --git a/tests/test_build_components/common/uart_115200/esp8266-ard.yaml b/tests/test_build_components/common/uart_115200/esp8266-ard.yaml new file mode 100644 index 0000000000..2dcf1c4a5d --- /dev/null +++ b/tests/test_build_components/common/uart_115200/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP8266 Arduino tests - 115200 baud + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 diff --git a/tests/test_build_components/common/uart_115200/rp2040-ard.yaml b/tests/test_build_components/common/uart_115200/rp2040-ard.yaml new file mode 100644 index 0000000000..62a7b5aed2 --- /dev/null +++ b/tests/test_build_components/common/uart_115200/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for RP2040 Arduino tests - 115200 baud + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 115200 diff --git a/tests/test_build_components/common/uart_1200/esp32-ard.yaml b/tests/test_build_components/common/uart_1200/esp32-ard.yaml new file mode 100644 index 0000000000..0ff5663d1f --- /dev/null +++ b/tests/test_build_components/common/uart_1200/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 Arduino tests - 1200 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 diff --git a/tests/test_build_components/common/uart_1200/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_1200/esp32-c3-ard.yaml new file mode 100644 index 0000000000..81cad70d3c --- /dev/null +++ b/tests/test_build_components/common/uart_1200/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 1200 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 diff --git a/tests/test_build_components/common/uart_1200/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_1200/esp32-c3-idf.yaml new file mode 100644 index 0000000000..8f1dace337 --- /dev/null +++ b/tests/test_build_components/common/uart_1200/esp32-c3-idf.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 IDF tests - 1200 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 diff --git a/tests/test_build_components/common/uart_1200/esp32-idf.yaml b/tests/test_build_components/common/uart_1200/esp32-idf.yaml new file mode 100644 index 0000000000..38ad1b1459 --- /dev/null +++ b/tests/test_build_components/common/uart_1200/esp32-idf.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 IDF tests - 1200 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 diff --git a/tests/test_build_components/common/uart_1200/esp8266-ard.yaml b/tests/test_build_components/common/uart_1200/esp8266-ard.yaml new file mode 100644 index 0000000000..84907a3a42 --- /dev/null +++ b/tests/test_build_components/common/uart_1200/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP8266 Arduino tests - 1200 baud + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 diff --git a/tests/test_build_components/common/uart_1200/rp2040-ard.yaml b/tests/test_build_components/common/uart_1200/rp2040-ard.yaml new file mode 100644 index 0000000000..3a3b322ea8 --- /dev/null +++ b/tests/test_build_components/common/uart_1200/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for RP2040 Arduino tests - 1200 baud + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 diff --git a/tests/test_build_components/common/uart_1200_even/esp32-ard.yaml b/tests/test_build_components/common/uart_1200_even/esp32-ard.yaml new file mode 100644 index 0000000000..f5f7f0669f --- /dev/null +++ b/tests/test_build_components/common/uart_1200_even/esp32-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 Arduino tests - 1200 baud even parity + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 + parity: EVEN diff --git a/tests/test_build_components/common/uart_1200_even/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_1200_even/esp32-c3-ard.yaml new file mode 100644 index 0000000000..0b1e3ba61b --- /dev/null +++ b/tests/test_build_components/common/uart_1200_even/esp32-c3-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 1200 baud even parity + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 + parity: EVEN diff --git a/tests/test_build_components/common/uart_1200_even/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_1200_even/esp32-c3-idf.yaml new file mode 100644 index 0000000000..1781babefb --- /dev/null +++ b/tests/test_build_components/common/uart_1200_even/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 IDF tests - 1200 baud, EVEN parity + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 + parity: EVEN diff --git a/tests/test_build_components/common/uart_1200_even/esp32-idf.yaml b/tests/test_build_components/common/uart_1200_even/esp32-idf.yaml new file mode 100644 index 0000000000..3b4b17f892 --- /dev/null +++ b/tests/test_build_components/common/uart_1200_even/esp32-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 IDF tests - 1200 baud, EVEN parity + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 + parity: EVEN diff --git a/tests/test_build_components/common/uart_1200_even/esp8266-ard.yaml b/tests/test_build_components/common/uart_1200_even/esp8266-ard.yaml new file mode 100644 index 0000000000..54f7de1757 --- /dev/null +++ b/tests/test_build_components/common/uart_1200_even/esp8266-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP8266 Arduino tests - 1200 baud even parity + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 + parity: EVEN diff --git a/tests/test_build_components/common/uart_1200_even/rp2040-ard.yaml b/tests/test_build_components/common/uart_1200_even/rp2040-ard.yaml new file mode 100644 index 0000000000..0e8bdeae1f --- /dev/null +++ b/tests/test_build_components/common/uart_1200_even/rp2040-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for RP2040 Arduino tests - 1200 baud even parity + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 1200 + parity: EVEN diff --git a/tests/test_build_components/common/uart_19200/esp32-ard.yaml b/tests/test_build_components/common/uart_19200/esp32-ard.yaml new file mode 100644 index 0000000000..f4f04669da --- /dev/null +++ b/tests/test_build_components/common/uart_19200/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 Arduino tests - 19200 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 19200 diff --git a/tests/test_build_components/common/uart_19200/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_19200/esp32-c3-ard.yaml new file mode 100644 index 0000000000..925acdc34c --- /dev/null +++ b/tests/test_build_components/common/uart_19200/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 19200 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 19200 diff --git a/tests/test_build_components/common/uart_19200/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_19200/esp32-c3-idf.yaml new file mode 100644 index 0000000000..0d765a88a4 --- /dev/null +++ b/tests/test_build_components/common/uart_19200/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 IDF tests - 19200 baud +# For components that require UART baud rate 19200 (bl0906) + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 19200 diff --git a/tests/test_build_components/common/uart_19200/esp32-idf.yaml b/tests/test_build_components/common/uart_19200/esp32-idf.yaml new file mode 100644 index 0000000000..e7849508c7 --- /dev/null +++ b/tests/test_build_components/common/uart_19200/esp32-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 IDF tests - 19200 baud +# For components that require UART baud rate 19200 (bl0906) + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 19200 diff --git a/tests/test_build_components/common/uart_19200/esp8266-ard.yaml b/tests/test_build_components/common/uart_19200/esp8266-ard.yaml new file mode 100644 index 0000000000..f01bc4590c --- /dev/null +++ b/tests/test_build_components/common/uart_19200/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP8266 Arduino tests - 19200 baud + +substitutions: + tx_pin: GPIO1 + rx_pin: GPIO3 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 19200 diff --git a/tests/test_build_components/common/uart_19200/rp2040-ard.yaml b/tests/test_build_components/common/uart_19200/rp2040-ard.yaml new file mode 100644 index 0000000000..6ebd02d451 --- /dev/null +++ b/tests/test_build_components/common/uart_19200/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for RP2040 Arduino tests - 19200 baud + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 19200 diff --git a/tests/test_build_components/common/uart_38400/esp32-ard.yaml b/tests/test_build_components/common/uart_38400/esp32-ard.yaml new file mode 100644 index 0000000000..15da771ccc --- /dev/null +++ b/tests/test_build_components/common/uart_38400/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 Arduino tests - 38400 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 38400 diff --git a/tests/test_build_components/common/uart_38400/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_38400/esp32-c3-ard.yaml new file mode 100644 index 0000000000..8838f029dc --- /dev/null +++ b/tests/test_build_components/common/uart_38400/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 38400 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 38400 diff --git a/tests/test_build_components/common/uart_38400/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_38400/esp32-c3-idf.yaml new file mode 100644 index 0000000000..d7d902af3d --- /dev/null +++ b/tests/test_build_components/common/uart_38400/esp32-c3-idf.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 IDF tests - 38400 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 38400 diff --git a/tests/test_build_components/common/uart_38400/esp32-idf.yaml b/tests/test_build_components/common/uart_38400/esp32-idf.yaml new file mode 100644 index 0000000000..f1c9587e27 --- /dev/null +++ b/tests/test_build_components/common/uart_38400/esp32-idf.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 IDF tests - 38400 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 38400 diff --git a/tests/test_build_components/common/uart_38400/esp8266-ard.yaml b/tests/test_build_components/common/uart_38400/esp8266-ard.yaml new file mode 100644 index 0000000000..b1a046ea5e --- /dev/null +++ b/tests/test_build_components/common/uart_38400/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP8266 Arduino tests - 38400 baud + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 38400 diff --git a/tests/test_build_components/common/uart_38400/rp2040-ard.yaml b/tests/test_build_components/common/uart_38400/rp2040-ard.yaml new file mode 100644 index 0000000000..01b5e58ed7 --- /dev/null +++ b/tests/test_build_components/common/uart_38400/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for RP2040 Arduino tests - 38400 baud + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 38400 diff --git a/tests/test_build_components/common/uart_4800/esp32-ard.yaml b/tests/test_build_components/common/uart_4800/esp32-ard.yaml new file mode 100644 index 0000000000..7f7096e31d --- /dev/null +++ b/tests/test_build_components/common/uart_4800/esp32-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 Arduino tests - 4800 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 diff --git a/tests/test_build_components/common/uart_4800/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_4800/esp32-c3-ard.yaml new file mode 100644 index 0000000000..3c814b76e4 --- /dev/null +++ b/tests/test_build_components/common/uart_4800/esp32-c3-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 4800 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 diff --git a/tests/test_build_components/common/uart_4800/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_4800/esp32-c3-idf.yaml new file mode 100644 index 0000000000..7b18789b19 --- /dev/null +++ b/tests/test_build_components/common/uart_4800/esp32-c3-idf.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32-C3 IDF tests - 4800 baud + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 diff --git a/tests/test_build_components/common/uart_4800/esp32-idf.yaml b/tests/test_build_components/common/uart_4800/esp32-idf.yaml new file mode 100644 index 0000000000..c2bd5b3edd --- /dev/null +++ b/tests/test_build_components/common/uart_4800/esp32-idf.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP32 IDF tests - 4800 baud + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 diff --git a/tests/test_build_components/common/uart_4800/esp8266-ard.yaml b/tests/test_build_components/common/uart_4800/esp8266-ard.yaml new file mode 100644 index 0000000000..afdbf4a599 --- /dev/null +++ b/tests/test_build_components/common/uart_4800/esp8266-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for ESP8266 Arduino tests - 4800 baud + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 diff --git a/tests/test_build_components/common/uart_4800/rp2040-ard.yaml b/tests/test_build_components/common/uart_4800/rp2040-ard.yaml new file mode 100644 index 0000000000..3bf0d6ba47 --- /dev/null +++ b/tests/test_build_components/common/uart_4800/rp2040-ard.yaml @@ -0,0 +1,11 @@ +# Common UART configuration for RP2040 Arduino tests - 4800 baud + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 diff --git a/tests/test_build_components/common/uart_4800_even/esp32-ard.yaml b/tests/test_build_components/common/uart_4800_even/esp32-ard.yaml new file mode 100644 index 0000000000..053848615b --- /dev/null +++ b/tests/test_build_components/common/uart_4800_even/esp32-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 Arduino tests - 4800 baud even parity + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + parity: EVEN diff --git a/tests/test_build_components/common/uart_4800_even/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_4800_even/esp32-c3-ard.yaml new file mode 100644 index 0000000000..b1370bc1cb --- /dev/null +++ b/tests/test_build_components/common/uart_4800_even/esp32-c3-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 4800 baud even parity + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + parity: EVEN diff --git a/tests/test_build_components/common/uart_4800_even/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_4800_even/esp32-c3-idf.yaml new file mode 100644 index 0000000000..173c768937 --- /dev/null +++ b/tests/test_build_components/common/uart_4800_even/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 IDF tests - 4800 baud, EVEN parity + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + parity: EVEN diff --git a/tests/test_build_components/common/uart_4800_even/esp32-idf.yaml b/tests/test_build_components/common/uart_4800_even/esp32-idf.yaml new file mode 100644 index 0000000000..eb850ec2dd --- /dev/null +++ b/tests/test_build_components/common/uart_4800_even/esp32-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 IDF tests - 4800 baud, EVEN parity + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + parity: EVEN diff --git a/tests/test_build_components/common/uart_4800_even/esp8266-ard.yaml b/tests/test_build_components/common/uart_4800_even/esp8266-ard.yaml new file mode 100644 index 0000000000..0b6bd9eac1 --- /dev/null +++ b/tests/test_build_components/common/uart_4800_even/esp8266-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP8266 Arduino tests - 4800 baud even parity + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + parity: EVEN diff --git a/tests/test_build_components/common/uart_4800_even/rp2040-ard.yaml b/tests/test_build_components/common/uart_4800_even/rp2040-ard.yaml new file mode 100644 index 0000000000..c99421b791 --- /dev/null +++ b/tests/test_build_components/common/uart_4800_even/rp2040-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for RP2040 Arduino tests - 4800 baud even parity + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 4800 + parity: EVEN diff --git a/tests/test_build_components/common/uart_9600_even/esp32-ard.yaml b/tests/test_build_components/common/uart_9600_even/esp32-ard.yaml new file mode 100644 index 0000000000..0a04f10705 --- /dev/null +++ b/tests/test_build_components/common/uart_9600_even/esp32-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 Arduino tests - 9600 baud even parity + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + parity: EVEN diff --git a/tests/test_build_components/common/uart_9600_even/esp32-c3-ard.yaml b/tests/test_build_components/common/uart_9600_even/esp32-c3-ard.yaml new file mode 100644 index 0000000000..1341a91b4e --- /dev/null +++ b/tests/test_build_components/common/uart_9600_even/esp32-c3-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 Arduino tests - 9600 baud even parity + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + parity: EVEN diff --git a/tests/test_build_components/common/uart_9600_even/esp32-c3-idf.yaml b/tests/test_build_components/common/uart_9600_even/esp32-c3-idf.yaml new file mode 100644 index 0000000000..5a7bce2198 --- /dev/null +++ b/tests/test_build_components/common/uart_9600_even/esp32-c3-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32-C3 IDF tests - 9600 baud, EVEN parity + +substitutions: + tx_pin: GPIO20 + rx_pin: GPIO21 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + parity: EVEN diff --git a/tests/test_build_components/common/uart_9600_even/esp32-idf.yaml b/tests/test_build_components/common/uart_9600_even/esp32-idf.yaml new file mode 100644 index 0000000000..b60cf71b17 --- /dev/null +++ b/tests/test_build_components/common/uart_9600_even/esp32-idf.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP32 IDF tests - 9600 baud, EVEN parity + +substitutions: + tx_pin: GPIO17 + rx_pin: GPIO16 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + parity: EVEN diff --git a/tests/test_build_components/common/uart_9600_even/esp8266-ard.yaml b/tests/test_build_components/common/uart_9600_even/esp8266-ard.yaml new file mode 100644 index 0000000000..300ec842df --- /dev/null +++ b/tests/test_build_components/common/uart_9600_even/esp8266-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for ESP8266 Arduino tests - 9600 baud even parity + +substitutions: + tx_pin: GPIO4 + rx_pin: GPIO5 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + parity: EVEN diff --git a/tests/test_build_components/common/uart_9600_even/rp2040-ard.yaml b/tests/test_build_components/common/uart_9600_even/rp2040-ard.yaml new file mode 100644 index 0000000000..c281ae84b5 --- /dev/null +++ b/tests/test_build_components/common/uart_9600_even/rp2040-ard.yaml @@ -0,0 +1,12 @@ +# Common UART configuration for RP2040 Arduino tests - 9600 baud even parity + +substitutions: + tx_pin: GPIO0 + rx_pin: GPIO1 + +uart: + - id: uart_bus + tx_pin: ${tx_pin} + rx_pin: ${rx_pin} + baud_rate: 9600 + parity: EVEN