Memory optimization & external components

Helps with #1686
- This is deprecating Relay local fallback switches (replaced by globals) to save memory.
- Using reboot timeout from ESPHome instead of custom engine
- Do not change page is already there.
- Use of external components to streamline some repetitive code
- API always transfer colors in RGB array to keep consistency
This commit is contained in:
Edward Firmo
2024-02-22 23:19:34 +01:00
parent dc12a64724
commit 01005b5863
17 changed files with 939 additions and 472 deletions

View File

@@ -24,7 +24,7 @@ external_components:
packages:
core_package: !include ../esphome/nspanel_esphome_core.yaml
upload_tft_package: !include ../esphome/nspanel_esphome_addon_upload_tft.yaml
#upload_tft_package: !include ../esphome/nspanel_esphome_addon_upload_tft.yaml
api:
services:
@@ -93,18 +93,18 @@ script:
static const char *const TAG = "prebuilt.script.watchdog";
ESP_LOGI(TAG, "Pre-built version: ${pre_built}");
select:
- id: !extend tft_file_model
platform: template
options:
- "NSPanel Blank"
- "NSPanel EU"
- "NSPanel US"
- "NSPanel US Landscape"
- "NSPanel EU (CJK languages)"
- "NSPanel US (CJK languages)"
- "NSPanel US Landscape (CJK languages)"
initial_option: "NSPanel Blank"
#select:
# - id: !extend tft_file_model
# platform: template
# options:
# - "NSPanel Blank"
# - "NSPanel EU"
# - "NSPanel US"
# - "NSPanel US Landscape"
# - "NSPanel EU (CJK languages)"
# - "NSPanel US (CJK languages)"
# - "NSPanel US Landscape (CJK languages)"
# initial_option: "NSPanel Blank"
text_sensor:
- id: firmware_url
@@ -114,11 +114,10 @@ text_sensor:
internal: true
icon: mdi:cloud-download
web_server:
id: web_server_std
auth: !remove
web_server: !remove
wifi:
networks: !remove
ap: {}
power_save_mode: LIGHT # To make it compatible with BLE
...