Skip to content

Instantly share code, notes, and snippets.

@radiantly
Last active May 16, 2025 02:22
Show Gist options
  • Save radiantly/54cea0c55bc4265e10130db4f0e48d15 to your computer and use it in GitHub Desktop.
Save radiantly/54cea0c55bc4265e10130db4f0e48d15 to your computer and use it in GitHub Desktop.

Revisions

  1. radiantly revised this gist Jun 16, 2024. 1 changed file with 9 additions and 16 deletions.
    25 changes: 9 additions & 16 deletions atomberg.yaml
    Original 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_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:
    on_state:
    - remote_transmitter.transmit_nec:
    transmitter_id: remote

    address: 0xF300
    command: !lambda |-
    if (x == 1) {
    if (!x->state) // turn off
    return 0x6E91;
    else if (x->speed == 1)
    return 0x748B;
    } else if (x == 2) {
    else if (x->speed == 2)
    return 0x6F90;
    } else if (x == 3) {
    else if (x->speed == 3)
    return 0x758A;
    } else if (x == 4) {
    else if (x->speed == 4)
    return 0x6C93;
    } else if (x == 5) {
    else if (x->speed == 5)
    return 0x7788;
    } else {
    else // boost mode
    return 0x708F;
    }
  2. radiantly created this gist Jun 16, 2024.
    63 changes: 63 additions & 0 deletions atomberg.yaml
    Original 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;
    }