Skip to content

Commit

Permalink
Merge pull request #2368 from Blackymas/beta
Browse files Browse the repository at this point in the history
v4.3.12 - Hotfix for Incorrect Timezone Calculation Issues
  • Loading branch information
edwardtfn authored Nov 4, 2024
2 parents e146b1f + 2f016d1 commit 0c0be2d
Show file tree
Hide file tree
Showing 40 changed files with 119 additions and 94 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/validate_esphome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,30 @@ jobs:
name: Prebuilt Firmware
runs-on: ubuntu-latest
needs: code_scan
if: github.ref == 'refs/heads/dev' || github.base_ref == 'dev'
if: contains(github.ref, 'dev') || contains(github.base_ref, 'dev')
steps:
- uses: actions/checkout@main

- name: Read NSPanel ESPHome version
uses: CumulusDS/get-yaml-paths-action@master
id: read_nspanel_esphome_version
with:
file: esphome/nspanel_esphome_version.yaml
version: substitutions.version

- name: Display NSPanel ESPHome version
- name: Extract Version Number
id: extract_version
run: |
VERSION=$(yq eval '.substitutions.version' esphome/nspanel_esphome_version.yaml)
if [ -z "$VERSION" ]; then
echo "Error: No version found in esphome/nspanel_esphome_version.yaml"
exit 1
fi
echo "Extracted Version: ${VERSION}"
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Debug Version Output
run: |
echo NSPanel ESPHome version: ${{ steps.read_nspanel_esphome_version.outputs.version }}
echo "Version from setup_dependencies: ${{ steps.extract_version.outputs.version }}"
echo "Environment Variable VERSION: $VERSION"
if [ -z "${{ steps.extract_version.outputs.version }}" ]; then
echo "Error: Version output is empty. Exiting..."
exit 1
fi
- name: Build ESPHome Prebuilt Firmware
id: build_nspanel_fw
Expand All @@ -388,7 +398,7 @@ jobs:
with:
file: ${{ steps.build_nspanel_fw.outputs.name }}/manifest.json
field: version
value: ${{ steps.read_nspanel_esphome_version.outputs.version }}
value: ${{ steps.extract_version.outputs.version }}

- name: Update manifest.json - builds.chipFamily
uses: jossef/action-set-json-field@v2.2
Expand All @@ -409,7 +419,7 @@ jobs:
with:
file: ${{ steps.build_nspanel_fw.outputs.name }}/manifest.json
field: builds.ota.release_url
value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.read_nspanel_esphome_version.outputs.version }}"
value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.extract_version.outputs.version }}"

- name: Move and Rename Firmware File - nspanel_esphome_prebuilt
run: |
Expand Down Expand Up @@ -437,7 +447,7 @@ jobs:
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: version
value: ${{ steps.read_nspanel_esphome_version.outputs.version }}
value: ${{ steps.extract_version.outputs.version }}

- name: Update manifest.json - builds.chipFamily
uses: jossef/action-set-json-field@v2.2
Expand All @@ -458,7 +468,7 @@ jobs:
with:
file: ${{ steps.build_wall_display_fw.outputs.name }}/manifest.json
field: builds.ota.release_url
value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.read_nspanel_esphome_version.outputs.version }}"
value: "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v${{ steps.extract_version.outputs.version }}"

- name: Move and Rename Firmware File - wall_display
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Nextion2Text.*

# Ignore dev folder
dev
.esphome
14 changes: 14 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,19 @@ This fix ensures that the correct TFT file is used, preventing potential display

This update is critical for maintaining the proper functionality of your NSPanel. Please ensure that you update all components as recommended.

## v4.3.12 - Hotfix for Incorrect Timezone Calculation Issues
This hotfix addresses critical issues with timezone handling on the NSPanel,
specifically with POSIX string handling in ESP-IDF v4.4 and resolving an error in the propagation of timezone selection from the Blueprint to ESPHome.
These fixes ensure accurate and consistent time display, fully synchronized with Home Assistant.

### Fix for Incorrect Time Display Due to Timezone Handling (#2363, #2304)
- **Criticality:** Critical
- **Affected Components:** ESPHome, Blueprint
- **Issue Numbers:** #2363, #2304
- **Description:** Resolved issues where the NSPanel displayed incorrect time due to an inverted timezone offset,
affecting users with time discrepancies between the panel and Home Assistant.
The fix includes improvements in the propagation of timezone settings from the Blueprint, ensuring the home page accurately reflects the configured timezone.

## Support
For support or more information about this update,
visit our [GitHub repository](https://github.com/Blackymas/NSPanel_HA_Blueprint)
Expand All @@ -951,6 +964,7 @@ Your contributions have made our guides more informative and accessible, enrichi
- **@briangunderson**: For updating the docs to reflect to the new name for '**action**' (formelly '**service**') on Home Assistant v2024.8.0 (#2236)

## Previous releases
- [v4.3.11 - Hotfix for TFT File Download Issue](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.11)
- [v4.3.10 - Boot Stability Enhancements and Troubleshooting Support](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.10)
- [v4.3.9 - Ensuring Compatibility with ESPHome v2024.6.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.9)
- [v4.3.8 - Enhancements and Bug Fix](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.8)
Expand Down
17 changes: 11 additions & 6 deletions esphome/nspanel_esphome_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ external_components:
# path: packages/Blackymas/components
type: git
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
ref: v4.3.11
ref: v4.3.12
components:
- nspanel_ha_blueprint
refresh: 30s
Expand Down Expand Up @@ -3148,13 +3148,18 @@ script:
timezone: string
then:
- lambda: |-
id(mui_timezone) = timezone;
if (!timezone.empty()) {
ESP_LOGD("script.set_timezone", "Setting timezone: %s", timezone.c_str());
time_provider->set_timezone(timezone.c_str());
ESP_LOGI("script.set_timezone", "Setting timezone: %s", timezone.c_str());
if (timezone != id(mui_timezone)) {
id(mui_timezone) = timezone;
size_t start = id(mui_timezone).find('<');
size_t end = id(mui_timezone).find('>');
if (start != std::string::npos && end != std::string::npos && end > start)
id(mui_timezone).replace(start, (end - start) + 1, "UTC");
time_provider->set_timezone(id(mui_timezone).c_str());
time_provider->call_setup();
time_provider->dump_config();
}
time_provider->dump_config();
refresh_datetime->execute();
- id: stop_all
mode: restart
Expand Down
2 changes: 1 addition & 1 deletion esphome/nspanel_esphome_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
---
substitutions:
##### DON'T CHANGE THIS ######
version: "4.3.11"
version: "4.3.12"
##############################
...
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_CJK_eu_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Variable (string) version
Attributes
ID : 7
Scope : global
Text : 4.3.11
Text : 4.3.12
Max. Text Size: 16

Variable (int32) log_len
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_CJK_us_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Variable (string) version
Attributes
ID : 7
Scope : global
Text : 4.3.11
Text : 4.3.12
Max. Text Size: 16

Variable (int32) log_len
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_CJK_us_land_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Variable (string) version
Attributes
ID : 7
Scope : global
Text : 4.3.11
Text : 4.3.12
Max. Text Size: 16

Variable (int32) log_len
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_eu_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Variable (string) version
Attributes
ID : 7
Scope : global
Text : 4.3.11
Text : 4.3.12
Max. Text Size: 16

Variable (int32) log_len
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_us_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Variable (string) version
Attributes
ID : 7
Scope : global
Text : 4.3.11
Text : 4.3.12
Max. Text Size: 16

Variable (int32) log_len
Expand Down
2 changes: 1 addition & 1 deletion hmi/dev/nspanel_us_land_code/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Variable (string) version
Attributes
ID : 7
Scope : global
Text : 4.3.11
Text : 4.3.12
Max. Text Size: 16

Variable (int32) log_len
Expand Down
Binary file modified hmi/nspanel_CJK_eu.HMI
Binary file not shown.
Binary file modified hmi/nspanel_CJK_eu.tft
Binary file not shown.
Binary file modified hmi/nspanel_CJK_us.HMI
Binary file not shown.
Binary file modified hmi/nspanel_CJK_us.tft
Binary file not shown.
Binary file modified hmi/nspanel_CJK_us_land.HMI
Binary file not shown.
Binary file modified hmi/nspanel_CJK_us_land.tft
Binary file not shown.
Binary file modified hmi/nspanel_eu.HMI
Binary file not shown.
Binary file modified hmi/nspanel_eu.tft
Binary file not shown.
Binary file modified hmi/nspanel_us.HMI
Binary file not shown.
Binary file modified hmi/nspanel_us.tft
Binary file not shown.
Binary file modified hmi/nspanel_us_land.HMI
Binary file not shown.
Binary file modified hmi/nspanel_us_land.tft
Binary file not shown.
97 changes: 46 additions & 51 deletions nspanel_blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ blueprint:
description: >
# NSPanel Configuration via Blueprint: Complete UI-Based Setup

**Version**: v4.3.11
**Version**: v4.3.12


This project enables comprehensive configuration of your NSPanel through a Blueprint featuring a user interface.
Expand Down Expand Up @@ -509,32 +509,32 @@ blueprint:
- 'Pacific/Wake (<+12>-12)'
- 'Pacific/Wallis (<+12>-12)'
- 'Etc/GMT (GMT0)'
- 'Etc/GMT-14 (<+14>-14)'
- 'Etc/GMT-13 (<+13>-13)'
- 'Etc/GMT-12 (<+12>-12)'
- 'Etc/GMT-11 (<+11>-11)'
- 'Etc/GMT-10 (<+10>-10)'
- 'Etc/GMT-9 (<+09>-9)'
- 'Etc/GMT-8 (<+08>-8)'
- 'Etc/GMT-7 (<+07>-7)'
- 'Etc/GMT-6 (<+06>-6)'
- 'Etc/GMT-5 (<+05>-5)'
- 'Etc/GMT-4 (<+04>-4)'
- 'Etc/GMT-3 (<+03>-3)'
- 'Etc/GMT-2 (<+02>-2)'
- 'Etc/GMT-1 (<+01>-1)'
- 'Etc/GMT+1 (<-01>1)'
- 'Etc/GMT+2 (<-02>2)'
- 'Etc/GMT+3 (<-03>3)'
- 'Etc/GMT+4 (<-04>4)'
- 'Etc/GMT+5 (<-05>5)'
- 'Etc/GMT+6 (<-06>6)'
- 'Etc/GMT+7 (<-07>7)'
- 'Etc/GMT+8 (<-08>8)'
- 'Etc/GMT+9 (<-09>9)'
- 'Etc/GMT+10 (<-10>10)'
- 'Etc/GMT+11 (<-11>11)'
- 'Etc/GMT+12 (<-12>12)'
- 'Etc/GMT+14 (<+14>-14)'
- 'Etc/GMT+13 (<+13>-13)'
- 'Etc/GMT+12 (<+12>-12)'
- 'Etc/GMT+11 (<+11>-11)'
- 'Etc/GMT+10 (<+10>-10)'
- 'Etc/GMT+9 (<+09>-9)'
- 'Etc/GMT+8 (<+08>-8)'
- 'Etc/GMT+7 (<+07>-7)'
- 'Etc/GMT+6 (<+06>-6)'
- 'Etc/GMT+5 (<+05>-5)'
- 'Etc/GMT+4 (<+04>-4)'
- 'Etc/GMT+3 (<+03>-3)'
- 'Etc/GMT+2 (<+02>-2)'
- 'Etc/GMT+1 (<+01>-1)'
- 'Etc/GMT-1 (<-01>1)'
- 'Etc/GMT-2 (<-02>2)'
- 'Etc/GMT-3 (<-03>3)'
- 'Etc/GMT-4 (<-04>4)'
- 'Etc/GMT-5 (<-05>5)'
- 'Etc/GMT-6 (<-06>6)'
- 'Etc/GMT-7 (<-07>7)'
- 'Etc/GMT-8 (<-08>8)'
- 'Etc/GMT-9 (<-09>9)'
- 'Etc/GMT-10 (<-10>10)'
- 'Etc/GMT-11 (<-11>11)'
- 'Etc/GMT-12 (<-12>12)'
- 'Etc/UTC (UTC0)'
decimal_separator:
name: System settings - Decimal Separator
Expand Down Expand Up @@ -3764,7 +3764,7 @@ trigger_variables:
group06: !input utilities_page01_group06_line_reference

variables:
blueprint_version: '4.3.11'
blueprint_version: '4.3.12'
pages:
current: '{{ states(currentpage) }}'
home: "home"
Expand Down Expand Up @@ -8196,23 +8196,20 @@ action:
qrcode: !input qrcode_value
home_indoor_temp_icon: !input home_indoor_temp_icon
timezone: !input timezone
timezone_code: >
{{
timezone.split('(')[1]|replace(')', '')
if timezone.split('(') | count > 0
else timezone
}}

##### Timezone #####
- if: '{{ timezone is string and timezone | length > 1 and esphome_version >= "4.3.4" }}'
then:
- variables:
timezone_code: >
{{
timezone.split('(')[1]|replace(')', '')
if timezone.split('(') | count > 0
else timezone
}}
- *delay_default
- service: 'esphome.{{ nspanel_name }}_set_string'
data:
component: "timezone"
val: '{{ timezone_code }}'
continue_on_error: true
- *delay_default
- service: 'esphome.{{ nspanel_name }}_set_string'
data:
component: "timezone"
val: '{{ timezone_code }}'
continue_on_error: true

##### Home page #####
- *delay_default
Expand Down Expand Up @@ -8390,14 +8387,12 @@ action:
climate_friendly_name: '{{ state_attr(climate, "friendly_name") if climate_entity_id_valid else "" }}'
hw_buttons_bars_pages: !input hw_buttons_bars_pages

- if: '{{ esphome_version >= "4.3.4" }}'
then:
- *delay_default
- service: 'esphome.{{ nspanel_name }}_set_bool'
data:
component: "is_climate"
val: '{{ climate_entity_id_valid }}'
continue_on_error: true
- *delay_default
- service: 'esphome.{{ nspanel_name }}_set_bool'
data:
component: "is_climate"
val: '{{ climate_entity_id_valid }}'
continue_on_error: true

- *delay_default
- service: 'esphome.{{ nspanel_name }}_init_hardware'
Expand Down
6 changes: 3 additions & 3 deletions prebuilt/nspanel-esp32/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"chipFamily": "ESP32",
"ota": {
"path": "nspanel-esp32.ota.bin",
"md5": "c5cb885478f366d45fd7d92695716810"
"md5": "d4cb0c8bdc8809f8802dc49541f3015a"
},
"parts": [
{
Expand All @@ -11,12 +11,12 @@
}
],
"name": "NSPanel HA Blueprint",
"version": "4.3.11",
"version": "4.3.12",
"builds": {
"chipFamily": "ESP32",
"ota": {
"path": "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.bin",
"release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.11"
"release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.12"
}
}
}
Binary file modified prebuilt/nspanel-esp32/nspanel-esp32.factory.bin
Binary file not shown.
Binary file modified prebuilt/nspanel-esp32/nspanel-esp32.ota.bin
Binary file not shown.
Binary file modified prebuilt/nspanel_esphome_prebuilt.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion prebuilt/nspanel_esphome_prebuilt.bin.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c5cb885478f366d45fd7d92695716810 prebuilt/nspanel_esphome_prebuilt.bin
d4cb0c8bdc8809f8802dc49541f3015a prebuilt/nspanel_esphome_prebuilt.bin
Binary file modified prebuilt/nspanel_esphome_prebuilt.factory.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion prebuilt/nspanel_esphome_prebuilt.factory.bin.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6ec4a6cc75e36937ed28407dda7d98ae prebuilt/nspanel_esphome_prebuilt.factory.bin
93a7945b78c6f45ba470e32825b2567a prebuilt/nspanel_esphome_prebuilt.factory.bin
6 changes: 3 additions & 3 deletions prebuilt/nspanel_esphome_prebuilt.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"chipFamily": "ESP32",
"ota": {
"path": "nspanel-esp32.ota.bin",
"md5": "c5cb885478f366d45fd7d92695716810"
"md5": "d4cb0c8bdc8809f8802dc49541f3015a"
},
"parts": [
{
Expand All @@ -11,12 +11,12 @@
}
],
"name": "NSPanel HA Blueprint",
"version": "4.3.11",
"version": "4.3.12",
"builds": {
"chipFamily": "ESP32",
"ota": {
"path": "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/prebuilt/nspanel_esphome_prebuilt.bin",
"release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.11"
"release_url": "https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.3.12"
}
}
}
Loading

0 comments on commit 0c0be2d

Please sign in to comment.