Last active
May 16, 2025 02:22
-
-
Save radiantly/54cea0c55bc4265e10130db4f0e48d15 to your computer and use it in GitHub Desktop.
Revisions
-
radiantly revised this gist
Jun 16, 2024 . 1 changed file with 9 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,30 +34,23 @@ fan: name: "Fan" speed_count: 6 restore_mode: RESTORE_DEFAULT_OFF on_state: - remote_transmitter.transmit_nec: transmitter_id: remote address: 0xF300 command: !lambda |- if (!x->state) // turn off return 0x6E91; else if (x->speed == 1) return 0x748B; else if (x->speed == 2) return 0x6F90; else if (x->speed == 3) return 0x758A; else if (x->speed == 4) return 0x6C93; else if (x->speed == 5) return 0x7788; else // boost mode return 0x708F; -
radiantly created this gist
Jun 16, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,63 @@ esphome: name: atomberg esp32: board: esp32dev framework: type: arduino # Enable logging logger: # Enable Home Assistant API api: password: "" ota: password: "" # Enter Wi-Fi credentials below wifi: ssid: "WIFI_NAME" password: "WIFI_PASS" # Connect your IR led to GPIO4 # see https://github.com/crankyoldgit/IRremoteESP8266/wiki#ir-sending remote_transmitter: pin: GPIO04 carrier_duty_percent: 50% id: remote # Atomberg Fan component fan: - platform: template name: "Fan" speed_count: 6 restore_mode: RESTORE_DEFAULT_OFF on_turn_on: - logger.log: "Turning fan on!" on_turn_off: - logger.log: "Turning fan off!" - remote_transmitter.transmit_nec: transmitter_id: remote address: 0xF300 command: 0x6E91 on_speed_set: - remote_transmitter.transmit_nec: transmitter_id: remote address: 0xF300 command: !lambda |- if (x == 1) { return 0x748B; } else if (x == 2) { return 0x6F90; } else if (x == 3) { return 0x758A; } else if (x == 4) { return 0x6C93; } else if (x == 5) { return 0x7788; } else { return 0x708F; }