You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this platform to work, we need a .json file containing all the necessary IR commands.
Find your device's brand code here and add the number in the device_code field. If your device is not working, you will need to learn your own codes and place the .json file in smartir/custom_codes/media_player/ subfolders. Please note that the device_code field only accepts positive numbers. The .json extension is not required.
Configuration variables:
Name
Type
Default
Description
name
string
optional
The name of the device
unique_id
string
optional
An ID that uniquely identifies this device. If two devices have the same unique ID, Home Assistant will raise an exception.
device_code
number
required
(Accepts only positive numbers)
controller_data
string
required
The data required for the controller to function. Enter the entity_id of the Broadlink remote (must be an already configured device), or the entity id of the Xiaomi IR controller, or the MQTT topic on which to send commands, or the ZHA zigbee cluster to send commands to.
delay
number
optional
Adjusts the delay in seconds between multiple commands. The default is 0.5
power_sensor
string
optional
entity_id for a sensor that monitors whether your device is actually on or off. This may be a power monitor sensor. (Accepts only on/off states)
power_sensor_delay
int
optional
Maximum delay in second in which power sensor is able to report back to HA changed state of the device, default is 10 seconds. If sensor reaction time is longer extend this time, otherwise you might get unwanted changes in the device state.
power_sensor_restore_state
boolean
optional
If true than in case power sensor will report to HA that device is on without HA actually switching it on (device was switched on by remote, of device cycled, etc.), than HA will report last assumed state and attributes at the time when the device was on managed by HA. If set to false when device will be reported as on by the power sensors all device attributes will be reported as UNKNOWN. Default is true.
source_names
dict
optional
Override the names of sources as displayed in HomeAssistant (see below)
Example (using broadlink controller):
Add a Broadlink RM device named "Bedroom" via config flow (read the docs).
Source names in device files are usually set to the name that the media player uses. These often aren't very descriptive, so you can override these names in the configuration file. You can also remove a source by setting its name to null.
media_player:
- platform: smartirname: Living room TVunique_id: living_room_tvdevice_code: 1000controller_data: 192.168.10.10source_names:
HDMI1: DVD PlayerHDMI2: XboxVGA: null
Changing channels
Most IR remotes can only send one key at a time (0 to 9) to change your TV channel, changing to other channels requires pressing 2 consecutive keys. SmartIR handles any channel for you with the standard Home Assistant service interface. Here is an example that changes your Kitchen TV to channel 51:
The following are the code files created by the amazing people in the community. Before you start creating your own code file, try if one of them works for your device. Please open an issue if your device is working and not included in the supported models.
Contributing to your own code files is welcome. However, we do not accept incomplete files as well as files related to MQTT controllers.