FAN.md 6.7 KB

SmartIR Media Player

For this platform to work, we need a .json file containing all the necessary IR or RF commands. Find your device's brand code here and add the number in the device_code field. The compoenent will download it to the correct folder. If your device is not working, you will need to learn your own codes and place the .json file in smartir/codes/fan/ 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 entity ID of the configured Broadlink or Xiaomi remote, or the MQTT topic used to send commands.
delay number 0.5 Delay in seconds between multiple commands.
power_sensor string optional Entity ID of a sensor that monitors whether the device is on or off. Accepts on/off states.

Example (using broadlink controller)

Add a Broadlink RM device named "Bedroom" via config flow (read the docs).

smartir:

fan:
  - platform: smartir
    name: Bedroom fan
    unique_id: bedroom_fan
    device_code: 1000
    controller_data: remote.bedroom_remote
    power_sensor: binary_sensor.fan_power

Example (using xiaomi controller)

smartir:

remote:
  - platform: xiaomi_miio
    host: 192.168.10.10
    token: YOUR_TOKEN

fan:
  - platform: smartir
    name: Bedroom fan
    unique_id: bedroom_fan
    device_code: 2000
    controller_data: remote.xiaomi_miio_192_168_10_10
    power_sensor: binary_sensor.fan_power

Example (using mqtt controller)

smartir:

fan:
  - platform: smartir
    name: Bedroom fan
    unique_id: bedroom_fan
    device_code: 3000
    controller_data: home-assistant/bedroom-fan/command
    power_sensor: binary_sensor.fan_power

Example (using LOOKin controller)

smartir:

fan:
  - platform: smartir
    name: Bedroom fan
    unique_id: bedroom_fan
    device_code: 4000
    controller_data: 192.168.10.10
    power_sensor: binary_sensor.fan_power

Example (using ESPHome)

ESPHome configuration example:

esphome:
  name: my_espir
  platform: ESP8266
  board: esp01_1m

api:
  services:
    - service: send_raw_command
      variables:
        command: int[]
      then:
        - remote_transmitter.transmit_raw:
            code: !lambda 'return command;'

remote_transmitter:
  pin: GPIO14
  carrier_duty_percent: 50%

HA configuration.yaml:

smartir:

fan:
  - platform: smartir
    name: Bedroom fan
    unique_id: bedroom_fan
    device_code: 4000
    controller_data: my_espir_send_raw_command
    power_sensor: binary_sensor.fan_power

Available codes for Fan devices

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.

Kaze

Code Supported Models Controller
1000 Unknown Broadlink

Acorn

Code Supported Models Controller
1020 Unknown Broadlink

Atomberg

Code Supported Models Notes Controller
1160 Efficio Broadlink
1170 Renesa Speeds 1,2,3,4,5 is mapped to 2,3,4,5,Boost on the remote Broadlink
1171 Renesa Wall Fan Broadlink

Lucci Air

Code Supported Models Controller
1040 Aria Broadlink
1041 Whitehaven DC Broadlink
7040 Aria ESPHome

Super Fan

Code Supported Models Controller
1060 A1 Broadlink

Harbor Breeze

Code Supported Models Controller
1080 A25-TX001-R1 Broadlink
1081 A25-TX025 Broadlink

Pacific

Code Supported Models Controller
1100 Unknown Broadlink

Europace

Code Supported Models Controller
1120 Unknown Broadlink

SMC

Code Supported Models Controller
1140 SP486, SP483 Broadlink

Argo

Code Supported Models Controller
1180 Standy Broadlink

DCG

Code Supported Models Controller
1200 Unknown Broadlink

Mitsubishi

Code Supported Models Controller
1220 C56-RW5 Broadlink

Mallory

Code Supported Models Controller
1240 Air Timer TS+ Broadlink

Hyundai

Code Supported Models Controller
1260 Unknown Broadlink

Taobao

Code Supported Models Controller
1280 XH-MD
XH-FS
Broadlink

Westinghouse

Code Supported Models Controller
1300 GFC-52V-L Broadlink

ThreeSixty Fans

Code Supported Models Controller
1320 Kira (2021; six speeds and Ocean Breeze) Broadlink