Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn committed Feb 26, 2024
1 parent 9487ca9 commit 4b90515
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 23 deletions.
27 changes: 20 additions & 7 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,37 @@
## General
*To be updated.*

Hello everyone! We're excited to introduce enhancements in this update, focusing on improving user interaction and expanding customization options. This release features an intuitive TFT upload process, enhanced Alarm Control Panels & Thermostats functionality, and new personalization options.
Hello everyone!
We're excited to introduce enhancements in this update, focusing on improving user interaction and expanding customization options.
This release features an intuitive TFT upload process, enhanced Alarm Control Panels & Thermostats functionality, and new personalization options.

We're committed to making NSPanel firmware more user-friendly. This release marks significant progress, including a streamlined TFT upload process and steps towards adopting `esp-idf` as the default framework. Our documentation has been revamped for clarity and ease of use. Stay tuned for more updates!
We're committed to making NSPanel firmware more user-friendly.
This release marks significant progress, including a streamlined TFT upload process and steps towards adopting `esp-idf` as the default framework.
Our documentation has been revamped for clarity and ease of use.
Stay tuned for more updates!

[Learn more about our efforts](https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1602).

## ESP-IDF Framework Transition
With this release, we've officially transitioned to the **ESP-IDF** framework. This move is part of our ongoing efforts to enhance the memory capacity and expand the features available on the ESP, facilitating broader customization and new functionalities.
With this release, we've officially transitioned to the **ESP-IDF** framework.
This move is part of our ongoing efforts to enhance the memory capacity and expand the features available on the ESP, facilitating broader customization and new functionalities.

For users updating to this version:
- **Flashing Required**: To adopt the ESP-IDF framework, flashing your device using a serial cable is necessary. This step mirrors the initial custom firmware setup process.
- **Arduino Framework Still Available**: For those who prefer the `arduino` framework or require Over-The-Air (OTA) updates, it remains an option. Detailed guidance on how to choose your framework is provided in our [customization documentation](https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/customization.md).
- **Arduino Framework Still Available**: For those who prefer the `arduino` framework or require Over-The-Air (OTA) updates, it remains an option.
Detailed guidance on how to choose your framework is provided in our [customization documentation](https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/customization.md).

This transition is a significant milestone for us, promising a robust platform for our community. We're here to help with any questions or assistance needed during this change. For more details and support, visit our [community discussion](https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1756).
This transition is a significant milestone for us, promising a robust platform for our community.
We're here to help with any questions or assistance needed during this change.
For more details and support, visit our [community discussion](https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1756).

## Updating
Please review your settings post-update to ensure compatibility. Refer to the update procedures [here](https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/howto.md#update-blueprint).
Please review your settings post-update to ensure compatibility.
Refer to the update procedures [here](https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/docs/howto.md#update-blueprint).

## Breaking Changes and Guidance
With this release, we're implementing several important changes. While we strive to improve the panel, we understand that changes can affect your setups.
With this release, we're implementing several important changes.
While we strive to improve the panel, we understand that changes can affect your setups.
Here's a detailed overview and guidance for a smooth transition:

1. **Transition to ESP-IDF Framework**: This release marks the official switch to the ESP-IDF framework, enhancing performance and allowing for more complex features.
Expand Down Expand Up @@ -89,6 +100,8 @@ Discover our upcoming projects in our [Milestones](https://github.com/Blackymas/
*Details to be added.*

## Previous releases
- [v4.2.6 - Enhancing Stability and User Experience](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.6)
- [v4.2.5 - Celebrating 1000 Stars with Enhanced Functionality and UI Improvements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.5)
- [v4.2.4 - Critical bug fixes](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.4)
- [v4.2.3 - Bug fixes and minor enhancements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.3)
- [v4.2.2 - Bug fixes and minor enhancements](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.2.2)
Expand Down
18 changes: 12 additions & 6 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ data:
Updates the on-screen indication bars for the hardware buttons, reflecting the current state of the entities they control.

**Usage:**
This service updates the visual state (on/off) of the left and right hardware button indicators on the panel. It's used to provide visual feedback corresponding to the state of the entities controlled by these hardware buttons.
This service updates the visual state (on/off) of the left and right hardware button indicators on the panel.
It's used to provide visual feedback corresponding to the state of the entities controlled by these hardware buttons.

**Parameters:**
- `left` (bool): The state to set for the left button's indication bar.
Expand Down Expand Up @@ -343,11 +344,13 @@ It tailors ESPHome's hardware operations for specific use cases, including local

**Parameters:**
- `relay1_local_control` (bool): Enables or disables local control for Relay 1.
- `relay1_icon` (string): Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) for Relay 1.
- `relay1_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) for Relay 1.
- `relay1_icon_color` (int[]): The RGB color array for Relay 1's icon.
- `relay1_fallback` (bool): Determines the fallback state for Relay 1 in case of communication loss.
- `relay2_local_control` (bool): Enables or disables local control for Relay 2.
- `relay2_icon` (string): Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) for Relay 2.
- `relay2_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html) for Relay 2.
- `relay2_icon_color` (int[]): The RGB color array for Relay 2's icon.
- `relay2_fallback` (bool): Determines the fallback state for Relay 2 in case of communication loss.
- `button_left` (bool): Enable/disable left button status visualization.
Expand Down Expand Up @@ -398,16 +401,19 @@ It accommodates extensive customizations, impacting both visual appeal and funct
- `meridiem` (string[]): Array of strings for AM/PM labels, applicable if the time format includes meridiem.
- `chip_font` (int): Font Id for icons or chips displayed on the "Home" page.
- `custom_buttons_font` (int): Font Id for custom button icons on the "Home" page.
- `notification_icon` (string): Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
- `notification_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
for the notification button.
- `notification_icon_color_normal` (int[]): RGB color array for the notification icon under normal conditions.
- `notification_icon_color_unread` (int[]): RGB color array for the notification icon when there are unread notifications.
- `qrcode` (bool): Flag indicating whether the QR code button is enabled.
- `qrcode_icon` (string): Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
- `qrcode_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
for the QR code button.
- `qrcode_icon_color` (int[]): RGB color array for the QR code button icon.
- `entities_pages` (bool): Flag indicating whether the entities page button is enabled.
- `entities_pages_icon` (string): Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
- `entities_pages_icon` (string):
Icon codepoint from [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html)
for the entities page button.
- `entities_pages_icon_color` (int[]): RGB color array for the entities page button icon.
- `outdoor_temp_font` (int): Font Id for outdoor temperature indication on the "Home" page.
Expand Down
2 changes: 1 addition & 1 deletion esphome/nspanel_esphome_addon_climate_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ script:
call.perform();
}
- id: !extend global_settings
- id: !extend init_hardware_climate
then:
- lambda: |-
id(addon_climate_friendly_name) = embedded_climate_friendly_name;
Expand Down
30 changes: 22 additions & 8 deletions esphome/nspanel_esphome_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ api:
embedded_climate_friendly_name: string # Friendly name for the climate control feature.
embedded_indoor_temperature: bool # Enables indoor temperature display.
then:
- script.execute:
id: init_hardware_climate
embedded_climate: !lambda return embedded_climate;
embedded_climate_friendly_name: !lambda return embedded_climate_friendly_name;
embedded_indoor_temperature: !lambda return embedded_indoor_temperature;

- lambda: |-
if (not id(is_uploading_tft)) {
using namespace nspanel_ha_blueprint;
Expand Down Expand Up @@ -387,16 +393,8 @@ api:
// Refresh buttons bars display
refresh_hardware_buttons_bars->execute();
// Embedded thermostat
id(is_embedded_thermostat) = embedded_climate;
// Indoor temperature
id(embedded_indoor_temp) = embedded_indoor_temperature;
display_embedded_temp->execute();
}
blueprint_status->publish_state(int(blueprint_status->raw_state) | (1 << 4));
# Sets up the "Home" page in ESPHome with customized settings and UI elements as defined in the project blueprint.
- service: init_page_home
variables:
Expand Down Expand Up @@ -1977,6 +1975,21 @@ script:
}
}
- id: init_hardware_climate
mode: restart
parameters:
embedded_climate: bool # Indicates if climate control is integrated.
embedded_climate_friendly_name: string # Friendly name for the climate control feature.
embedded_indoor_temperature: bool # Enables indoor temperature display.
then:
- lambda: |-
// Embedded thermostat
id(is_embedded_thermostat) = embedded_climate;
// Indoor temperature
id(embedded_indoor_temp) = embedded_indoor_temperature;
display_embedded_temp->execute();
- id: notification_clear
mode: restart
then:
Expand Down Expand Up @@ -2682,6 +2695,7 @@ script:
global_settings->stop();
ha_button->stop();
ha_call_service->stop();
init_hardware_climate->stop();
notification_clear->stop();
page_alarm->stop();
page_blank->stop();
Expand Down
9 changes: 8 additions & 1 deletion nspanel_blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9564,7 +9564,14 @@ action:

- ESPHome: {{ nspanel_event.esphome }}

- Blueprint (reported by ESPHome):{{ nspanel_event.blueprint if nspanel_event.blueprint is defined and nspanel_event.blueprint is string and nspanel_event.blueprint | length > 0 else "Unknown" }}
- Blueprint (reported by ESPHome): {{
nspanel_event.blueprint
if
nspanel_event.blueprint is defined and
nspanel_event.blueprint is string and
nspanel_event.blueprint | length > 0
else "Unknown"
}}

- Blueprint (expected): {{ blueprint_version }}
continue_on_error: true
Expand Down

0 comments on commit 4b90515

Please sign in to comment.