From b92d6d459aa99122c79c1fd9d2379ff403f364a4 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Wed, 11 Oct 2023 11:40:04 +0200 Subject: [PATCH] ESPHome pre-built binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a pre-built binary for users with trouble compiling with ESPHome or users who donĀ“t wanna play with ESPHome at all. --- .github/workflows/build_esphome.yml | 3 +++ ReleaseNotes.md | 6 ++++++ docs/en/prebuilt.md | 15 +++++++++++++++ nspanel_blueprint.yaml | 1 + nspanel_esphome_prebuilt.yaml | 27 +++++++++++++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 .github/workflows/build_esphome.yml create mode 100644 docs/en/prebuilt.md create mode 100644 nspanel_esphome_prebuilt.yaml diff --git a/.github/workflows/build_esphome.yml b/.github/workflows/build_esphome.yml new file mode 100644 index 0000000..dcb9207 --- /dev/null +++ b/.github/workflows/build_esphome.yml @@ -0,0 +1,3 @@ +uses: esphome/build-action@v1 +with: + yaml_file: nspanel_esphome_prebuilt.yaml \ No newline at end of file diff --git a/ReleaseNotes.md b/ReleaseNotes.md index cd14e2b..8852e9c 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -63,6 +63,7 @@ packages: ## Overview of all changes 1. New Upload TFT engine 2. Smaller TFT file size +3. Pre-built binary   ## Details of all changes @@ -81,6 +82,11 @@ The TFT files are now 15 to 20% smaller when compared to the previous version. T | notification
confirm | bt_accept
bt_clear | | fan | button_up
button_down
button_on
button_off | +### 3. Pre-built binary +As this project grows, it also grows the needs for resources from your ESPHome compiller, and version 4.0 revealed some cases where we are getting very close to this limit. +In this release, we're excited to introduce a pre-built binary version of our firmware. Designed for ease of use, this pre-compiled edition eliminates the need for users to manually build the ESPHome part from the source code You can just transfer the firmware to your panel, onboard it to your Home Assistant and Wi-Fi and use it. +Please refer to [this document](\docs\en\prebuilt.md) for details on how to use this option. +   ## Next topics we are currently working on See here: https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap diff --git a/docs/en/prebuilt.md b/docs/en/prebuilt.md new file mode 100644 index 0000000..2133569 --- /dev/null +++ b/docs/en/prebuilt.md @@ -0,0 +1,15 @@ +# Pre-built binary + +## What is it + +## When to use this + +## How to install + +### New users + +### Upgrade from a previous version + +## How to upload a TFT file + + diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 94fb8b8..d6e4394 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -3566,6 +3566,7 @@ trace: trigger_variables: nspanel_deviceid: !input 'nspanel_name' nspanel_entities: '{{ device_entities(nspanel_deviceid) }}' + #nspanel_name: '{{ device_attr(nspanel_deviceid, "name") | replace("-","_") | replace(" ","_") | replace("___","_") | replace("___","_") | replace("__","_") | replace("__","_") | lower }}' nspanel_name: > {% if nspanel_entities | count > 0 %}{{ (nspanel_entities | selectattr(None, "search", "_nextion_display") | list | first).split(".")[1].split("_nextion_display")[0] }} {% elif nspanel_deviceid is string %}{{ nspanel_deviceid | replace("-","_") | replace(" ","_") | replace("___","_") | replace("__","_") }} diff --git a/nspanel_esphome_prebuilt.yaml b/nspanel_esphome_prebuilt.yaml new file mode 100644 index 0000000..a05a89f --- /dev/null +++ b/nspanel_esphome_prebuilt.yaml @@ -0,0 +1,27 @@ +substitutions: + device_name: nspanel + nextion_update_url: "http://homeassistant.local:8123/local/nspanel/dev/nspanel_us_land.tft" + +packages: + remote_package: + url: https://github.com/Blackymas/NSPanel_HA_Blueprint + ref: dev + files: + - nspanel_esphome.yaml # Core package only + refresh: 300s + +esphome: + name_add_mac_suffix: true + project: + name: esphome.NSPanel_HA_Blueprint + version: "4.1dev3" + +dashboard_import: + package_import_url: github://Blackymas/NSPanel_HA_Blueprint/nspanel_esphome_prebuilt.yaml@dev # Must be updated + import_full_config: false + +captive_portal: + +button: + - id: !extend tft_update + internal: true