Skip to content

Turn any remote into a first-class Home Assistant device #226

Description

@mkerstner

Problem statement

With IR sending (#121) and receiving (#122) now shipped, Home Assistant can talk to IR devices using the infrastructure built around the approach to have 1-integration-per-brand references that know a given manufacturer's protocol.

This way, for users enabling sending and receiving commands remains as easy as selecting a supported brand from a list of.

While the original opportunity was around ways to learn and store IR commands discussions and feedback has shown that there already is quite some traction around that topic based on the infrared infrastructure recently introduced.

So, consequently focusing more on how to create those 1-integration-per-brand integrations easier is key - while relying and what our wonderful community already is working on, e.g. @DAB-LABS with their HAIR HACS integration.

=> Jump directly to this comment here to follow the latest idea & approach around this topic.

The opportunity is to close that gap with a Universal Remote integration: Use IR commands from any physical remote and expose them back. As @balloob framed it, you ideally should be able to grab a random second-hand remote for 20 cents, "teach" Home Assistant its commands, and immediately have those commands available, both as received events (press a button and it fires an event entity) and as sendable commands (create a button, light, or media player that replays a learned command). This is the natural continuation of the IR work and stays squarely in line with our sustainability value by reviving legacy remotes and devices instead of replacing them.

Community signals

Scope & Boundaries

In scope

Not in scope

  • RF learning/sending (tracked separately alongside #102); the architecture should not preclude adding it later.
  • Pre-populated manufacturer command databases / cloud code lookups, since the initial focus is user-taught commands, not a shipped code library.
  • Full stateful device modelling (e.g. tracking real on/off state of a "dumb" IR device that gives no feedback) beyond what a learned-command entity can reasonably represent.

Foreseen solution

Current experimentation is driven based on the HAIR HACS integration to create 1-integration-per-brand integrations.

=> Chime in on the Discord discussion

  • A new integration layered on the shipped IR send/receive foundation: Infrared integration, the ESPHome IR/RF proxy, and the receiver event-entity work from #122
  • A "learn command" storage mechanism keyed to user-defined names, replayable on demand, replacing today's fiddly Developer-Tools/JSON workflow surfaced in the community signals.
  • A type-first config flow with point-and-teach steps and confirmation feedback, modelled on the Google TV Streamer IR onboarding UX.
  • Learned commands exposed initially as event entities (receive) and button entities (send), with a defined path to composing higher-level entity types.
  • Align with the core remote.learn_command / command-type direction discussed in architecture #438.

Proposed learning config flow

See demo / discussion for how we could envision it.

Commands are stored per device as a fixed set of type-defined slots (protocol + code where recognised, otherwise raw timings as a fallback), and the entity exposes only the features it has commands for. After setup, a device options menu covers add command, re-teach, test (send on demand), rename, remove, delete, move to another proxy, and export/import of a device's learned commands for sharing or restore.

Risks & open questions

  • Mainly risk of coverage of supported brands

Appetite

Medium, 1 to 2 cycles. Draft opportunity to shape further; intended primarily as a home to link ongoing discussion and context to.

Execution issues

No response

Decision log

Date Decision Outcome

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions