├── .github ├── actions │ └── build │ │ └── action.yml └── workflows │ ├── build.yml │ └── ci.yml ├── .gitignore ├── ESP8266_MINI.bin ├── LICENSE ├── README.md ├── athom-cb02.yaml ├── athom-garage-door.yaml ├── athom-ls-4p-3wire.yaml ├── athom-ls-4p-4wire.yaml ├── athom-mini-switch.yaml ├── athom-relay-board-x1.yaml ├── athom-relay-board-x2.yaml ├── athom-relay-board-x4.yaml ├── athom-relay-board-x8.yaml ├── athom-rgb-light.yaml ├── athom-rgbct-light.yaml ├── athom-rgbw-light.yaml ├── athom-rgbww-light.yaml ├── athom-smart-plug-v2.yaml ├── athom-smart-plug.yaml ├── athom-sw01-v2.yaml ├── athom-sw01.yaml ├── athom-sw02-v2.yaml ├── athom-sw02.yaml ├── athom-sw03.yaml ├── athom-sw04.yaml ├── athom-ws2812b.yaml └── tasmota-minimal.bin /.github/actions/build/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build configs' 2 | description: '' 3 | inputs: 4 | device: 5 | description: 'Device to compile' 6 | required: true 7 | runs: 8 | using: "composite" 9 | steps: 10 | - name: Install Dependencies 11 | shell: bash 12 | run: | 13 | apt update 14 | apt install -y jq 15 | pip3 install yq 16 | 17 | - name: Get info 18 | id: info 19 | shell: bash 20 | run: | 21 | esphome=$(esphome config athom-${{ inputs.device }}.yaml | yq ".esphome") 22 | name=$(echo $esphome | yq -r ".project.name") 23 | version=$(echo $esphome | yq -r ".project.version") 24 | devicename=$(echo $esphome | yq -r ".name") 25 | esphome_version=$(esphome version) 26 | esphome_version=$(echo $esphome_version | cut -d " " -f 2) 27 | 28 | echo "::set-output name=name::$name" 29 | echo "::set-output name=version::$version" 30 | echo "::set-output name=devicename::$devicename" 31 | echo "::set-output name=esphome_version::$esphome_version" 32 | 33 | 34 | - name: Compile ${{ inputs.device }} 35 | shell: bash 36 | run: esphome compile athom-${{ inputs.device }}.yaml 37 | 38 | - name: Copy generated file 39 | shell: bash 40 | run: | 41 | cp .esphome/build/${{ steps.info.outputs.devicename }}/.pioenvs/${{ steps.info.outputs.devicename }}/firmware.bin \ 42 | ./${{ steps.info.outputs.name }}--${{ steps.info.outputs.version }}.bin 43 | 44 | - name: Upload binary 45 | uses: actions/upload-artifact@v2 46 | with: 47 | name: Athom Binaries (${{ steps.info.outputs.esphome_version }}) 48 | path: ./${{ steps.info.outputs.name }}--${{ steps.info.outputs.version }}.bin 49 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build binaries 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | name: Build ${{ matrix.device }} - ${{ matrix.esphome }} 11 | runs-on: ubuntu-latest 12 | strategy: 13 | fail-fast: false 14 | matrix: 15 | device: 16 | - rgb-light 17 | - rgbww-light 18 | - rgbct-light 19 | - garage-door 20 | - ws2812b 21 | - mini-switch 22 | - relay-board-x1 23 | - relay-board-x2 24 | - relay-board-x4 25 | - relay-board-x8 26 | - smart-plug 27 | - smart-plug-v2 28 | - sw01 29 | - sw01-v2 30 | - sw02 31 | - sw02-v2 32 | - sw03 33 | - sw04 34 | - cb02 35 | - ls-4p-3wire 36 | - ls-4p-4wire 37 | esphome: 38 | - latest 39 | - beta 40 | - dev 41 | 42 | container: ghcr.io/esphome/esphome:${{ matrix.esphome }} 43 | steps: 44 | - name: Checkout source 45 | uses: actions/checkout@v2 46 | - uses: ./.github/actions/build 47 | with: 48 | device: ${{ matrix.device }} 49 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | build: 8 | name: Building ${{ matrix.device }} 9 | runs-on: ubuntu-latest 10 | strategy: 11 | fail-fast: false 12 | matrix: 13 | device: 14 | - rgb-light 15 | - rgbww-light 16 | - rgbct-light 17 | - garage-door 18 | - ws2812b 19 | - mini-switch 20 | - relay-board-x1 21 | - relay-board-x2 22 | - relay-board-x4 23 | - relay-board-x8 24 | - smart-plug 25 | - smart-plug-v2 26 | - sw01 27 | - sw01-v2 28 | - sw02 29 | - sw02-v2 30 | - sw03 31 | - sw04 32 | - cb02 33 | - ls-4p-3wire 34 | - ls-4p-4wire 35 | steps: 36 | - name: Checkout source 37 | uses: actions/checkout@v2 38 | - uses: esphome/build-action@v1.1.0 39 | id: esphome-build 40 | with: 41 | yaml_file: athom-${{ matrix.device }}.yaml 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gitignore settings for ESPHome 2 | # This is an example and may include too much for your use-case. 3 | # You can modify this file to suit your needs. 4 | /.esphome/ 5 | **/.pioenvs/ 6 | **/.piolibdeps/ 7 | **/lib/ 8 | **/src/ 9 | **/platformio.ini 10 | /secrets.yaml 11 | -------------------------------------------------------------------------------- /ESP8266_MINI.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesserockz/athom-configs/d7e0b846be7361d3f721b8b9db44676d8490608d/ESP8266_MINI.bin -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Jesse Hills 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Athom ESPHome configurations 2 | 3 | This repository contains a bunch of ESPHome configurations for https://athom.tech devices. 4 | 5 | If you are prompted that there is not enough space, you should upgrade `ESP8266_MINI.bin` first 6 | 7 | - mini is a transit firmware, after running, it will generate a hotspot of "ESP_UPDATE_XXXXXX" 8 | - Connect to the hotspot and visit `http://192.168.4.1/update` in the browser 9 | - Upload updated ESPHome firmware 10 | 11 | # Migrating to Tasmota 12 | 13 | - Select firmware upgrade, upload `tasmota.bin.gz` and click Update, Please don't choose tasmota.bin!!! 14 | - Download Tasmota firmware here http://ota.tasmota.com/tasmota/release/tasmota.bin.gz 15 | 16 | # Migrating from Tasmota 17 | 18 | - First execute `SetOption78 1` in the console of Tasmota 19 | - Select firmware upgrade, upload `tasmota-minimal.bin` and click start upgrade 20 | - Select the firmware upgrade again, upload the firmware of ESPHome and click to start upgrade 21 | - Download ESPHome firmware here https://github.com/athom-tech/athom-configs/actions 22 | -------------------------------------------------------------------------------- /athom-cb02.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | device_name: "athom-cb02-switch" 3 | friendly_name: "Athom CB02 Switch" 4 | project_name: "athom.cb02-switch" 5 | project_version: "1.0" 6 | 7 | esphome: 8 | name: "${device_name}" 9 | name_add_mac_suffix: true 10 | project: 11 | name: "${project_name}" 12 | version: "${project_version}" 13 | 14 | esp8266: 15 | board: esp8285 16 | restore_from_flash: true 17 | 18 | api: 19 | 20 | ota: 21 | 22 | logger: 23 | 24 | web_server: 25 | port: 80 26 | 27 | wifi: 28 | ap: {} # This spawns an AP with the device name and mac address with no password. 29 | 30 | captive_portal: 31 | 32 | dashboard_import: 33 | package_import_url: github://athom-tech/athom-configs/athom-cb02.yaml 34 | 35 | binary_sensor: 36 | - platform: status 37 | name: "${friendly_name} Status" 38 | 39 | - platform: gpio 40 | pin: 41 | number: 3 42 | mode: INPUT_PULLUP 43 | inverted: true 44 | name: "${friendly_name} Power Button" 45 | disabled_by_default: true 46 | on_multi_click: 47 | - timing: 48 | - ON for at most 1s 49 | - OFF for at least 0.2s 50 | then: 51 | - switch.toggle: relay 52 | - timing: 53 | - ON for at least 4s 54 | then: 55 | - button.press: restart_button 56 | 57 | sensor: 58 | - platform: uptime 59 | name: "${friendly_name} Uptime" 60 | disabled_by_default: true 61 | 62 | button: 63 | - platform: restart 64 | id: restart_button 65 | name: "${friendly_name} Restart" 66 | 67 | switch: 68 | - platform: gpio 69 | name: "${friendly_name}" 70 | pin: GPIO13 71 | id: relay 72 | restore_mode: RESTORE_DEFAULT_ON 73 | on_turn_on: 74 | - light.turn_on: blue_led 75 | 76 | on_turn_off: 77 | - light.turn_off: blue_led 78 | 79 | light: 80 | - platform: status_led 81 | name: "${friendly_name} Status LED" 82 | id: blue_led 83 | disabled_by_default: true 84 | pin: 85 | inverted: true 86 | number: GPIO4 87 | 88 | text_sensor: 89 | - platform: wifi_info 90 | ip_address: 91 | name: "${friendly_name} IP Address" 92 | disabled_by_default: true 93 | -------------------------------------------------------------------------------- /athom-garage-door.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-garage-door" 3 | friendly_name: "Athom Garage Door" 4 | project_name: "athom.garage-door" 5 | project_version: "1.1" 6 | 7 | esphome: 8 | name: "${name}" 9 | name_add_mac_suffix: true 10 | project: 11 | name: "${project_name}" 12 | version: "${project_version}" 13 | 14 | esp8266: 15 | board: esp8285 16 | 17 | api: 18 | 19 | ota: 20 | 21 | logger: 22 | 23 | web_server: 24 | port: 80 25 | 26 | wifi: 27 | ap: {} # This spawns an AP with the device name and mac address with no password. 28 | 29 | captive_portal: 30 | 31 | dashboard_import: 32 | package_import_url: github://athom-tech/athom-configs/athom-garage-door.yaml 33 | 34 | sensor: 35 | - platform: uptime 36 | name: "${friendly_name} Uptime" 37 | disabled_by_default: true 38 | 39 | binary_sensor: 40 | - platform: status 41 | name: "${friendly_name} Status" 42 | 43 | - platform: gpio 44 | name: "${friendly_name} Contact" 45 | disabled_by_default: true 46 | device_class: garage_door 47 | id: contact 48 | pin: 49 | number: GPIO4 50 | inverted: true 51 | filters: 52 | - delayed_on: 20ms 53 | 54 | - platform: gpio 55 | pin: 56 | number: GPIO14 57 | mode: INPUT_PULLUP 58 | inverted: true 59 | name: "${friendly_name} Button" 60 | disabled_by_default: true 61 | on_multi_click: 62 | - timing: 63 | - ON for at most 1s 64 | - OFF for at least 0.2s 65 | then: 66 | - switch.turn_on: relay 67 | - timing: 68 | - ON for at least 4s 69 | then: 70 | - button.press: restart_button 71 | 72 | button: 73 | - platform: restart 74 | id: restart_button 75 | name: "${friendly_name} Restart" 76 | 77 | switch: 78 | - platform: gpio 79 | pin: GPIO5 80 | name: "${friendly_name} Relay" 81 | id: relay 82 | disabled_by_default: true 83 | on_turn_on: 84 | - light.turn_on: wifi_led 85 | - delay: 1s 86 | - switch.turn_off: relay 87 | - light.turn_off: wifi_led 88 | 89 | light: 90 | - platform: status_led 91 | name: "${friendly_name} Status LED" 92 | id: wifi_led 93 | disabled_by_default: true 94 | pin: GPIO12 95 | 96 | cover: 97 | - platform: template 98 | device_class: garage 99 | name: "${friendly_name}" 100 | lambda: "return id(contact).state ? COVER_OPEN : COVER_CLOSED;" 101 | open_action: 102 | then: 103 | - if: 104 | condition: 105 | lambda: 'return !id(contact).state;' 106 | then: 107 | - switch.turn_on: relay 108 | stop_action: 109 | - switch.turn_on: relay 110 | close_action: 111 | then: 112 | - if: 113 | condition: 114 | lambda: 'return id(contact).state;' 115 | then: 116 | - switch.turn_on: relay 117 | 118 | text_sensor: 119 | - platform: wifi_info 120 | ip_address: 121 | name: "${friendly_name} IP Address" 122 | disabled_by_default: true 123 | -------------------------------------------------------------------------------- /athom-ls-4p-3wire.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-ls-4p-3wire" 3 | friendly_name: "Athom LED Controller" 4 | project_name: "athom.ls-4p-3wire" 5 | project_version: "1.0" 6 | button_toggle: "true" 7 | led_restore_mode: RESTORE_DEFAULT_OFF 8 | number_of_leds: '150' 9 | led_rgb_order: GRB 10 | led_chipset: WS2811 11 | 12 | esphome: 13 | name: "${name}" 14 | name_add_mac_suffix: true 15 | project: 16 | name: "${project_name}" 17 | version: "${project_version}" 18 | 19 | esp8266: 20 | board: esp01_1m 21 | restore_from_flash: true 22 | framework: 23 | version: 2.7.4 24 | 25 | api: 26 | 27 | ota: 28 | 29 | logger: 30 | 31 | web_server: 32 | port: 80 33 | 34 | wifi: 35 | ap: {} # This spawns an AP with the device name and mac address with no password. 36 | 37 | captive_portal: 38 | 39 | dashboard_import: 40 | package_import_url: github://athom-tech/athom-configs/athom-ls-4p-3wire.yaml 41 | 42 | binary_sensor: 43 | - platform: status 44 | name: "${friendly_name} Status" 45 | 46 | - platform: gpio 47 | name: "${friendly_name} Button" 48 | pin: 49 | number: GPIO0 50 | inverted: true 51 | on_click: 52 | - if: 53 | condition: 54 | lambda: "return ${button_toggle} == true;" 55 | then: 56 | - light.toggle: leds 57 | 58 | sensor: 59 | - platform: uptime 60 | name: "${friendly_name} Uptime" 61 | 62 | button: 63 | - platform: restart 64 | id: restart_button 65 | name: "${friendly_name} Restart" 66 | 67 | power_supply: 68 | - id: relay 69 | pin: GPIO12 70 | 71 | light: 72 | - platform: fastled_clockless 73 | pin: GPIO1 74 | id: leds 75 | name: "${friendly_name}" 76 | power_supply: relay 77 | chipset: ${led_chipset} 78 | num_leds: ${number_of_leds} 79 | rgb_order: ${led_rgb_order} 80 | restore_mode: ${led_restore_mode} 81 | effects: 82 | - addressable_rainbow: 83 | - addressable_scan: 84 | 85 | text_sensor: 86 | - platform: wifi_info 87 | ip_address: 88 | name: "${friendly_name} IP Address" 89 | disabled_by_default: true 90 | -------------------------------------------------------------------------------- /athom-ls-4p-4wire.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-ls-4p-4wire" 3 | friendly_name: "Athom LED Controller" 4 | project_name: "athom.ls-4p-4wire" 5 | project_version: "1.0" 6 | button_toggle: "true" 7 | light_restore_mode: RESTORE_DEFAULT_OFF 8 | number_of_leds: '150' 9 | led_chipset: WS2801 10 | led_rgb_order: GRB 11 | 12 | esphome: 13 | name: "${name}" 14 | name_add_mac_suffix: true 15 | project: 16 | name: "${project_name}" 17 | version: "${project_version}" 18 | 19 | esp8266: 20 | board: esp01_1m 21 | restore_from_flash: true 22 | framework: 23 | version: 2.7.4 24 | 25 | api: 26 | 27 | ota: 28 | 29 | logger: 30 | 31 | web_server: 32 | port: 80 33 | 34 | wifi: 35 | ap: {} # This spawns an AP with the device name and mac address with no password. 36 | 37 | captive_portal: 38 | 39 | dashboard_import: 40 | package_import_url: github://athom-tech/athom-configs/athom-ls-4p-4wire.yaml 41 | 42 | binary_sensor: 43 | - platform: status 44 | name: "${friendly_name} Status" 45 | 46 | - platform: gpio 47 | name: "${friendly_name} Button" 48 | pin: 49 | number: GPIO0 50 | inverted: true 51 | on_click: 52 | - if: 53 | condition: 54 | lambda: "return ${button_toggle} == true;" 55 | then: 56 | - light.toggle: leds 57 | 58 | sensor: 59 | - platform: uptime 60 | name: "${friendly_name} Uptime" 61 | 62 | button: 63 | - platform: restart 64 | id: restart_button 65 | name: "${friendly_name} Restart" 66 | 67 | power_supply: 68 | - id: relay 69 | pin: GPIO12 70 | 71 | light: 72 | - platform: fastled_spi 73 | data_pin: GPIO1 74 | clock_pin: GPIO3 75 | id: leds 76 | name: "${friendly_name}" 77 | power_supply: relay 78 | chipset: ${led_chipset} 79 | num_leds: ${number_of_leds} 80 | rgb_order: ${led_rgb_order} 81 | restore_mode: ${light_restore_mode} 82 | effects: 83 | - addressable_rainbow: 84 | - addressable_scan: 85 | 86 | text_sensor: 87 | - platform: wifi_info 88 | ip_address: 89 | name: "${friendly_name} IP Address" 90 | disabled_by_default: true 91 | -------------------------------------------------------------------------------- /athom-mini-switch.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-mini-switch" 3 | friendly_name: "Athom Mini Switch" 4 | project_name: "athom.mini-switch" 5 | project_version: "1.0" 6 | light_restore_mode: RESTORE_DEFAULT_ON 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | api: 20 | 21 | ota: 22 | 23 | logger: 24 | 25 | web_server: 26 | port: 80 27 | 28 | wifi: 29 | ap: {} 30 | 31 | captive_portal: 32 | 33 | dashboard_import: 34 | package_import_url: github://athom-tech/athom-configs/athom-mini-switch.yaml 35 | 36 | button: 37 | - platform: restart 38 | id: restart_button 39 | name: "${friendly_name} Restart" 40 | 41 | output: 42 | - platform: gpio 43 | id: relay_output 44 | pin: GPIO13 45 | 46 | light: 47 | - platform: status_led 48 | name: "${friendly_name} Blue LED" 49 | disabled_by_default: true 50 | pin: 51 | number: GPIO4 52 | inverted: true 53 | 54 | - platform: binary 55 | id: mini_relay 56 | output: relay_output 57 | name: "${friendly_name} Light" 58 | restore_mode: ${light_restore_mode} 59 | 60 | sensor: 61 | - platform: uptime 62 | name: "${friendly_name} Uptime" 63 | disabled_by_default: true 64 | 65 | binary_sensor: 66 | # Wired switch 67 | - platform: gpio 68 | id: the_switch 69 | name: "${friendly_name} Power Switch" 70 | disabled_by_default: true 71 | pin: 72 | number: GPIO14 73 | mode: INPUT_PULLUP 74 | on_state: 75 | - light.toggle: mini_relay 76 | 77 | on_multi_click: 78 | - timing: 79 | - ON for at most 0.5s 80 | - OFF for at most 0.5s 81 | - ON for at most 0.5s 82 | - OFF for at most 0.5s 83 | - ON for at most 0.5s 84 | - OFF for at most 0.5s 85 | - ON for at most 0.5s 86 | - OFF for at most 0.5s 87 | then: 88 | - button.press: restart_button 89 | 90 | # Button on mini switch 91 | - platform: gpio 92 | pin: 93 | number: GPIO3 94 | mode: INPUT_PULLUP 95 | inverted: true 96 | name: "${friendly_name} Power Button" 97 | disabled_by_default: true 98 | on_multi_click: 99 | - timing: 100 | - ON for at most 1s 101 | - OFF for at least 0.2s 102 | then: 103 | - light.toggle: mini_relay 104 | - timing: 105 | - ON for at least 4s 106 | then: 107 | - button.press: restart_button 108 | 109 | - platform: status 110 | name: "${friendly_name} Status" 111 | 112 | text_sensor: 113 | - platform: wifi_info 114 | ip_address: 115 | name: "${friendly_name} IP Address" 116 | disabled_by_default: true 117 | -------------------------------------------------------------------------------- /athom-relay-board-x1.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-relay-board-x1" 3 | friendly_name: "Athom Relay Board x1" 4 | project_name: "athom.relay-board-x1" 5 | project_version: "1.0" 6 | relay_restore_mode: RESTORE_DEFAULT_OFF 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | api: 20 | 21 | ota: 22 | 23 | logger: 24 | 25 | web_server: 26 | port: 80 27 | 28 | wifi: 29 | ap: {} # This spawns an AP with the device name and mac address with no password. 30 | 31 | captive_portal: 32 | 33 | dashboard_import: 34 | package_import_url: github://athom-tech/athom-configs/athom-relay-board-x1.yaml 35 | 36 | binary_sensor: 37 | - platform: status 38 | name: "${friendly_name} Status" 39 | 40 | sensor: 41 | - platform: uptime 42 | name: "${friendly_name} Uptime" 43 | 44 | button: 45 | - platform: restart 46 | id: restart_button 47 | name: "${friendly_name} Restart" 48 | 49 | switch: 50 | # Relay 51 | - platform: gpio 52 | name: "${friendly_name}" 53 | pin: GPIO5 54 | id: relay1 55 | restore_mode: ${relay_restore_mode} 56 | 57 | light: 58 | - platform: status_led 59 | name: "${friendly_name} Status LED" 60 | disabled_by_default: true 61 | pin: 62 | inverted: true 63 | number: GPIO16 64 | 65 | text_sensor: 66 | - platform: wifi_info 67 | ip_address: 68 | name: "${friendly_name} IP Address" 69 | disabled_by_default: true 70 | -------------------------------------------------------------------------------- /athom-relay-board-x2.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-relay-board-x2" 3 | friendly_name: "Athom Relay Board x2" 4 | project_name: "athom.relay-board-x2" 5 | project_version: "1.0" 6 | relay1_restore_mode: RESTORE_DEFAULT_OFF 7 | relay2_restore_mode: RESTORE_DEFAULT_OFF 8 | 9 | esphome: 10 | name: "${name}" 11 | name_add_mac_suffix: true 12 | project: 13 | name: "${project_name}" 14 | version: "${project_version}" 15 | 16 | esp8266: 17 | board: esp8285 18 | restore_from_flash: true 19 | 20 | api: 21 | 22 | ota: 23 | 24 | logger: 25 | 26 | web_server: 27 | port: 80 28 | 29 | wifi: 30 | ap: {} # This spawns an AP with the device name and mac address with no password. 31 | 32 | captive_portal: 33 | 34 | dashboard_import: 35 | package_import_url: github://athom-tech/athom-configs/athom-relay-board-x2.yaml 36 | 37 | binary_sensor: 38 | - platform: status 39 | name: "${friendly_name} Status" 40 | 41 | sensor: 42 | - platform: uptime 43 | name: "${friendly_name} Uptime" 44 | 45 | button: 46 | - platform: restart 47 | id: restart_button 48 | name: "${friendly_name} Restart" 49 | 50 | switch: 51 | # Relay 52 | - platform: gpio 53 | name: "${friendly_name} - 1" 54 | pin: GPIO5 55 | id: relay1 56 | restore_mode: ${relay1_restore_mode} 57 | 58 | - platform: gpio 59 | name: "${friendly_name} - 2" 60 | pin: GPIO4 61 | id: relay2 62 | restore_mode: ${relay2_restore_mode} 63 | 64 | light: 65 | - platform: status_led 66 | name: "${friendly_name} Status LED" 67 | disabled_by_default: true 68 | pin: 69 | inverted: true 70 | number: GPIO16 71 | 72 | text_sensor: 73 | - platform: wifi_info 74 | ip_address: 75 | name: "${friendly_name} IP Address" 76 | disabled_by_default: true 77 | -------------------------------------------------------------------------------- /athom-relay-board-x4.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-relay-board-x4" 3 | friendly_name: "Athom Relay Board x4" 4 | project_name: "athom.relay-board-x4" 5 | project_version: "1.0" 6 | relay1_restore_mode: RESTORE_DEFAULT_OFF 7 | relay2_restore_mode: RESTORE_DEFAULT_OFF 8 | relay3_restore_mode: RESTORE_DEFAULT_OFF 9 | relay4_restore_mode: RESTORE_DEFAULT_OFF 10 | 11 | esphome: 12 | name: "${name}" 13 | name_add_mac_suffix: true 14 | project: 15 | name: "${project_name}" 16 | version: "${project_version}" 17 | 18 | esp8266: 19 | board: esp8285 20 | restore_from_flash: true 21 | 22 | api: 23 | 24 | ota: 25 | 26 | logger: 27 | 28 | web_server: 29 | port: 80 30 | 31 | wifi: 32 | ap: {} # This spawns an AP with the device name and mac address with no password. 33 | 34 | captive_portal: 35 | 36 | dashboard_import: 37 | package_import_url: github://athom-tech/athom-configs/athom-relay-board-x4.yaml 38 | 39 | binary_sensor: 40 | - platform: status 41 | name: "${friendly_name} Status" 42 | 43 | sensor: 44 | - platform: uptime 45 | name: "${friendly_name} Uptime" 46 | disabled_by_default: true 47 | 48 | button: 49 | - platform: restart 50 | id: restart_button 51 | name: "${friendly_name} Restart" 52 | 53 | switch: 54 | - platform: gpio 55 | name: "${friendly_name} - 1" 56 | pin: GPIO16 57 | id: relay1 58 | restore_mode: ${relay1_restore_mode} 59 | 60 | - platform: gpio 61 | name: "${friendly_name} - 2" 62 | pin: GPIO14 63 | id: relay2 64 | restore_mode: ${relay2_restore_mode} 65 | 66 | - platform: gpio 67 | name: "${friendly_name} - 3" 68 | pin: GPIO12 69 | id: relay3 70 | restore_mode: ${relay3_restore_mode} 71 | 72 | - platform: gpio 73 | name: "${friendly_name} - 4" 74 | pin: GPIO13 75 | id: relay4 76 | restore_mode: ${relay4_restore_mode} 77 | 78 | light: 79 | - platform: status_led 80 | name: "${friendly_name} Status LED" 81 | disabled_by_default: true 82 | pin: 83 | inverted: true 84 | number: GPIO5 85 | 86 | text_sensor: 87 | - platform: wifi_info 88 | ip_address: 89 | name: "${friendly_name} IP Address" 90 | disabled_by_default: true 91 | -------------------------------------------------------------------------------- /athom-relay-board-x8.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-relay-board-x8" 3 | friendly_name: "Athom Relay Board x8" 4 | project_name: "athom.relay-board-x8" 5 | project_version: "1.0" 6 | relay1_restore_mode: RESTORE_DEFAULT_OFF 7 | relay2_restore_mode: RESTORE_DEFAULT_OFF 8 | relay3_restore_mode: RESTORE_DEFAULT_OFF 9 | relay4_restore_mode: RESTORE_DEFAULT_OFF 10 | relay5_restore_mode: RESTORE_DEFAULT_OFF 11 | relay6_restore_mode: RESTORE_DEFAULT_OFF 12 | relay7_restore_mode: RESTORE_DEFAULT_OFF 13 | relay8_restore_mode: RESTORE_DEFAULT_OFF 14 | 15 | esphome: 16 | name: "${name}" 17 | name_add_mac_suffix: true 18 | project: 19 | name: "${project_name}" 20 | version: "${project_version}" 21 | 22 | esp8266: 23 | board: esp8285 24 | restore_from_flash: true 25 | 26 | api: 27 | 28 | ota: 29 | 30 | logger: 31 | 32 | web_server: 33 | port: 80 34 | 35 | wifi: 36 | ap: {} # This spawns an AP with the device name and mac address with no password. 37 | 38 | captive_portal: 39 | 40 | dashboard_import: 41 | package_import_url: github://athom-tech/athom-configs/athom-relay-board-x8.yaml 42 | 43 | binary_sensor: 44 | - platform: status 45 | name: "${friendly_name} Status" 46 | 47 | - platform: gpio 48 | name: "${friendly_name} IO2" 49 | disabled_by_default: true 50 | pin: 51 | number: GPIO2 52 | mode: INPUT_PULLUP 53 | inverted: true 54 | 55 | sensor: 56 | - platform: uptime 57 | name: "${friendly_name} Uptime" 58 | disabled_by_default: true 59 | 60 | button: 61 | - platform: restart 62 | id: restart_button 63 | name: "${friendly_name} Restart" 64 | 65 | switch: 66 | - platform: gpio 67 | name: "${friendly_name} - 1" 68 | pin: GPIO16 69 | id: relay1 70 | restore_mode: ${relay1_restore_mode} 71 | 72 | - platform: gpio 73 | name: "${friendly_name} - 2" 74 | pin: GPIO14 75 | id: relay2 76 | restore_mode: ${relay2_restore_mode} 77 | 78 | - platform: gpio 79 | name: "${friendly_name} - 3" 80 | pin: GPIO12 81 | id: relay3 82 | restore_mode: ${relay3_restore_mode} 83 | 84 | - platform: gpio 85 | name: "${friendly_name} - 4" 86 | pin: GPIO13 87 | id: relay4 88 | restore_mode: ${relay4_restore_mode} 89 | 90 | - platform: gpio 91 | name: "${friendly_name} - 5" 92 | pin: GPIO15 93 | id: relay5 94 | restore_mode: ${relay5_restore_mode} 95 | 96 | - platform: gpio 97 | name: "${friendly_name} - 6" 98 | pin: GPIO0 99 | id: relay6 100 | restore_mode: ${relay6_restore_mode} 101 | 102 | - platform: gpio 103 | name: "${friendly_name} - 7" 104 | pin: GPIO4 105 | id: relay7 106 | restore_mode: ${relay7_restore_mode} 107 | 108 | - platform: gpio 109 | name: "${friendly_name} - 8" 110 | pin: GPIO5 111 | id: relay8 112 | restore_mode: ${relay8_restore_mode} 113 | 114 | light: 115 | - platform: status_led 116 | name: "${friendly_name} Status LED" 117 | disabled_by_default: true 118 | pin: 119 | inverted: true 120 | number: GPIO2 121 | 122 | text_sensor: 123 | - platform: wifi_info 124 | ip_address: 125 | name: "${friendly_name} IP Address" 126 | disabled_by_default: true 127 | -------------------------------------------------------------------------------- /athom-rgb-light.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-rgb-light" 3 | friendly_name: "Athom RGB Light Strip" 4 | project_name: "athom.rgb-light" 5 | project_version: "1.0" 6 | light_restore_mode: RESTORE_DEFAULT_ON 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | api: 20 | 21 | ota: 22 | 23 | logger: 24 | 25 | web_server: 26 | port: 80 27 | 28 | wifi: 29 | ap: {} # This spawns an AP with the device name and mac address with no password. 30 | 31 | captive_portal: 32 | 33 | dashboard_import: 34 | package_import_url: github://athom-tech/athom-configs/athom-rgb-light.yaml 35 | 36 | binary_sensor: 37 | - platform: status 38 | name: "${friendly_name} Status" 39 | 40 | sensor: 41 | - platform: uptime 42 | name: "${friendly_name} Uptime" 43 | 44 | button: 45 | - platform: restart 46 | id: restart_button 47 | name: "${friendly_name} Restart" 48 | 49 | output: 50 | - platform: esp8266_pwm 51 | id: red_output 52 | pin: GPIO12 53 | - platform: esp8266_pwm 54 | id: green_output 55 | pin: GPIO4 56 | - platform: esp8266_pwm 57 | id: blue_output 58 | pin: GPIO14 59 | 60 | light: 61 | - platform: rgb 62 | name: "${friendly_name}" 63 | restore_mode: ${light_restore_mode} 64 | red: red_output 65 | green: green_output 66 | blue: blue_output 67 | 68 | text_sensor: 69 | - platform: wifi_info 70 | ip_address: 71 | name: "${friendly_name} IP Address" 72 | disabled_by_default: true 73 | -------------------------------------------------------------------------------- /athom-rgbct-light.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-rgbct-light" 3 | friendly_name: "Athom RGBCT Light" 4 | project_name: "athom.rgbct-light" 5 | project_version: "1.0" 6 | light_restore_mode: RESTORE_DEFAULT_ON 7 | color_interlock: 'true' 8 | 9 | esphome: 10 | name: "${name}" 11 | name_add_mac_suffix: true 12 | project: 13 | name: "${project_name}" 14 | version: "${project_version}" 15 | 16 | esp8266: 17 | board: esp8285 18 | restore_from_flash: true 19 | 20 | api: 21 | 22 | ota: 23 | 24 | logger: 25 | 26 | web_server: 27 | port: 80 28 | 29 | wifi: 30 | ap: {} # This spawns an AP with the device name and mac address with no password. 31 | 32 | captive_portal: 33 | 34 | dashboard_import: 35 | package_import_url: github://athom-tech/athom-configs/athom-rgbct-light.yaml 36 | 37 | binary_sensor: 38 | - platform: status 39 | name: "${friendly_name} Status" 40 | 41 | sensor: 42 | - platform: uptime 43 | name: "${friendly_name} Uptime" 44 | 45 | button: 46 | - platform: restart 47 | id: restart_button 48 | name: "${friendly_name} Restart" 49 | 50 | output: 51 | - platform: esp8266_pwm 52 | id: red_output 53 | pin: GPIO4 54 | - platform: esp8266_pwm 55 | id: green_output 56 | pin: GPIO12 57 | - platform: esp8266_pwm 58 | id: blue_output 59 | pin: GPIO14 60 | - platform: esp8266_pwm 61 | id: white_output 62 | pin: GPIO5 63 | - platform: esp8266_pwm 64 | id: ct_output 65 | inverted: true 66 | pin: GPIO13 67 | 68 | light: 69 | - platform: rgbct 70 | name: "${friendly_name}" 71 | restore_mode: ${light_restore_mode} 72 | red: red_output 73 | green: green_output 74 | blue: blue_output 75 | white_brightness: white_output 76 | color_temperature: ct_output 77 | cold_white_color_temperature: 153 mireds 78 | warm_white_color_temperature: 500 mireds 79 | color_interlock: ${color_interlock} 80 | 81 | text_sensor: 82 | - platform: wifi_info 83 | ip_address: 84 | name: "${friendly_name} IP Address" 85 | disabled_by_default: true 86 | -------------------------------------------------------------------------------- /athom-rgbw-light.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-rgbw-light" 3 | friendly_name: "Athom RGBW Light" 4 | project_name: "athom.rgbw-light" 5 | project_version: "1.0" 6 | button_toggle: "true" 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | platform: ESP8266 12 | board: esp8285 13 | project: 14 | name: "${project_name}" 15 | version: "${project_version}" 16 | 17 | api: 18 | 19 | ota: 20 | 21 | logger: 22 | 23 | mdns: 24 | disabled: false 25 | 26 | web_server: 27 | port: 80 28 | 29 | wifi: 30 | ap: {} # This spawns an AP with the device name and mac address with no password. 31 | 32 | captive_portal: 33 | 34 | dashboard_import: 35 | package_import_url: github://athom-tech/athom-configs/athom-rgbw-light.yaml 36 | 37 | binary_sensor: 38 | - platform: status 39 | name: "${friendly_name} Status" 40 | 41 | - platform: gpio 42 | name: "${friendly_name} Button" 43 | id: toggle_button 44 | pin: 45 | number: GPIO0 46 | mode: INPUT_PULLUP 47 | inverted: true 48 | on_click: 49 | - if: 50 | condition: 51 | lambda: "return ${button_toggle} == true;" 52 | then: 53 | - light.toggle: leds 54 | 55 | output: 56 | - platform: esp8266_pwm 57 | id: output_red 58 | pin: GPIO4 59 | 60 | - platform: esp8266_pwm 61 | id: output_green 62 | pin: GPIO12 63 | 64 | - platform: esp8266_pwm 65 | id: output_blue 66 | pin: GPIO14 67 | 68 | - platform: esp8266_pwm 69 | id: output_white 70 | pin: GPIO13 71 | 72 | light: 73 | - platform: rgbw 74 | name: "${friendly_name}" 75 | id: leds 76 | red: output_red 77 | green: output_green 78 | blue: output_blue 79 | white: output_white 80 | color_interlock: true 81 | sensor: 82 | - platform: uptime 83 | name: "${friendly_name} Uptime Sensor" 84 | 85 | text_sensor: 86 | - platform: wifi_info 87 | ip_address: 88 | name: "${friendly_name} IP Address" 89 | disabled_by_default: true -------------------------------------------------------------------------------- /athom-rgbww-light.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-rgbww-light" 3 | friendly_name: "Athom RGBWW Light" 4 | project_name: "athom.rgbww-light" 5 | project_version: "1.0" 6 | light_restore_mode: RESTORE_DEFAULT_ON 7 | color_interlock: 'true' 8 | 9 | esphome: 10 | name: "${name}" 11 | name_add_mac_suffix: true 12 | project: 13 | name: "${project_name}" 14 | version: "${project_version}" 15 | 16 | esp8266: 17 | board: esp8285 18 | restore_from_flash: true 19 | 20 | api: 21 | 22 | ota: 23 | 24 | logger: 25 | 26 | web_server: 27 | port: 80 28 | 29 | wifi: 30 | ap: {} # This spawns an AP with the device name and mac address with no password. 31 | 32 | captive_portal: 33 | 34 | dashboard_import: 35 | package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml 36 | 37 | binary_sensor: 38 | - platform: status 39 | name: "${friendly_name} Status" 40 | 41 | sensor: 42 | - platform: uptime 43 | name: "${friendly_name} Uptime" 44 | 45 | button: 46 | - platform: restart 47 | id: restart_button 48 | name: "${friendly_name} Restart" 49 | 50 | output: 51 | - platform: esp8266_pwm 52 | id: red_output 53 | pin: GPIO4 54 | - platform: esp8266_pwm 55 | id: green_output 56 | pin: GPIO12 57 | - platform: esp8266_pwm 58 | id: blue_output 59 | pin: GPIO14 60 | - platform: esp8266_pwm 61 | id: warm_white_output 62 | pin: GPIO13 63 | - platform: esp8266_pwm 64 | id: white_output 65 | pin: GPIO5 66 | 67 | 68 | light: 69 | - platform: rgbww 70 | name: "${friendly_name}" 71 | restore_mode: ${light_restore_mode} 72 | red: red_output 73 | green: green_output 74 | blue: blue_output 75 | warm_white: warm_white_output 76 | cold_white: white_output 77 | cold_white_color_temperature: 6000 K 78 | warm_white_color_temperature: 3000 K 79 | color_interlock: ${color_interlock} 80 | 81 | text_sensor: 82 | - platform: wifi_info 83 | ip_address: 84 | name: "${friendly_name} IP Address" 85 | disabled_by_default: true 86 | -------------------------------------------------------------------------------- /athom-smart-plug-v2.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | device_name: "athom-smart-plug-v2" 3 | friendly_name: "Athom Smart Plug V2" 4 | project_name: "athom.smart-plug-v2" 5 | project_version: "1.0" 6 | relay_restore_mode: RESTORE_DEFAULT_OFF 7 | 8 | esphome: 9 | name: "${device_name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | preferences: 20 | flash_write_interval: 3min 21 | 22 | api: 23 | 24 | ota: 25 | 26 | logger: 27 | baud_rate: 0 28 | 29 | mdns: 30 | disabled: false 31 | 32 | web_server: 33 | port: 80 34 | 35 | wifi: 36 | ap: {} # This spawns an AP with the device name and mac address with no password. 37 | 38 | captive_portal: 39 | 40 | dashboard_import: 41 | package_import_url: github://athom-tech/athom-configs/athom-smart-plug-v2.yaml 42 | 43 | uart: 44 | rx_pin: RX 45 | baud_rate: 4800 46 | 47 | binary_sensor: 48 | - platform: status 49 | name: "${friendly_name} Status" 50 | 51 | - platform: gpio 52 | pin: 53 | number: 5 54 | mode: INPUT_PULLUP 55 | inverted: true 56 | name: "${friendly_name} Power Button" 57 | disabled_by_default: true 58 | on_multi_click: 59 | - timing: 60 | - ON for at most 1s 61 | - OFF for at least 0.2s 62 | then: 63 | - switch.toggle: relay 64 | - timing: 65 | - ON for at least 4s 66 | then: 67 | - button.press: restart_button 68 | 69 | sensor: 70 | - platform: uptime 71 | name: "${friendly_name} Uptime Sensor" 72 | 73 | - platform: cse7766 74 | update_interval: 10s 75 | current: 76 | name: "${friendly_name} Current" 77 | filters: 78 | - lambda: if (x < 0.060) return 0; else return x; #For the chip will report less than 3w power when no load is connected 79 | 80 | voltage: 81 | name: "${friendly_name} Voltage" 82 | power: 83 | name: "${friendly_name} Power" 84 | id: power_sensor 85 | filters: 86 | - lambda: if (x < 3.0) return 0; else return x; #For the chip will report less than 3w power when no load is connected 87 | 88 | 89 | energy: 90 | name: "${friendly_name} Energy" 91 | unit_of_measurement: kWh 92 | filters: 93 | # Multiplication factor from W to kW is 0.001 94 | - multiply: 0.001 95 | 96 | 97 | - platform: total_daily_energy 98 | name: "${friendly_name} Total Daily Energy" 99 | restore: true 100 | power_id: power_sensor 101 | unit_of_measurement: kWh 102 | accuracy_decimals: 3 103 | filters: 104 | - multiply: 0.001 105 | 106 | 107 | button: 108 | - platform: restart 109 | id: restart_button 110 | name: "${friendly_name} Restart" 111 | 112 | switch: 113 | - platform: gpio 114 | name: "${friendly_name}" 115 | pin: GPIO12 116 | id: relay 117 | restore_mode: ${relay_restore_mode} 118 | 119 | light: 120 | - platform: status_led 121 | name: "${friendly_name} Status LED" 122 | id: blue_led 123 | disabled_by_default: true 124 | pin: 125 | inverted: true 126 | number: GPIO13 127 | 128 | time: 129 | - platform: sntp 130 | 131 | text_sensor: 132 | - platform: wifi_info 133 | ip_address: 134 | name: "${friendly_name} IP Address" 135 | disabled_by_default: true 136 | -------------------------------------------------------------------------------- /athom-smart-plug.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-smart-plug" 3 | friendly_name: "Athom Smart Plug" 4 | project_name: "athom.smart-plug" 5 | project_version: "1.0" 6 | relay_restore_mode: RESTORE_DEFAULT_OFF 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | api: 20 | 21 | ota: 22 | 23 | logger: 24 | 25 | web_server: 26 | port: 80 27 | 28 | wifi: 29 | ap: {} # This spawns an AP with the device name and mac address with no password. 30 | 31 | captive_portal: 32 | 33 | dashboard_import: 34 | package_import_url: github://athom-tech/athom-configs/athom-smart-plug.yaml 35 | 36 | binary_sensor: 37 | - platform: status 38 | name: "${friendly_name} Status" 39 | 40 | - platform: gpio 41 | pin: 42 | number: 3 43 | mode: INPUT_PULLUP 44 | inverted: true 45 | name: "${friendly_name} Power Button" 46 | disabled_by_default: true 47 | on_multi_click: 48 | - timing: 49 | - ON for at most 1s 50 | - OFF for at least 0.2s 51 | then: 52 | - switch.toggle: relay 53 | - timing: 54 | - ON for at least 4s 55 | then: 56 | - button.press: restart_button 57 | 58 | sensor: 59 | - platform: uptime 60 | name: "${friendly_name} Uptime" 61 | disabled_by_default: true 62 | 63 | - platform: hlw8012 64 | sel_pin: 65 | number: GPIO12 66 | inverted: True 67 | cf_pin: GPIO4 68 | cf1_pin: GPIO5 69 | voltage_divider: 780 70 | current: 71 | name: "${friendly_name} Current" 72 | filters: 73 | - calibrate_linear: 74 | - 0.0000 -> 0.0110 # Relay off no load 75 | - 0.0097 -> 0.0260 # Relay on no load 76 | - 0.9270 -> 0.7570 77 | - 2.0133 -> 1.6330 78 | - 2.9307 -> 2.3750 79 | - 5.4848 -> 4.4210 80 | - 8.4308 -> 6.8330 81 | - 9.9171 -> 7.9830 82 | # Normalize for plug load 83 | - lambda: if (x < 0.0260) return 0; else return (x - 0.0260); 84 | voltage: 85 | name: "${friendly_name} Voltage" 86 | 87 | power: 88 | name: "${friendly_name} Power" 89 | id: socket_my_power 90 | unit_of_measurement: W 91 | filters: 92 | - calibrate_linear: 93 | - 0.0000 -> 0.5900 # Relay off no load 94 | - 0.0000 -> 1.5600 # Relay on no load 95 | - 198.5129 -> 87.8300 96 | - 434.2469 -> 189.5000 97 | - 628.6241 -> 273.9000 98 | - 1067.0067 -> 460.1000 99 | - 1619.8098 -> 699.2000 100 | - 2043.0282 -> 885.0000 101 | # Normalize for plug load 102 | - lambda: if (x < 1.5600) return 0; else return (x - 1.5600); 103 | change_mode_every: 1 104 | update_interval: 5s 105 | 106 | - platform: total_daily_energy 107 | name: "${friendly_name} Total Energy" 108 | power_id: socket_my_power 109 | unit_of_measurement: kWh 110 | accuracy_decimals: 3 111 | restore: true 112 | min_save_interval: 180s 113 | filters: 114 | - multiply: 0.001 115 | 116 | 117 | button: 118 | - platform: restart 119 | id: restart_button 120 | name: "${friendly_name} Restart" 121 | 122 | switch: 123 | - platform: gpio 124 | name: "${friendly_name}" 125 | pin: GPIO14 126 | id: relay 127 | restore_mode: ${relay_restore_mode} 128 | on_turn_on: 129 | - light.turn_on: blue_led 130 | 131 | on_turn_off: 132 | - light.turn_off: blue_led 133 | 134 | light: 135 | - platform: status_led 136 | name: "${friendly_name} Status LED" 137 | id: blue_led 138 | disabled_by_default: true 139 | pin: 140 | inverted: true 141 | number: GPIO13 142 | 143 | time: 144 | - platform: sntp 145 | 146 | text_sensor: 147 | - platform: wifi_info 148 | ip_address: 149 | name: "${friendly_name} IP Address" 150 | disabled_by_default: true 151 | -------------------------------------------------------------------------------- /athom-sw01-v2.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-sw01-v2" 3 | friendly_name: "Athom SW01 V2" 4 | project_name: "athom.sw01-v2" 5 | project_version: "1.0" 6 | light_restore_mode: RESTORE_DEFAULT_OFF 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | api: 20 | 21 | ota: 22 | 23 | logger: 24 | baud_rate: 0 25 | 26 | web_server: 27 | port: 80 28 | 29 | wifi: 30 | ap: {} # This spawns an AP with the device name and mac address with no password. 31 | 32 | captive_portal: 33 | 34 | dashboard_import: 35 | package_import_url: github://athom-tech/athom-configs/athom-sw01-v2.yaml 36 | 37 | binary_sensor: 38 | - platform: status 39 | name: "${friendly_name} Status" 40 | 41 | # Touch Button 42 | - platform: gpio 43 | pin: 44 | inverted: true 45 | number: GPIO3 46 | name: "${friendly_name} Button" 47 | disabled_by_default: true 48 | on_multi_click: 49 | - timing: 50 | - ON for at most 0.5s 51 | - OFF for at least 0.2s 52 | then: 53 | - light.toggle: light1 54 | - timing: 55 | - ON for at least 4s 56 | then: 57 | - button.press: restart_button 58 | 59 | sensor: 60 | - platform: uptime 61 | name: "${friendly_name} Uptime" 62 | disabled_by_default: true 63 | 64 | button: 65 | - platform: restart 66 | id: restart_button 67 | name: "${friendly_name} Restart" 68 | 69 | output: 70 | # Relay 71 | - platform: gpio 72 | pin: GPIO13 73 | id: relay1 74 | 75 | # Button LED (1.0 = Blue / 0.0 = Red) 76 | - platform: esp8266_pwm 77 | pin: GPIO16 78 | inverted: true 79 | id: button_led1 80 | 81 | light: 82 | - platform: status_led 83 | name: "${friendly_name} Status LED" 84 | disabled_by_default: true 85 | pin: 86 | number: GPIO0 87 | inverted: true 88 | 89 | # Relay 90 | - platform: binary 91 | name: "${friendly_name} Light" 92 | id: light1 93 | output: relay1 94 | restore_mode: ${light_restore_mode} 95 | on_turn_on: 96 | - light.turn_on: led1 97 | on_turn_off: 98 | - light.turn_off: led1 99 | 100 | # Button LED 101 | - platform: monochromatic 102 | name: "${friendly_name} LED" 103 | disabled_by_default: true 104 | id: led1 105 | output: button_led1 106 | default_transition_length: 500ms 107 | 108 | text_sensor: 109 | - platform: wifi_info 110 | ip_address: 111 | name: "${friendly_name} IP Address" 112 | disabled_by_default: true 113 | -------------------------------------------------------------------------------- /athom-sw01.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-sw01" 3 | friendly_name: "Athom SW01" 4 | project_name: "athom.sw01" 5 | project_version: "1.0" 6 | light_restore_mode: RESTORE_DEFAULT_OFF 7 | 8 | esphome: 9 | name: "${name}" 10 | name_add_mac_suffix: true 11 | project: 12 | name: "${project_name}" 13 | version: "${project_version}" 14 | 15 | esp8266: 16 | board: esp8285 17 | restore_from_flash: true 18 | 19 | api: 20 | 21 | ota: 22 | 23 | logger: 24 | baud_rate: 0 25 | 26 | web_server: 27 | port: 80 28 | 29 | wifi: 30 | ap: {} # This spawns an AP with the device name and mac address with no password. 31 | 32 | captive_portal: 33 | 34 | dashboard_import: 35 | package_import_url: github://athom-tech/athom-configs/athom-sw01.yaml 36 | 37 | binary_sensor: 38 | - platform: status 39 | name: "${friendly_name} Status" 40 | 41 | # Touch Button 42 | - platform: gpio 43 | pin: 44 | inverted: true 45 | number: GPIO3 46 | name: "${friendly_name} Button" 47 | disabled_by_default: true 48 | on_multi_click: 49 | - timing: 50 | - ON for at most 0.5s 51 | - OFF for at least 0.2s 52 | then: 53 | - light.toggle: light1 54 | - timing: 55 | - ON for at least 4s 56 | then: 57 | - button.press: restart_button 58 | 59 | sensor: 60 | - platform: uptime 61 | name: "${friendly_name} Uptime" 62 | disabled_by_default: true 63 | 64 | button: 65 | - platform: restart 66 | id: restart_button 67 | name: "${friendly_name} Restart" 68 | 69 | output: 70 | # Relay 71 | - platform: gpio 72 | pin: GPIO13 73 | id: relay1 74 | 75 | # Button LED (1.0 = Blue / 0.0 = Red) 76 | - platform: esp8266_pwm 77 | pin: GPIO14 78 | inverted: true 79 | id: button_led1 80 | 81 | light: 82 | - platform: status_led 83 | name: "${friendly_name} Status LED" 84 | disabled_by_default: true 85 | pin: 86 | number: GPIO0 87 | inverted: true 88 | 89 | # Relay 90 | - platform: binary 91 | name: "${friendly_name} Light" 92 | id: light1 93 | output: relay1 94 | restore_mode: ${light_restore_mode} 95 | on_turn_on: 96 | - light.turn_on: led1 97 | on_turn_off: 98 | - light.turn_off: led1 99 | 100 | # Button LED 101 | - platform: monochromatic 102 | name: "${friendly_name} LED" 103 | disabled_by_default: true 104 | id: led1 105 | output: button_led1 106 | default_transition_length: 500ms 107 | 108 | text_sensor: 109 | - platform: wifi_info 110 | ip_address: 111 | name: "${friendly_name} IP Address" 112 | disabled_by_default: true 113 | -------------------------------------------------------------------------------- /athom-sw02-v2.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | device_name: "athom-sw02-v2" 3 | friendly_name: "Athom SW02 V2" 4 | project_name: "athom.sw02-v2" 5 | project_version: "1.0" 6 | light1_restore_mode: RESTORE_DEFAULT_OFF 7 | light2_restore_mode: RESTORE_DEFAULT_OFF 8 | 9 | esphome: 10 | name: "${device_name}" 11 | name_add_mac_suffix: true 12 | platform: ESP8266 13 | board: esp8285 14 | project: 15 | name: "${project_name}" 16 | version: "${project_version}" 17 | 18 | api: 19 | 20 | ota: 21 | 22 | logger: 23 | baud_rate: 0 24 | 25 | web_server: 26 | port: 80 27 | 28 | wifi: 29 | ap: {} # This spawns an AP with the device name and mac address with no password. 30 | 31 | captive_portal: 32 | 33 | dashboard_import: 34 | package_import_url: github://athom-tech/athom-configs/athom-sw02-v2.yaml 35 | 36 | binary_sensor: 37 | - platform: status 38 | name: "${friendly_name} Status" 39 | 40 | # Touch Buttons 41 | - platform: gpio 42 | pin: 43 | inverted: true 44 | number: GPIO3 45 | name: "${friendly_name} Button 1" 46 | disabled_by_default: true 47 | on_multi_click: 48 | - timing: 49 | - ON for at most 0.5s 50 | - OFF for at least 0.2s 51 | then: 52 | - light.toggle: light1 53 | - timing: 54 | - ON for at least 4s 55 | then: 56 | - switch.turn_on: restart_switch 57 | - platform: gpio 58 | pin: 59 | inverted: true 60 | number: GPIO5 61 | name: "${friendly_name} Button 2" 62 | disabled_by_default: true 63 | on_click: 64 | max_length: 0.5s 65 | then: 66 | - light.toggle: light2 67 | 68 | sensor: 69 | - platform: uptime 70 | name: "${friendly_name} Uptime Sensor" 71 | 72 | switch: 73 | - platform: restart 74 | id: restart_switch 75 | name: "${friendly_name} Restart" 76 | 77 | output: 78 | # Relays 79 | - platform: gpio 80 | pin: GPIO13 81 | id: relay1 82 | - platform: gpio 83 | pin: GPIO4 84 | id: relay2 85 | 86 | # - platform: gpio 87 | # pin: GPIO16 88 | # id: io16 89 | 90 | # Button LEDs (1.0 = Blue / 0.0 = Red) 91 | - platform: esp8266_pwm 92 | pin: GPIO16 93 | inverted: true 94 | id: led1 95 | - platform: esp8266_pwm 96 | pin: GPIO1 97 | inverted: true 98 | id: led2 99 | 100 | light: 101 | - platform: status_led 102 | name: "${friendly_name} Wifi LED" 103 | disabled_by_default: true 104 | pin: 105 | number: GPIO0 106 | inverted: true 107 | 108 | # Relays 109 | - platform: binary 110 | name: "${friendly_name} Light 1" 111 | id: light1 112 | output: relay1 113 | restore_mode: ${light1_restore_mode} 114 | 115 | on_turn_on: 116 | - light.turn_on: light3 117 | on_turn_off: 118 | - light.turn_off: light3 119 | - platform: binary 120 | name: "${friendly_name} Light 2" 121 | id: light2 122 | output: relay2 123 | restore_mode: ${light2_restore_mode} 124 | 125 | on_turn_on: 126 | - light.turn_on: light4 127 | on_turn_off: 128 | - light.turn_off: light4 129 | 130 | # Button LEDs 131 | - platform: monochromatic 132 | name: "${friendly_name} LED1" 133 | disabled_by_default: true 134 | id: light3 135 | output: led1 136 | default_transition_length: 500ms 137 | - platform: monochromatic 138 | name: "${friendly_name} LED2" 139 | disabled_by_default: true 140 | id: light4 141 | output: led2 142 | default_transition_length: 500ms 143 | 144 | text_sensor: 145 | - platform: wifi_info 146 | ip_address: 147 | name: "${friendly_name} IP Address" 148 | disabled_by_default: true 149 | -------------------------------------------------------------------------------- /athom-sw02.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-sw02" 3 | friendly_name: "Athom SW02" 4 | project_name: "athom.sw02" 5 | project_version: "1.0" 6 | light1_restore_mode: RESTORE_DEFAULT_OFF 7 | light2_restore_mode: RESTORE_DEFAULT_OFF 8 | 9 | esphome: 10 | name: "${name}" 11 | name_add_mac_suffix: true 12 | project: 13 | name: "${project_name}" 14 | version: "${project_version}" 15 | 16 | esp8266: 17 | board: esp8285 18 | restore_from_flash: true 19 | 20 | api: 21 | 22 | ota: 23 | 24 | logger: 25 | baud_rate: 0 26 | 27 | web_server: 28 | port: 80 29 | 30 | wifi: 31 | ap: {} # This spawns an AP with the device name and mac address with no password. 32 | 33 | captive_portal: 34 | 35 | dashboard_import: 36 | package_import_url: github://athom-tech/athom-configs/athom-sw02.yaml 37 | 38 | binary_sensor: 39 | - platform: status 40 | name: "${friendly_name} Status" 41 | 42 | # Touch Buttons 43 | - platform: gpio 44 | pin: 45 | inverted: true 46 | number: GPIO3 47 | name: "${friendly_name} Button 1" 48 | disabled_by_default: true 49 | on_multi_click: 50 | - timing: 51 | - ON for at most 0.5s 52 | - OFF for at least 0.2s 53 | then: 54 | - light.toggle: light1 55 | - timing: 56 | - ON for at least 4s 57 | then: 58 | - button.press: restart_button 59 | - platform: gpio 60 | pin: 61 | inverted: true 62 | number: GPIO5 63 | name: "${friendly_name} Button 2" 64 | disabled_by_default: true 65 | on_click: 66 | max_length: 0.5s 67 | then: 68 | - light.toggle: light2 69 | 70 | sensor: 71 | - platform: uptime 72 | name: "${friendly_name} Uptime" 73 | disabled_by_default: true 74 | 75 | button: 76 | - platform: restart 77 | id: restart_button 78 | name: "${friendly_name} Restart" 79 | 80 | output: 81 | # Relays 82 | - platform: gpio 83 | pin: GPIO13 84 | id: relay1 85 | - platform: gpio 86 | pin: GPIO4 87 | id: relay2 88 | 89 | # Button LEDs (1.0 = Blue / 0.0 = Red) 90 | - platform: esp8266_pwm 91 | pin: GPIO14 92 | inverted: true 93 | id: led1 94 | - platform: esp8266_pwm 95 | pin: GPIO1 96 | inverted: true 97 | id: led2 98 | 99 | light: 100 | - platform: status_led 101 | name: "${friendly_name} Status LED" 102 | disabled_by_default: true 103 | pin: 104 | number: GPIO0 105 | inverted: true 106 | 107 | # Relays 108 | - platform: binary 109 | name: "${friendly_name} Light 1" 110 | id: light1 111 | output: relay1 112 | restore_mode: ${light1_restore_mode} 113 | on_turn_on: 114 | - light.turn_on: light3 115 | on_turn_off: 116 | - light.turn_off: light3 117 | - platform: binary 118 | name: "${friendly_name} Light 2" 119 | id: light2 120 | output: relay2 121 | restore_mode: ${light2_restore_mode} 122 | on_turn_on: 123 | - light.turn_on: light4 124 | on_turn_off: 125 | - light.turn_off: light4 126 | 127 | # Button LEDs 128 | - platform: monochromatic 129 | name: "${friendly_name} LED1" 130 | disabled_by_default: true 131 | id: light3 132 | output: led1 133 | default_transition_length: 500ms 134 | - platform: monochromatic 135 | name: "${friendly_name} LED2" 136 | disabled_by_default: true 137 | id: light4 138 | output: led2 139 | default_transition_length: 500ms 140 | 141 | text_sensor: 142 | - platform: wifi_info 143 | ip_address: 144 | name: "${friendly_name} IP Address" 145 | disabled_by_default: true 146 | -------------------------------------------------------------------------------- /athom-sw03.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-sw03" 3 | friendly_name: "Athom SW03" 4 | project_name: "athom.sw03" 5 | project_version: "1.0" 6 | light1_restore_mode: RESTORE_DEFAULT_OFF 7 | light2_restore_mode: RESTORE_DEFAULT_OFF 8 | light3_restore_mode: RESTORE_DEFAULT_OFF 9 | 10 | esphome: 11 | name: "${name}" 12 | name_add_mac_suffix: true 13 | project: 14 | name: "${project_name}" 15 | version: "${project_version}" 16 | 17 | esp8266: 18 | board: esp8285 19 | restore_from_flash: true 20 | 21 | api: 22 | 23 | ota: 24 | 25 | logger: 26 | baud_rate: 0 27 | 28 | web_server: 29 | port: 80 30 | 31 | wifi: 32 | ap: {} # This spawns an AP with the device name and mac address with no password. 33 | 34 | captive_portal: 35 | 36 | dashboard_import: 37 | package_import_url: github://athom-tech/athom-configs/athom-sw03.yaml 38 | 39 | binary_sensor: 40 | - platform: status 41 | name: "${friendly_name} Status" 42 | 43 | # Touch Buttons 44 | - platform: gpio 45 | pin: 46 | inverted: true 47 | number: GPIO12 48 | name: "${friendly_name} Button 1" 49 | disabled_by_default: true 50 | on_multi_click: 51 | - timing: 52 | - ON for at most 0.5s 53 | - OFF for at least 0.2s 54 | then: 55 | - light.toggle: light1 56 | - timing: 57 | - ON for at least 4s 58 | then: 59 | - button.press: restart_button 60 | - platform: gpio 61 | pin: 62 | inverted: true 63 | number: GPIO3 64 | name: "${friendly_name} Button 2" 65 | disabled_by_default: true 66 | on_click: 67 | max_length: 0.5s 68 | then: 69 | - light.toggle: light2 70 | - platform: gpio 71 | pin: 72 | inverted: true 73 | number: GPIO5 74 | name: "${friendly_name} Button 3" 75 | disabled_by_default: true 76 | on_click: 77 | max_length: 0.5s 78 | then: 79 | - light.toggle: light3 80 | 81 | sensor: 82 | - platform: uptime 83 | name: "${friendly_name} Uptime" 84 | disabled_by_default: true 85 | 86 | button: 87 | - platform: restart 88 | id: restart_button 89 | name: "${friendly_name} Restart" 90 | 91 | output: 92 | # Relays 93 | - platform: gpio 94 | pin: GPIO13 95 | id: relay1 96 | - platform: gpio 97 | pin: GPIO4 98 | id: relay2 99 | - platform: gpio 100 | pin: GPIO15 101 | id: relay3 102 | 103 | # Button LEDs (1.0 = Blue / 0.0 = Red) 104 | - platform: esp8266_pwm 105 | pin: GPIO16 106 | inverted: true 107 | id: button_led1 108 | - platform: esp8266_pwm 109 | pin: GPIO14 110 | inverted: true 111 | id: button_led2 112 | - platform: esp8266_pwm 113 | pin: GPIO1 114 | inverted: true 115 | id: button_led3 116 | 117 | light: 118 | - platform: status_led 119 | name: "${friendly_name} Status LED" 120 | disabled_by_default: true 121 | pin: 122 | number: GPIO0 123 | inverted: true 124 | 125 | # Relays 126 | - platform: binary 127 | name: "${friendly_name} Light 1" 128 | id: light1 129 | output: relay1 130 | restore_mode: ${light1_restore_mode} 131 | on_turn_on: 132 | - light.turn_on: led1 133 | on_turn_off: 134 | - light.turn_off: led1 135 | - platform: binary 136 | name: "${friendly_name} Light 2" 137 | id: light2 138 | output: relay2 139 | restore_mode: ${light2_restore_mode} 140 | on_turn_on: 141 | - light.turn_on: led2 142 | on_turn_off: 143 | - light.turn_off: led2 144 | - platform: binary 145 | name: "${friendly_name} Light 3" 146 | id: light3 147 | output: relay3 148 | restore_mode: ${light3_restore_mode} 149 | on_turn_on: 150 | - light.turn_on: led3 151 | on_turn_off: 152 | - light.turn_off: led3 153 | 154 | # Button LEDs 155 | - platform: monochromatic 156 | name: "${friendly_name} LED1" 157 | disabled_by_default: true 158 | id: led1 159 | output: button_led1 160 | default_transition_length: 500ms 161 | - platform: monochromatic 162 | name: "${friendly_name} LED2" 163 | disabled_by_default: true 164 | id: led2 165 | output: button_led2 166 | default_transition_length: 500ms 167 | - platform: monochromatic 168 | name: "${friendly_name} LED3" 169 | disabled_by_default: true 170 | id: led3 171 | output: button_led3 172 | default_transition_length: 500ms 173 | 174 | 175 | text_sensor: 176 | - platform: wifi_info 177 | ip_address: 178 | name: "${friendly_name} IP Address" 179 | disabled_by_default: true 180 | -------------------------------------------------------------------------------- /athom-sw04.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-sw04" 3 | friendly_name: "Athom SW04" 4 | project_name: "athom.sw04" 5 | project_version: "1.0" 6 | light1_restore_mode: RESTORE_DEFAULT_OFF 7 | light2_restore_mode: RESTORE_DEFAULT_OFF 8 | light3_restore_mode: RESTORE_DEFAULT_OFF 9 | light4_restore_mode: RESTORE_DEFAULT_OFF 10 | 11 | esphome: 12 | name: "${name}" 13 | name_add_mac_suffix: true 14 | project: 15 | name: "${project_name}" 16 | version: "${project_version}" 17 | 18 | esp8266: 19 | board: esp8285 20 | restore_from_flash: true 21 | 22 | api: 23 | 24 | ota: 25 | 26 | logger: 27 | baud_rate: 0 28 | 29 | web_server: 30 | port: 80 31 | 32 | wifi: 33 | ap: {} # This spawns an AP with the device name and mac address with no password. 34 | 35 | captive_portal: 36 | 37 | dashboard_import: 38 | package_import_url: github://athom-tech/athom-configs/athom-sw04.yaml 39 | 40 | binary_sensor: 41 | - platform: status 42 | name: "${friendly_name} Status" 43 | 44 | # Touch Buttons 45 | - platform: gpio 46 | pin: 47 | inverted: true 48 | number: GPIO12 49 | name: "${friendly_name} Button 1" 50 | disabled_by_default: true 51 | on_multi_click: 52 | - timing: 53 | - ON for at most 0.5s 54 | - OFF for at least 0.2s 55 | then: 56 | - light.toggle: light1 57 | - timing: 58 | - ON for at least 4s 59 | then: 60 | - button.press: restart_button 61 | - platform: gpio 62 | pin: 63 | inverted: true 64 | number: GPIO3 65 | name: "${friendly_name} Button 2" 66 | disabled_by_default: true 67 | on_click: 68 | max_length: 0.5s 69 | then: 70 | - light.toggle: light2 71 | - platform: gpio 72 | pin: 73 | inverted: true 74 | number: GPIO5 75 | name: "${friendly_name} Button 3" 76 | disabled_by_default: true 77 | on_click: 78 | max_length: 0.5s 79 | then: 80 | - light.toggle: light3 81 | - platform: gpio 82 | pin: 83 | inverted: true 84 | number: GPIO16 85 | name: "${friendly_name} Button 4" 86 | disabled_by_default: true 87 | on_click: 88 | max_length: 0.5s 89 | then: 90 | - light.toggle: light4 91 | 92 | sensor: 93 | - platform: uptime 94 | name: "${friendly_name} Uptime" 95 | 96 | button: 97 | - platform: restart 98 | id: restart_button 99 | name: "${friendly_name} Restart" 100 | 101 | output: 102 | # Relays 103 | - platform: gpio 104 | pin: GPIO13 105 | id: relay1 106 | - platform: gpio 107 | pin: GPIO4 108 | id: relay2 109 | - platform: gpio 110 | pin: GPIO15 111 | id: relay3 112 | - platform: gpio 113 | pin: GPIO14 114 | id: relay4 115 | 116 | light: 117 | - platform: status_led 118 | name: "${friendly_name} Status LED" 119 | disabled_by_default: true 120 | pin: 121 | number: GPIO0 122 | inverted: true 123 | 124 | # Relays 125 | - platform: binary 126 | name: "${friendly_name} Light 1" 127 | id: light1 128 | output: relay1 129 | restore_mode: ${light1_restore_mode} 130 | - platform: binary 131 | name: "${friendly_name} Light 2" 132 | id: light2 133 | output: relay2 134 | restore_mode: ${light2_restore_mode} 135 | - platform: binary 136 | name: "${friendly_name} Light 3" 137 | id: light3 138 | output: relay3 139 | restore_mode: ${light3_restore_mode} 140 | - platform: binary 141 | name: "${friendly_name} Light 4" 142 | id: light4 143 | output: relay4 144 | restore_mode: ${light4_restore_mode} 145 | 146 | text_sensor: 147 | - platform: wifi_info 148 | ip_address: 149 | name: "${friendly_name} IP Address" 150 | disabled_by_default: true 151 | -------------------------------------------------------------------------------- /athom-ws2812b.yaml: -------------------------------------------------------------------------------- 1 | substitutions: 2 | name: "athom-ws2812b" 3 | friendly_name: "Athom WS2812B" 4 | project_name: "athom.ws2812b" 5 | project_version: "1.0" 6 | button_toggle: "true" 7 | led_restore_mode: RESTORE_DEFAULT_OFF 8 | number_of_leds: '150' 9 | led_rgb_order: GRB 10 | led_chipset: WS2811 11 | 12 | esphome: 13 | name: "${name}" 14 | name_add_mac_suffix: true 15 | project: 16 | name: "${project_name}" 17 | version: "${project_version}" 18 | 19 | esp8266: 20 | board: esp01_1m 21 | restore_from_flash: true 22 | framework: 23 | version: 2.7.4 24 | 25 | api: 26 | 27 | ota: 28 | 29 | logger: 30 | 31 | web_server: 32 | port: 80 33 | 34 | wifi: 35 | ap: {} # This spawns an AP with the device name and mac address with no password. 36 | 37 | captive_portal: 38 | 39 | dashboard_import: 40 | package_import_url: github://athom-tech/athom-configs/athom-ws2812b.yaml 41 | 42 | binary_sensor: 43 | - platform: status 44 | name: "${friendly_name} Status" 45 | 46 | - platform: gpio 47 | name: "${friendly_name} Button" 48 | pin: 49 | number: GPIO0 50 | inverted: true 51 | on_click: 52 | - if: 53 | condition: 54 | lambda: "return ${button_toggle} == true;" 55 | then: 56 | - light.toggle: leds 57 | 58 | sensor: 59 | - platform: uptime 60 | name: "${friendly_name} Uptime" 61 | 62 | button: 63 | - platform: restart 64 | id: restart_button 65 | name: "${friendly_name} Restart" 66 | 67 | light: 68 | - platform: fastled_clockless 69 | pin: GPIO1 70 | id: leds 71 | name: "${friendly_name}" 72 | chipset: ${led_chipset} 73 | num_leds: ${number_of_leds} 74 | rgb_order: ${led_rgb_order} 75 | restore_mode: ${led_restore_mode} 76 | effects: 77 | - addressable_rainbow: 78 | - addressable_scan: 79 | 80 | text_sensor: 81 | - platform: wifi_info 82 | ip_address: 83 | name: "${friendly_name} IP Address" 84 | disabled_by_default: true 85 | -------------------------------------------------------------------------------- /tasmota-minimal.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jesserockz/athom-configs/d7e0b846be7361d3f721b8b9db44676d8490608d/tasmota-minimal.bin --------------------------------------------------------------------------------