-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from ApolloAutomation/Smol
Reduce Firmware Size During ESPHome Addon Import
- Loading branch information
Showing
6 changed files
with
136 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
esphome: | ||
name: "apollo-plt-1b-minimal" | ||
friendly_name: Apollo PLT-1B Minimal | ||
comment: Apollo PLT-1B Minimal | ||
name_add_mac_suffix: true | ||
platformio_options: | ||
board_build.flash_mode: dio | ||
|
||
project: | ||
name: "ApolloAutomation.PLT-1B_Minimal" | ||
version: "${version}" | ||
|
||
min_version: 2024.2.0 | ||
on_boot: | ||
- priority: 999.0 | ||
then: | ||
- lambda: |- | ||
id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 60 * 1000); | ||
id(deep_sleep_1).set_run_duration(90 * 1000); | ||
- if: | ||
condition: | ||
or: | ||
- binary_sensor.is_on: ota_mode | ||
- switch.is_on: prevent_sleep | ||
then: | ||
- lambda: |- | ||
ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); | ||
id(deep_sleep_1).prevent_deep_sleep(); | ||
- priority: -10 | ||
then: | ||
- if: | ||
condition: | ||
- lambda: "return id(runTest);" | ||
then: | ||
- lambda: "id(testScript).execute();" | ||
|
||
on_shutdown: | ||
- light.turn_off: rgb_light | ||
- switch.turn_off: accessory_power | ||
|
||
dashboard_import: | ||
package_import_url: github://ApolloAutomation/PLT-1/Integrations/ESPHome/PLT-1B_Minimal.yaml | ||
import_full_config: false | ||
|
||
improv_serial: | ||
|
||
ota: | ||
- platform: esphome | ||
id: ota_esphome | ||
|
||
web_server: | ||
port: 80 | ||
|
||
wifi: | ||
ap: | ||
ssid: "Apollo PLT1B Hotspot" | ||
|
||
logger: | ||
|
||
packages: | ||
core: !include Core.yaml | ||
battery: !include Battery.yaml |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
esphome: | ||
name: "apollo-plt-1-minimal" | ||
friendly_name: Apollo PLT-1 Minimal | ||
comment: Apollo PLT-1 Minimal | ||
name_add_mac_suffix: true | ||
platformio_options: | ||
board_build.flash_mode: dio | ||
|
||
project: | ||
name: "ApolloAutomation.PLT-1_Minimal" | ||
version: "${version}" | ||
|
||
min_version: 2024.2.0 | ||
on_boot: | ||
- priority: 800.0 | ||
then: | ||
- lambda: |- | ||
id(deep_sleep_1).set_sleep_duration(id(deep_sleep_sleep_duration).state * 60 * 1000); | ||
id(deep_sleep_1).set_run_duration(90 * 1000); | ||
- if: | ||
condition: | ||
or: | ||
- binary_sensor.is_on: ota_mode | ||
- switch.is_on: prevent_sleep | ||
then: | ||
- lambda: |- | ||
ESP_LOGW("Apollo", "Preventing Deep Sleep Due To OTA On Boot"); | ||
id(deep_sleep_1).prevent_deep_sleep(); | ||
- priority: -10 | ||
then: | ||
- if: | ||
condition: | ||
- lambda: "return id(runTest);" | ||
then: | ||
- lambda: "id(testScript).execute();" | ||
|
||
on_shutdown: | ||
- light.turn_off: rgb_light | ||
|
||
dashboard_import: | ||
package_import_url: github://ApolloAutomation/PLT-1/Integrations/ESPHome/PLT-1_Minimal.yaml | ||
import_full_config: false | ||
|
||
improv_serial: | ||
|
||
ota: | ||
- platform: esphome | ||
id: ota_esphome | ||
|
||
web_server: | ||
port: 80 | ||
|
||
wifi: | ||
ap: | ||
ssid: "Apollo PLT1 Hotspot" | ||
|
||
logger: | ||
|
||
packages: | ||
core: !include Core.yaml | ||
nonbattery: !include NonBattery.yaml | ||
|