Skip to content

Turn any remote into a first-class Home Assistant device (Universal remote integration) #226

Description

@mkerstner

Problem statement

With IR sending (#121) and receiving (#122) now shipped, Home Assistant can talk to IR devices, but only through per-device reference integrations that already know a given manufacturer's protocol. There is still no general-purpose path for a user to take an arbitrary remote and make it work with Home Assistant.

The opportunity is to close that gap with a Universal Remote integration: learn IR (and later RF) commands from any physical remote, store them, and expose them back to the user as usable entities. 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

This is just a proposal and should be checked / challenged

  • 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

The learning experience is a guided, type-first wizard, replacing today's Developer-Tools/JSON workflow. No YAML, no manual code handling.

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

  • Which entity types to support at launch beyond button, and how to compose a light/media_player from a set of learned commands (mapping commands to entity features)?
  • How to handle stateless / feedback-less IR devices: do we want to model optimistic states, and how do we communicate uncertainty to the user?
  • Storage and identity of learned commands: naming, de-duplication, sharing/export between users, and migration.
  • Should this be designed transport-agnostic from day one so RF can slot in later without a rewrite?
  • Relationship to existing community/custom integrations (e.g. HA_universal_remote): is there prior art or a maintainer to collaborate with?

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

Labels

No labels
No labels

Projects

Status
Shaping

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions