Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同步 #14

Merged
merged 185 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
a43c14b
Merge pull request #5 from athom-tech/main
tarontop Apr 27, 2022
27fa73a
Revert "merge"
tarontop Apr 27, 2022
cd2f732
Merge pull request #6 from tarontop/revert-5-main
tarontop Apr 27, 2022
e041786
Merge branch 'main' into test
tarontop Apr 27, 2022
ef4630b
Merge pull request #7 from athom-tech/test
tarontop Apr 27, 2022
f2d4000
Delete athom-sw02.bin
tarontop Apr 27, 2022
0e4c043
Update athom-smart-plug-v2.yaml
tarontop Aug 4, 2022
76ae899
Update athom-smart-plug.yaml
tarontop Aug 4, 2022
31b8a8e
Update athom-smart-plug-v2.yaml
tarontop Aug 7, 2022
17eb22e
Update athom-smart-plug-v2.yaml
tarontop Aug 7, 2022
311392c
Update athom-smart-plug-v2.yaml
tarontop Aug 7, 2022
c1a8b56
Update athom-smart-plug-v2.yaml
tarontop Aug 7, 2022
6535fd8
Update athom-smart-plug.yaml
tarontop Aug 9, 2022
65e9ecd
Update athom-smart-plug-v2.yaml
tarontop Aug 9, 2022
00e737e
Update athom-smart-plug-v2.yaml
tarontop Aug 9, 2022
0335fab
Update athom-smart-plug-v2.yaml
IainPHay Aug 17, 2022
a92c9d4
Update athom-smart-plug.yaml
IainPHay Aug 17, 2022
b01e6f4
Merge pull request #21 from IainPHay/patch-9
tarontop Aug 18, 2022
2438c3f
Merge pull request #20 from IainPHay/patch-8
tarontop Aug 18, 2022
428c4a9
Add factory reset button
tarontop Oct 10, 2022
e288272
Add factory reset button
tarontop Oct 10, 2022
b1fcca5
Add factory reset button
tarontop Oct 10, 2022
05db1ec
Add factory reset button
tarontop Oct 10, 2022
3e91aa5
Add factory reset button
tarontop Oct 10, 2022
769dc28
Add factory reset button
tarontop Oct 10, 2022
cfd62d4
Add factory reset button
tarontop Oct 10, 2022
83888fe
Add factory reset button
tarontop Oct 10, 2022
01192e9
Add factory reset button
tarontop Oct 10, 2022
b0d51bc
Update athom-sw01-v2.yaml
tarontop Oct 10, 2022
d08c902
Add factory reset button
tarontop Oct 10, 2022
fc38983
Add factory reset button
tarontop Oct 10, 2022
751fd6d
Add factory reset button
tarontop Oct 10, 2022
a198d26
Add factory reset button
tarontop Oct 10, 2022
64ba007
Add factory reset button
tarontop Oct 10, 2022
5239a4d
Update athom-mini-switch.yaml
tarontop Oct 10, 2022
6e419c2
Update athom-cb02.yaml
tarontop Oct 10, 2022
ed32043
Update athom-smart-plug-v2.yaml
tarontop Oct 10, 2022
913a7c2
Update athom-sw01-v2.yaml
tarontop Oct 10, 2022
7d2421e
Update athom-sw01.yaml
tarontop Oct 10, 2022
c429dbc
Update athom-sw02-v2.yaml
tarontop Oct 10, 2022
05e0b4c
Update athom-sw02.yaml
tarontop Oct 10, 2022
f470733
Update athom-sw03.yaml
tarontop Oct 10, 2022
7ce3f8b
Update athom-sw04.yaml
tarontop Oct 10, 2022
3bde87f
Update athom-cb02.yaml
tarontop Oct 10, 2022
0b53442
Update athom-smart-plug-v2.yaml
tarontop Oct 10, 2022
e2ec93b
Update athom-sw02-v2.yaml
tarontop Oct 10, 2022
bc468b0
Add factory reset button
tarontop Oct 11, 2022
075f5ca
Add factory reset button
tarontop Oct 11, 2022
b49d5e5
Update athom-ws2812b.yaml
tarontop Oct 11, 2022
de157f0
Add factory reset button
tarontop Oct 11, 2022
e417d5a
Update athom-ls-4p-3wire.yaml
tarontop Oct 11, 2022
096a8ba
Update athom-ls-4p-4wire.yaml
tarontop Oct 11, 2022
3a0b66a
Add factory reset button
tarontop Oct 11, 2022
713b863
Update ci.yml
tarontop Oct 11, 2022
11d617f
Update build.yml
tarontop Oct 11, 2022
1e3f6e3
Add factory reset button
tarontop Oct 13, 2022
cd93af6
Add factory reset button
tarontop Oct 13, 2022
be2dc21
Update athom-ls-4p-3wire.yaml
tarontop Oct 14, 2022
7efe25a
Delete tasmota-minimal.bin
tarontop Oct 21, 2022
1808e45
Upload tasmota-minimal.bin.gz
tarontop Oct 21, 2022
8436e26
Update README.md
tarontop Oct 21, 2022
967f5a3
Add logic to properly check for garage state
tarontop Oct 28, 2022
0a05abc
Add total energy sensor
Bert-R Nov 22, 2022
468a03e
Add device class energy
Bert-R Nov 22, 2022
a31b03d
Add continuous fastboot reset device
tarontop Nov 23, 2022
62b9667
modify id
tarontop Nov 23, 2022
f661574
Update athom-rgbct-light.yaml
tarontop Nov 23, 2022
d9488d7
Add continuous fastboot reset device
tarontop Nov 23, 2022
bc28f5e
Update athom-rgbww-light.yaml
tarontop Nov 23, 2022
9fe8ccf
Merge pull request #22 from Bert-R/add-total-energy
tarontop Nov 23, 2022
43e8cb3
Create picture
tarontop Nov 23, 2022
107267f
Delete picture
tarontop Nov 23, 2022
1d5efc7
Add files via upload
tarontop Nov 23, 2022
02bfcee
Add files via upload
tarontop Nov 23, 2022
3ed2dfa
Delete picture directory
tarontop Nov 23, 2022
9b02e37
Add files via upload
tarontop Nov 23, 2022
4b89b4c
Delete images directory
tarontop Nov 23, 2022
038665d
Add images
tarontop Nov 23, 2022
479ee27
Delete images directory
tarontop Nov 23, 2022
0276e43
Add images
tarontop Nov 23, 2022
4642e02
Delete Athom_2Gang_Key_Swtich.png
tarontop Nov 23, 2022
06699ab
Add files via upload
tarontop Nov 23, 2022
8233167
Add files via upload
tarontop Nov 23, 2022
7a464b4
Add files via upload
tarontop Nov 23, 2022
25fed2d
Update README.md
tarontop Nov 23, 2022
6a3c9bd
Update README.md
tarontop Nov 23, 2022
ed0b905
Update README.md
tarontop Nov 23, 2022
cacbd47
Update README.md
tarontop Nov 23, 2022
280da89
Update README.md
tarontop Nov 23, 2022
14e230c
Enable internal pull-up
tarontop Dec 30, 2022
136d2e9
Enable internal pull-up
tarontop Dec 30, 2022
c5d7b6a
Enable internal pull-up
tarontop Dec 30, 2022
3863c85
Enable internal pull-up
tarontop Dec 30, 2022
cbdc028
Enable internal pull-up
tarontop Dec 30, 2022
c8c8914
Enable internal pull-up
tarontop Dec 30, 2022
0af45d1
Update athom-sw04.yaml
tarontop Dec 30, 2022
6619eba
Update athom-rgbww-light.yaml
Jan 19, 2023
6f70a2a
Merge pull request #23 from hankins1984/patch-1
tarontop Jan 22, 2023
f0bdadd
Update action.yml
tarontop Feb 2, 2023
6ce0cea
Update action.yml
tarontop Feb 2, 2023
b3607bc
Update build.yml
tarontop Feb 2, 2023
69af128
Update ci.yml
tarontop Feb 2, 2023
884da2a
Update action.yml
tarontop Feb 2, 2023
3ff5861
Update action.yml
tarontop Feb 2, 2023
96dd2f1
Don't turn off the lights at very low brightness values
mikeage Feb 6, 2023
96c986e
Merge pull request #24 from mikeage/fix_home_assistant_rgbct
tarontop Feb 6, 2023
8334255
Add a wall outlet
tarontop Feb 7, 2023
62e2a91
Add a wall outlet
tarontop Feb 7, 2023
f8300b3
Update ci.yml
tarontop Feb 7, 2023
a7e8ef9
Update build.yml
tarontop Feb 7, 2023
3526337
Merge branch 'main' into main
tarontop Feb 7, 2023
60cca1c
Merge pull request #9 from athom-tech/main
tarontop Feb 7, 2023
9dcfe3e
Update ci.yml
tarontop Feb 7, 2023
09396f4
Update README.md
tarontop Feb 7, 2023
7f6a7b6
Update ci.yml
tarontop Feb 7, 2023
ab76339
remove friendly_name
tarontop Mar 22, 2023
e306eb6
Modify friendly_name
tarontop Mar 23, 2023
477e47f
Merge pull request #10 from athom-tech/main
tarontop Mar 23, 2023
efc2034
Update athom-garage-door.yaml
tarontop Mar 24, 2023
f3c6f53
Update athom-sw04.yaml
tarontop Mar 24, 2023
7258569
Create athom-ls-4p-4wire.yaml
tarontop Mar 24, 2023
2d5e9da
Update athom-ls-4p-4wire.yaml
tarontop Mar 24, 2023
b64c0de
Modify friendly_name
tarontop Mar 24, 2023
a9edab3
Merge branch 'development' of https://github.com/athom-tech/athom-con…
tarontop Mar 24, 2023
1c1fd5b
Update athom-smart-plug-v2.yaml
tarontop Mar 25, 2023
9f83f2c
Update README.md
tarontop Mar 27, 2023
274bea7
Merge pull request #11 from athom-tech/development
tarontop Apr 1, 2023
66d7478
Update README.md
tarontop Apr 15, 2023
23fbe97
Update README.md
tarontop May 3, 2023
ea7716a
add human presence sensor
tarontop May 26, 2023
c588621
Update athom-presence-sensor.yaml
tarontop May 26, 2023
8751553
Update athom-presence-sensor.yaml
tarontop May 27, 2023
8487aac
Update athom-presence-sensor.yaml
tarontop May 27, 2023
cee1b29
Update athom-presence-sensor.yaml
tarontop May 27, 2023
ea2b1b3
Update athom-presence-sensor.yaml
tarontop May 27, 2023
bf15ea3
Update athom-presence-sensor.yaml
tarontop May 27, 2023
319f009
Delete athom-presence-sensor.yaml
tarontop May 27, 2023
2db8232
Add files via upload
tarontop May 27, 2023
10ab29b
Update athom-presence-sensor.yaml
tarontop May 29, 2023
4f70577
Update athom-presence-sensor.yaml
tarontop May 29, 2023
af8cffb
Add human presence sensor
tarontop Jun 1, 2023
98b3a1b
Update build.yml
tarontop Jun 1, 2023
fee7dc9
Update ci.yml
tarontop Jun 1, 2023
c2adaa5
Add Human Presence Sensor
tarontop Jun 19, 2023
05db18d
Add Human Presence Sensor
tarontop Jun 19, 2023
69a809c
Update README.md
tarontop Jun 19, 2023
2bf3567
Update README.md
tarontop Jul 7, 2023
2df6c3e
Merge branch 'main' into main
tarontop Jul 14, 2023
92576cb
Merge pull request #12 from athom-tech/main
tarontop Jul 14, 2023
2ed4e71
restore_state has been replaced by restore_mode
tarontop Jul 20, 2023
e549106
Fix save configuration after hard reboot for athom-presence-sensor
Jul 24, 2023
ff3d935
Merge pull request #30 from myakove/athom-presence-sensor
tarontop Jul 27, 2023
906da64
Add WiFi signal sensor to all devices
megascrapper Aug 9, 2023
34d9bf2
Merge pull request #31 from megascrapper/wifi-signal-sensor
tarontop Aug 11, 2023
b9b3136
add led
tarontop Aug 28, 2023
c21d991
Update athom-smart-plug-v2.yaml
tarontop Sep 11, 2023
14deed5
Update athom-smart-plug-v2.yaml
tarontop Sep 11, 2023
600ddf2
Update README.md
tarontop Sep 13, 2023
7fae7c1
Merge branch 'main' into test
tarontop Sep 27, 2023
ca48131
Update athom-presence-sensor.yaml
tarontop Sep 27, 2023
140b662
Merge pull request #13 from athom-tech/test
tarontop Sep 27, 2023
e9d1218
Update README.md
tarontop Jan 17, 2024
c3a81d8
Update athom-smart-plug-v2.yaml
Metus88 Feb 17, 2024
1069a76
Replace deprecated update_interval sensor config with throttle filter
dmakovec Feb 22, 2024
c02746c
Merge pull request #38 from dmakovec/main
tarontop Feb 23, 2024
a6a8101
Merge pull request #34 from Metus88/patch-1
tarontop Feb 23, 2024
8c6bb18
Update athom-smart-plug-v2.yaml
dexn Feb 23, 2024
192ea65
Update athom-smart-plug-v2.yaml
Roving-Ronin Feb 24, 2024
0b49ab1
Update athom-smart-plug-v2.yaml
Roving-Ronin Feb 24, 2024
89dad8f
Merge pull request #40 from Roving-Ronin/main
tarontop Feb 24, 2024
425db7f
Merge pull request #39 from dexn/main
tarontop Feb 24, 2024
054a605
Fix CSE7766 Breaking change in esphome 2024.2, swap update_interval f…
makerwolf Feb 24, 2024
8eed0c2
add sensor_update_interval substitution for easy configuration
makerwolf Feb 24, 2024
3a4c3e8
Merge pull request #41 from makerwolf1/Fix_walloutlet_CSE7766
tarontop Feb 26, 2024
babced1
Update athom-smart-plug.yaml
tarontop Feb 27, 2024
7cfc141
Update athom-smart-plug-v2.yaml
Roving-Ronin Mar 2, 2024
aa1b02e
Update athom-smart-plug-v2.yaml
Roving-Ronin Mar 2, 2024
ee3efe3
Update athom-smart-plug-v2.yaml
dexn Mar 7, 2024
ac14b8f
Merge pull request #42 from Roving-Ronin/Roving-Ronin-patch-1
tarontop Mar 7, 2024
eedc0e1
Update athom-smart-plug-v2.yaml
tarontop Mar 7, 2024
f52ad72
Merge branch 'main' into main
tarontop Mar 7, 2024
ac1f130
Merge pull request #43 from dexn/main
tarontop Mar 7, 2024
93f2a7d
Reverted "WiFi Strength" %,
tarontop Mar 7, 2024
9478d38
Change update interval to 5 minutes to reduce flash memory wear
tarontop Mar 8, 2024
9b811a3
Merge branch 'main' into main
tarontop Mar 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ runs:
esphome_version=$(esphome version)
esphome_version=$(echo $esphome_version | cut -d " " -f 2)

echo "::set-output name=name::$name"
echo "::set-output name=version::$version"
echo "::set-output name=devicename::$devicename"
echo "::set-output name=esphome_version::$esphome_version"
echo "name=$name" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
echo "devicename=$devicename" >> $GITHUB_OUTPUT
echo "esphome_version=$esphome_version" >> $GITHUB_OUTPUT


- name: Compile ${{ inputs.device }}
Expand All @@ -42,7 +42,7 @@ runs:
./${{ steps.info.outputs.name }}--${{ steps.info.outputs.version }}.bin

- name: Upload binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Athom Binaries (${{ steps.info.outputs.esphome_version }})
path: ./${{ steps.info.outputs.name }}--${{ steps.info.outputs.version }}.bin
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- rgb-light
- rgbww-light
- rgbct-light
- rgbw-light
- garage-door
- ws2812b
- mini-switch
Expand All @@ -25,6 +26,7 @@ jobs:
- relay-board-x8
- smart-plug
- smart-plug-v2
- wall-outlet
- sw01
- sw01-v2
- sw02
Expand All @@ -34,6 +36,7 @@ jobs:
- cb02
- ls-4p-3wire
- ls-4p-4wire
- presence-sensor
esphome:
- latest
- beta
Expand All @@ -42,7 +45,7 @@ jobs:
container: ghcr.io/esphome/esphome:${{ matrix.esphome }}
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3.2.0
- uses: ./.github/actions/build
with:
device: ${{ matrix.device }}
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- rgb-light
- rgbww-light
- rgbct-light
- rgbw-light
- garage-door
- ws2812b
- mini-switch
Expand All @@ -23,6 +24,7 @@ jobs:
- relay-board-x8
- smart-plug
- smart-plug-v2
- wall-outlet
- sw01
- sw01-v2
- sw02
Expand All @@ -32,9 +34,10 @@ jobs:
- cb02
- ls-4p-3wire
- ls-4p-4wire
- presence-sensor
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3.2.0
- uses: esphome/build-action@v1.1.0
id: esphome-build
with:
Expand Down
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Athom ESPHome configurations
# Only applicable to ESP8285,[Please click for ESP32 devices](https://github.com/athom-tech/esp32-configs)

### Athom ESPHome configurations

This repository contains a bunch of ESPHome configurations for https://athom.tech devices.

Expand All @@ -8,14 +10,35 @@ If you are prompted that there is not enough space, you should upgrade `ESP8266_
- Connect to the hotspot and visit `http://192.168.4.1/update` in the browser
- Upload updated ESPHome firmware

# Migrating to Tasmota
### Migrating to Tasmota

- Select firmware upgrade, upload `tasmota.bin.gz` and click Update, Please don't choose tasmota.bin!!!
- Select firmware upgrade, upload `tasmota.bin.gz` and click Update, ***Please don't choose `tasmota.bin`***
- Download Tasmota firmware here http://ota.tasmota.com/tasmota/release/tasmota.bin.gz

# Migrating from Tasmota
### Migrating from Tasmota

- First execute `SetOption78 1` in the console of Tasmota
- Select firmware upgrade, upload `tasmota-minimal.bin` and click start upgrade
- Select firmware upgrade, upload `tasmota-minimal.bin.gz` and click start upgrade
- Select the firmware upgrade again, upload the firmware of ESPHome and click to start upgrade
- Download ESPHome firmware here https://github.com/athom-tech/athom-configs/actions

### Device List
device|picture|file name|notice
:---:|:---:|:---:|:---:
Athom_Plug_V2|<img src="/images/Athom_EU_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_US_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_UK_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_BR_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_AU_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_IL_Plug_V2.png" width="50%" height="20%"><img src="/images/Athom_IT_Plug_V2.png" width="50%" height="20%">|athom-smart-plug-v2.yaml
Athom_Wall_Outlet|<img src="/images/Athom_Wall_Outlet.png" width="50%" height="20%">|athom-wall-outlet.yaml
Athom_1Gang_Switch|<img src="/images/Athom_1Gang_Touch_Switch.png" width="50%" height="20%"><img src="/images/Athom_1Gang_Key_Switch.png" width="50%" height="20%"><img src="/images/Athom_1Gang_US_Switch.png" width="50%" height="20%">|athom-sw01.yaml
Athom_2Gang_Switch|<img src="/images/Athom_2Gang_Touch_Switch.png" width="50%" height="20%"><img src="/images/Athom_2Gang_Key_Switch.png" width="50%" height="20%">|athom-sw02.yaml
Athom_3Gang_Switch|<img src="/images/Athom_3Gang_Touch_Switch.png" width="50%" height="20%"><img src="/images/Athom_3Gang_Key_Switch.png" width="50%" height="20%">|athom-sw03.yaml
Athom_4Gang_Switch|<img src="/images/Athom_4Gang_Touch_Swtich.png" width="50%" height="20%">|athom-sw04.yaml
Athom_7W_Bulb<br/>Athom_GU10_Bulb|<img src="/images/Athom_7w_Bulb.png" width="50%" height="20%"><img src="/images/Athom_GU10_Bulb.png" width="50%" height="20%">|athom-rgbww-light.yaml
Athom_15W_Bulb|<img src="/images/Athom_15w_Bulb.png" width="50%" height="20%">|athom-rgbct-light.yaml
Athom_12W_Bulb|<img src="/images/Athom_BR30_Bulb.png" width="50%" height="20%">|athom-rgbct-light.yaml|<h4>Temporarily discontinued</h4>
Athom_RGB_Controller|<img src="/images/Athom_RGB_Controller.png" width="50%" height="20%">|athom-rgb-light.yaml
Athom_Addressable_Light_Strip_Controller|<img src="/images/Athom_3Pin_Controller.png" width="50%" height="20%">|athom-ws2812b.yaml
Athom_High_Power_RGBW_Light_Strip_Controller|<img src="/images/Athom_RGBW_Controller.png" width="50%" height="20%">|athom-rgbw-light.yaml
Athom_High_Power_Addressable_Light_Strip_Controller|<img src="/images/Athom_4Pin_Controller.png" width="50%" height="20%">|athom-ls-4p-3wire.yaml
Athom_Mini_Switch|<img src="/images/Athom_Mini_Relay.png" width="50%" height="20%">|athom-mini-switch.yaml
Athom_CB02_Switch|<img src="/images/Athom_CB02.png" width="50%" height="20%">|athom-cb02.yaml
Athom_Presence_Sensor|<img src="/images/Athom_Presence_Sensor.png" width="50%" height="40%">|athom-presence-sensor.yaml
Athom_Garage_Door_Opener|<img src="/images/Athom_Garage_Door_Opener.png" width="50%" height="20%">|athom-garage-door.yaml
Athom_Plug|<img src="/images/Athom_EU_Plug.png" width="50%" height="20%"><img src="/images/Athom_UK_Plug.png" width="50%" height="20%">|athom-smart-plug.yaml|<h4>Discontinued</h4>
54 changes: 38 additions & 16 deletions athom-cb02.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
substitutions:
device_name: "athom-cb02-switch"
friendly_name: "Athom CB02 Switch"
project_name: "athom.cb02-switch"
project_version: "1.0"
project_name: "Athom Technology.Switch Module"
project_version: "1.1"
relay_restore_mode: RESTORE_DEFAULT_OFF

esphome:
name: "${device_name}"
friendly_name: ""
name_add_mac_suffix: true
project:
name: "${project_name}"
Expand All @@ -15,12 +16,18 @@ esp8266:
board: esp8285
restore_from_flash: true

preferences:
flash_write_interval: 1min

api:

ota:

logger:

mdns:
disabled: false

web_server:
port: 80

Expand All @@ -34,14 +41,14 @@ dashboard_import:

binary_sensor:
- platform: status
name: "${friendly_name} Status"
name: "Status"

- platform: gpio
pin:
number: 3
mode: INPUT_PULLUP
inverted: true
name: "${friendly_name} Power Button"
name: "Power Button"
disabled_by_default: true
on_multi_click:
- timing:
Expand All @@ -52,24 +59,31 @@ binary_sensor:
- timing:
- ON for at least 4s
then:
- button.press: restart_button
- button.press: Reset

sensor:
- platform: uptime
name: "${friendly_name} Uptime"
disabled_by_default: true
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

button:
- platform: restart
id: restart_button
name: "${friendly_name} Restart"
- platform: factory_reset
name: "Reset"
id: Reset

- platform: safe_mode
name: "Safe Mode"
internal: false

switch:
- platform: gpio
name: "${friendly_name}"
name: "Relay"
pin: GPIO13
id: relay
restore_mode: RESTORE_DEFAULT_ON
restore_mode: ${relay_restore_mode}
on_turn_on:
- light.turn_on: blue_led

Expand All @@ -78,7 +92,7 @@ switch:

light:
- platform: status_led
name: "${friendly_name} Status LED"
name: "Status LED"
id: blue_led
disabled_by_default: true
pin:
Expand All @@ -88,5 +102,13 @@ light:
text_sensor:
- platform: wifi_info
ip_address:
name: "${friendly_name} IP Address"
disabled_by_default: true
name: "IP Address"
ssid:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time

75 changes: 47 additions & 28 deletions athom-garage-door.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
substitutions:
name: "athom-garage-door"
friendly_name: "Athom Garage Door"
project_name: "athom.garage-door"
project_version: "1.1"
device_name: "athom-garage-door"
project_name: "Athom Technology.Garage Door Opener"
project_version: "1.2"


esphome:
name: "${name}"
name: "${device_name}"
friendly_name: ""
name_add_mac_suffix: true
project:
name: "${project_name}"
Expand All @@ -20,6 +21,10 @@ ota:

logger:


mdns:
disabled: false

web_server:
port: 80

Expand All @@ -33,15 +38,18 @@ dashboard_import:

sensor:
- platform: uptime
name: "${friendly_name} Uptime"
disabled_by_default: true
name: "Uptime Sensor"

- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s

binary_sensor:
- platform: status
name: "${friendly_name} Status"
name: "Status"

- platform: gpio
name: "${friendly_name} Contact"
name: "Contact"
disabled_by_default: true
device_class: garage_door
id: contact
Expand All @@ -56,7 +64,7 @@ binary_sensor:
number: GPIO14
mode: INPUT_PULLUP
inverted: true
name: "${friendly_name} Button"
name: "Button"
disabled_by_default: true
on_multi_click:
- timing:
Expand All @@ -67,17 +75,21 @@ binary_sensor:
- timing:
- ON for at least 4s
then:
- button.press: restart_button
- button.press: Reset

button:
- platform: restart
id: restart_button
name: "${friendly_name} Restart"
- platform: factory_reset
name: "Reset"
id: Reset

- platform: safe_mode
name: "Safe Mode"
internal: false

switch:
- platform: gpio
pin: GPIO5
name: "${friendly_name} Relay"
name: "Relay"
id: relay
disabled_by_default: true
on_turn_on:
Expand All @@ -88,35 +100,42 @@ switch:

light:
- platform: status_led
name: "${friendly_name} Status LED"
name: "Status LED"
id: wifi_led
disabled_by_default: true
pin: GPIO12

cover:
- platform: template
device_class: garage
name: "${friendly_name}"
name: "Garage Door"
lambda: "return id(contact).state ? COVER_OPEN : COVER_CLOSED;"
open_action:
then:
- if:
condition:
lambda: 'return !id(contact).state;'
then:
- if:
condition:
lambda: 'return !id(contact).state;'
then:
- switch.turn_on: relay
stop_action:
- switch.turn_on: relay
close_action:
then:
- if:
condition:
lambda: 'return id(contact).state;'
then:
- switch.turn_on: relay
- if:
condition:
lambda: 'return id(contact).state;'
then:
- switch.turn_on: relay

text_sensor:
- platform: wifi_info
ip_address:
name: "${friendly_name} IP Address"
disabled_by_default: true
name: "IP Address"
ssid:
name: "Connected SSID"
mac_address:
name: "Mac Address"

time:
- platform: sntp
id: sntp_time
Loading
Loading