As far as I know there is no pre-canned ESPHome sketch you can load for the iFan03 yet.
And I asked a long time ago in the iFan03 thread in the Tasmota forum for the GPIO pinout (especially as it relates to the remote control) and I never got any responses.
Digging thru the Tasmota code I found the GPIO to control the relays for the different functions but it still leaves trying to figure out the remote functions.
Here is what I have so far:
sonoff_template.h -
{ "Sonoff iFan02", // Sonoff iFan02 (ESP8285)
GPIO_KEY1, // GPIO00 WIFI_KEY0 Virtual button 1 as feedback from RC
GPIO_USER, // GPIO01 ESP_TXD Serial RXD and Optional sensor
0, // GPIO02 ESP_LOG
GPIO_USER, // GPIO03 ESP_RXD Serial TXD and Optional sensor
GPIO_REL3, // GPIO04 WIFI_O2 Relay 3 (0 = Off, 1 = On) controlling the fan
GPIO_REL2, // GPIO05 WIFI_O1 Relay 2 (0 = Off, 1 = On) controlling the fan
0, 0, 0, // Flash connection
GPIO_KEY2, // GPIO09 WIFI_KEY1 Virtual button 2 as feedback from RC
GPIO_KEY3, // GPIO10 WIFI_KEY2 Virtual button 3 as feedback from RC
0, // Flash connection
GPIO_REL1, // GPIO12 WIFI_O0 Relay 1 (0 = Off, 1 = On) controlling the light
GPIO_LED1_INV, // GPIO13 WIFI_CHK Blue Led on PCA (0 = On, 1 = Off)
GPIO_KEY4, // GPIO14 WIFI_KEY3 Virtual button 4 as feedback from RC
GPIO_REL4, // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan
0, 0
},
starts at line 2035
{ "Sonoff iFan03", // Sonoff iFan03 (ESP8285)
GPIO_KEY1, // GPIO00 WIFI_KEY0 Button 1
GPIO_TXD, // GPIO01 ESP_TXD Serial RXD connection to P0.5 of RF microcontroller
0, // GPIO02 ESP_LOG
GPIO_RXD, // GPIO03 ESP_RXD Serial TXD connection to P0.4 of RF microcontroller
0, // GPIO04 DEBUG_RX
0, // GPIO05 DEBUG_TX
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
GPIO_REL1_INV, // GPIO09 WIFI_O0 Relay 1 (0 = Off, 1 = On) controlling the light
GPIO_BUZZER_INV, // GPIO10 WIFI_O4 Buzzer (0 = Off, 1 = On)
// GPIO11 (SD_CMD Flash)
GPIO_REL3, // GPIO12 WIFI_O2 Relay 3 (0 = Off, 1 = On) controlling the fan
GPIO_LED1_INV, // GPIO13 WIFI_CHK Blue Led on PCA (0 = On, 1 = Off) - Link and Power status
GPIO_REL2, // GPIO14 WIFI_O1 Relay 2 (0 = Off, 1 = On) controlling the fan
GPIO_REL4, // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan
0, 0
}
/* Fanspeed is controlled by relay 2, 3 and 4 as in Sonoff 4CH.
000x = 0
001x = 1
011x = 2
101x = 3 (ifan02) or 100x = 3 (ifan03)
*/