Add Global Caché iTach IP2IR integration#170780
Conversation
There was a problem hiding this comment.
When adding new integrations, limit included platforms to a single platform. Please reduce this PR to a single platform. See the review process for more details.
This PR includes a brand folder inside the component. Brand assets should not be part of the core repository. Please refer to the brand images documentation for the correct approach.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces a new Home Assistant integration for Global Caché iTach IP2IR, including discovery, config/options flows, infrared/remote entities, diagnostics, repairs, and a bundled pyitach protocol layer.
Changes:
- Added the
itachip2irintegration (config flow, discovery, infrared + remote platforms, options flow, diagnostics, repairs, translations, docs). - Added a comprehensive test suite for the integration (setup/unload, discovery, infrared, remote, diagnostics, repairs, compat).
- Updated generated registries (integrations, DHCP, config flows), CODEOWNERS, and requirements pins.
Reviewed changes
Copilot reviewed 41 out of 45 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/components/itachip2ir/init.py | Adds test package marker for the integration tests. |
| tests/components/itachip2ir/conftest.py | Adds integration-wide test fixtures and global client/discovery mocks. |
| tests/components/itachip2ir/test_discovery.py | Adds tests for UDP discovery parsing, listener behavior, and HA discovery orchestration. |
| tests/components/itachip2ir/test_diagnostics.py | Adds diagnostics redaction and firmware-version retrieval tests. |
| tests/components/itachip2ir/test_import.py | Sanity test that the config flow loads. |
| tests/components/itachip2ir/test_infrared.py | Adds tests for IR entity behavior, timing conversion, and error translation. |
| tests/components/itachip2ir/test_infrared_compat.py | Adds tests for the infrared_protocols.Command compatibility shim. |
| tests/components/itachip2ir/test_init.py | Adds setup/unload/discovery lifecycle tests for the integration entrypoints. |
| tests/components/itachip2ir/test_remote.py | Adds tests for virtual remote behavior and command parsing/sending. |
| tests/components/itachip2ir/test_repairs.py | Adds tests for repair issue lifecycle and repair flow behavior. |
| requirements_all.txt | Adds a pinned dependency entry for this integration. |
| requirements_test_all.txt | Adds a pinned dependency entry for tests. |
| homeassistant/generated/config_flows.py | Registers itachip2ir as having a config flow. |
| homeassistant/generated/dhcp.py | Adds DHCP match for Global Caché OUI 000C1E. |
| homeassistant/generated/integrations.json | Registers the integration in the generated integrations index. |
| homeassistant/components/itachip2ir/init.py | Implements integration setup, discovery startup, entry lifecycle, runtime data, and repair issues. |
| homeassistant/components/itachip2ir/command.py | Adds parsing/validation for remote command payload formats (JSON/text/Pronto). |
| homeassistant/components/itachip2ir/config_flow.py | Adds config flow for manual setup, DHCP/UDP discovery, and reconfigure. |
| homeassistant/components/itachip2ir/const.py | Defines integration constants and option keys. |
| homeassistant/components/itachip2ir/diagnostics.py | Implements config entry diagnostics with redaction and firmware lookup. |
| homeassistant/components/itachip2ir/discovery.py | Implements HA-facing UDP discovery listener, flow triggering, and host update logic. |
| homeassistant/components/itachip2ir/icons.json | Provides entity icons for translated infrared entity keys. |
| homeassistant/components/itachip2ir/infrared.py | Implements infrared entities backed by the iTach TCP API client. |
| homeassistant/components/itachip2ir/infrared_compat.py | Provides compatibility shim for infrared_protocols.Command import expectations. |
| homeassistant/components/itachip2ir/manifest.json | Declares the integration manifest, dependencies, and metadata. |
| homeassistant/components/itachip2ir/options_flow.py | Implements options flow for managing virtual remotes and commands. |
| homeassistant/components/itachip2ir/py.typed | Marks the integration package as typed for type checkers. |
| homeassistant/components/itachip2ir/pyitach/init.py | Exposes the internal pyitach public API surface. |
| homeassistant/components/itachip2ir/pyitach/_capabilities.py | Adds IR capability probing helpers and fallback logic. |
| homeassistant/components/itachip2ir/pyitach/_client.py | Adds async TCP client with locking, parsing, and sendir/completeir handling. |
| homeassistant/components/itachip2ir/pyitach/_discovery.py | Adds UDP multicast discovery socket + beacon parsing implementation. |
| homeassistant/components/itachip2ir/pyitach/_exceptions.py | Adds typed exception hierarchy for protocol/client errors. |
| homeassistant/components/itachip2ir/pyitach/_identity.py | Adds device-id normalization helper. |
| homeassistant/components/itachip2ir/pyitach/_protocol.py | Adds protocol encode/decode helpers for iTach responses/commands. |
| homeassistant/components/itachip2ir/quality_scale.yaml | Documents quality scale rule status and exemptions for the integration. |
| homeassistant/components/itachip2ir/README.md | Adds user-facing integration documentation and troubleshooting. |
| homeassistant/components/itachip2ir/ARCHITECTURE.md | Adds deep architecture documentation for maintainers/reviewers. |
| homeassistant/components/itachip2ir/remote.py | Implements virtual remote entities that delegate to infrared transmitters. |
| homeassistant/components/itachip2ir/repairs.py | Adds repair issue creation/deletion and a confirm-only repair flow. |
| homeassistant/components/itachip2ir/strings.json | Adds config/options/exception/issue/entity translations. |
| CODEOWNERS | Adds code ownership for the new integration and its tests. |
Comments suppressed due to low confidence (2)
requirements_all.txt:1
- This introduces two conflicting pins for the same distribution (
infrared-protocols) in the same requirements set. Dependency resolution will fail or be non-deterministic. The integration should either align with the existing pinned version (3.5.0 here) or avoid adding a second pin and rely on the already-present dependency.
tests/components/itachip2ir/conftest.py:1 - This path manipulation appears incorrect:
parents[1]fromtests/components/itachip2ir/conftest.pypoints totests/components, not the repository root, androot / \"homeassistant.components\"is unlikely to exist. This adds potentially misleading entries tosys.path. Prefer removing this fixture entirely (since HA tests already importhomeassistant), or compute the actual repo root (e.g.,parents[3]) and use the real package path (root / \"homeassistant\" / \"components\") if you truly need it.
| except KeyError, TypeError, ValueError: | ||
| _LOGGER.warning( | ||
| "Skipping malformed remote configuration: %s", | ||
| remote_config, | ||
| ) | ||
| continue |
| port, | ||
| ir_capability.ports, | ||
| ) | ||
| except CannotConnect, NoIrPorts: |
|
|
||
| def _coerce_int_list(value: Any, field: str) -> list[int]: | ||
| """Coerce a sequence of values to integers.""" | ||
| if not isinstance(value, list | tuple): |
| "documentation": "https://www.home-assistant.io/integrations/itachip2ir", | ||
| "integration_type": "device", | ||
| "iot_class": "local_push", | ||
| "loggers": ["homeassistant.itachip2ir"], |
| This private module owns the Global Caché/iTach UDP discovery transport and | ||
| beacon parsing. It intentionally contains no Home Assistant imports or config | ||
| entry logic. Public consumers should import discovery helpers from | ||
| ``custom_components.itachip2ir.pyitach`` rather than this private module. |
| "title": "iTach IP2IR cannot be reached" | ||
| }, | ||
| "invalid_config": { | ||
| "description": "Home Assistant could not set up the configured iTach IP2IR device because the stored configuration or device response is invalid. Reconfigure the integration or reload it after fixing the device or network configuration.", |
Proposed change
Adds a new Home Assistant integration for the Global Caché iTach IP2IR network infrared controller.
Features include:
Type of change
New feature