Infrared

An infrared entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] represents an infrared transmitter device, allowing other integrations to send IR commands to control devices such as TVs, air conditioners, and other IR-controlled appliances.

The Infrared integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] acts as an abstraction layer between IR emitter hardware (such as ESPHome) and device-specific integrations that provide control for IR-controlled devices (such as TVs or air conditioners from various brands).

Note

Building block integration

This infrared is a building block integration that cannot be added to your Home Assistant directly but is used and provided by other integrations.

A building block integration differs from the typical integration that connects to a device or service. Instead, other integrations that do integrate a device or service into Home Assistant use this infrared building block to provide entities, services, and other functionality that you can use in your automations or dashboards.

If one of your integrations features this building block, this page documents the functionality the infrared building block offers.

The state of an infrared entity

The infrared entity is stateless in the traditional sense, as in, it cannot have a state like on or off. Instead, the state of an infrared entity is a timestamp showing the date and time of the last time an IR command was sent through the transmitter.

In addition, the entity can have the following states:

  • Unavailable: The entity is currently unavailable.
  • Unknown: The state is not yet known.

Because the stateThe state holds the information of interest of an entity, for example, if a light is on or off. Each entity has exactly one state and the state only holds one value at a time. However, entities can store attributes related to that state such as brightness, color, or a unit of measurement. [Learn more] of an infrared entity in Home Assistant is a timestamp, it changes every time an IR command is sent. This means we can use it to track when the transmitter was last used. The logbook can also show context about which integration or action triggered the transmission.

Setting up devices that use infrared

When setting up an integration for an IR-controlled device (such as an LG TV via infrared), you will typically be asked to select which IR transmitter to use during the configuration process. This allows you to choose the specific infrared entity that is physically positioned to control your device.

The selected infrared entity must be provided by a hardware integration (such as ESPHome) that has already been set up with an IR transmitter.