Skip to content

Commit

Permalink
yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn committed Nov 20, 2024
1 parent 97e189e commit b3d5c46
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
19 changes: 12 additions & 7 deletions esphome/nspanel_esphome_addon_upload_tft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@ esphome:
api:
actions:
##### TFT File Update action: `upload_tft`
# Updates the panel's TFT file remotely from a specified URL or the default location, requiring the "Upload TFT" add-on.
# Usage: Essential for applying custom TFT designs or updates, especially when direct repository access is unavailable.
# Updates the panel's TFT file remotely from a specified URL or the default location,
# requiring the "Upload TFT" add-on.
# Usage: Essential for applying custom TFT designs or updates,
# especially when direct repository access is unavailable.
#
# Parameters:
# - `url` (string): URL for the TFT file. If "default" or empty, uses the URL from "Update TFT - Display Model" in Home Assistant settings.
# - `url` (string): URL for the TFT file. If "default" or empty,
# uses the URL from "Update TFT - Display Model" in Home Assistant settings.
#
# Example:
# action: esphome.<your_panel_name>_upload_tft
# data:
# url: "http://homeassistant.local:8123/local/custom_tft_file.tft" # Custom or default URL to the TFT file
# url: "http://homeassistant.local:8123/local/custom_tft_file.tft" # Custom or default URL
#
# [!NOTE]
# Utilize "default" to automatically use the URL associated with the display model set in Home Assistant.
# Utilize "default" to automatically use the URL associated with
# the display model set in Home Assistant.
#
# [!ATTENTION]
# Requires the "Upload TFT" add-on for functionality.
Expand All @@ -54,7 +58,7 @@ api:
if (std::string::npos != endPos) clean_url = clean_url.substr(0, endPos + 1);
if (clean_url.empty() or clean_url == "default")
url = construct_tft_url("v${version}", tft_file_model->state,
"${nextion_update_url}", "${nextion_update_base_url}");
"${nextion_update_url}", "${nextion_update_base_url}");
upload_tft->execute(url.c_str());
# yamllint enable rule:comments-indentation

Expand Down Expand Up @@ -98,7 +102,8 @@ script:
static const char *const TAG = "${project_tag}";
ESP_LOGCONFIG(TAG, "Add-on Upload TFT:");
ESP_LOGCONFIG(TAG, " File model: %s", tft_file_model->state.c_str());
ESP_LOGCONFIG(TAG, " Valid TFT: %s", YESNO((id(display_mode) > 0 and id(display_mode) < 4)));
ESP_LOGCONFIG(TAG, " Valid TFT: %s",
YESNO((id(display_mode) > 0 and id(display_mode) < 4)));
- id: !extend check_versions
then:
Expand Down
23 changes: 14 additions & 9 deletions nspanel_blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9361,10 +9361,11 @@ actions:
else ""
}}
- alias: Value's icon
if:
- or:
- '{{ is_boot }}'
- '{{ (overlap.icon is not string) }}' # Do not plot if it has overlap
if: > # Do not plot if it has overlap
{{
is_boot or
(overlap.icon is not string)
}}
then:
- *delay_default
- alias: Send value's icon
Expand Down Expand Up @@ -10576,7 +10577,7 @@ actions:
component: bt_oscillate
show: true
continue_on_error: true
- condition:
- condition:
- '{{ fan.steps > 0 }}'
- '{{ fan.supported_features | bitwise_and(1) > 0 }}' # Set speed
- *delay_default
Expand Down Expand Up @@ -11317,10 +11318,14 @@ actions:
| timestamp_custom
(
date_format
| replace("%A", (dict.values(mui[language].weekdays) | list)[(now() + timedelta(days= (page_index))).weekday()])
| replace("%a", (dict.values(mui[language].weekdays_short) | list)[(now() + timedelta(days= (page_index))).weekday()])
| replace("%B", (dict.values(mui[language].months) | list)[(now() + timedelta(days= (page_index))).month-1])
| replace("%b", (dict.values(mui[language].months_short) | list)[(now() + timedelta(days= (page_index))).month-1])
| replace("%A",(dict.values(mui[language].weekdays) | list)[
(now() + timedelta(days= (page_index))).weekday()])
| replace("%a", (dict.values(mui[language].weekdays_short) | list)[
(now() + timedelta(days= (page_index))).weekday()])
| replace("%B", (dict.values(mui[language].months) | list)[
(now() + timedelta(days= (page_index))).month-1])
| replace("%b", (dict.values(mui[language].months_short) | list)[
(now() + timedelta(days= (page_index))).month-1])
)
}}
continue_on_error: true
Expand Down

0 comments on commit b3d5c46

Please sign in to comment.