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 b3d5c46 commit 3519499
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion esphome/nspanel_esphome_core_hw_buzzer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ substitutions:
tone_boot: "two short:d=4,o=5,b=100:16e6,16e6"
tone_touch_press: "Touch:d=16,o=5,b=180:g"
tone_touch_release: "Release:d=32,o=5,b=180:g,g"
tone_volume_change: "" # "scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b"
tone_volume_change: "" # Ex.: "scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b"

api:
id: !extend api_server
Expand Down
21 changes: 14 additions & 7 deletions esphome/nspanel_esphome_core_page_climate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,19 @@ script:
set_component_visibility->execute("climate", "current_temp", true);
if (current_temp > -999) {
snprintf(buffer, sizeof(buffer), (useDecimal) ? "%.1f°" : "%.0f°", current_temp);
set_component_text->execute("climate", "current_temp", adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_text->execute("climate", "current_temp",
adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
}
else
set_component_text->execute("climate", "current_temp", id(mui_unavailable).c_str());
if (target_temp > -999) { // Target temp enabled
set_component_value->execute("climate", "active_slider", 0);
snprintf(buffer, sizeof(buffer), (useDecimal) ? "%.1f°" : "%.0f°", target_temp);
set_component_text->execute("climate", "target_high", adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_value->execute("climate", "climateslider", round(((10*target_temp) - temp_offset) / temp_step));
set_component_text->execute("climate", "target_high",
adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_value->execute("climate", "climateslider",
round(((10*target_temp) - temp_offset) / temp_step));
set_component_visibility->execute("climate", "slider_high", false);
set_component_visibility->execute("climate", "slider_low", false);
set_component_visibility->execute("climate", "target_low", false);
Expand All @@ -176,8 +179,10 @@ script:
if (target_temp_low > -999) { // Target temp low enabled
set_component_value->execute("climate", "active_slider", 2);
snprintf(buffer, sizeof(buffer), (useDecimal) ? "%.1f°" : "%.0f°", target_temp_low);
set_component_text->execute("climate", "target_low", adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_value->execute("climate", "slider_low", round(((10*target_temp_low) - temp_offset) / temp_step));
set_component_text->execute("climate", "target_low",
adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_value->execute("climate", "slider_low",
round(((10*target_temp_low) - temp_offset) / temp_step));
set_component_visibility->execute("climate", "target_low", true);
set_component_visibility->execute("climate", "slider_low", true);
} else {
Expand All @@ -187,8 +192,10 @@ script:
if (target_temp_high > -999) { // Target temp high enabled
set_component_value->execute("climate", "active_slider", 1);
snprintf(buffer, sizeof(buffer), (useDecimal) ? "%.1f°" : "%.0f°", target_temp_high);
set_component_text->execute("climate", "target_high", adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_value->execute("climate", "slider_high", round(((10*target_temp_high) - temp_offset) / temp_step));
set_component_text->execute("climate", "target_high",
adjustDecimalSeparator(buffer, id(mui_decimal_separator)).c_str());
set_component_value->execute("climate", "slider_high",
round(((10*target_temp_high) - temp_offset) / temp_step));
set_component_visibility->execute("climate", "target_high", true);
set_component_visibility->execute("climate", "slider_high", true);
} else {
Expand Down
3 changes: 2 additions & 1 deletion esphome/nspanel_esphome_core_page_keyb_num.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ script:
const std::string key = json["key"];
const std::string code_format = json["code_format"];
const std::string pin = json["pin"];
alarm_control_panel_action->execute(detailed_entity->state.c_str(), key.c_str(), code_format.c_str(), pin.c_str());
alarm_control_panel_action->execute(detailed_entity->state.c_str(), key.c_str(),
code_format.c_str(), pin.c_str());
}
goto_page_id->execute(get_page_id(base_domain.empty() ? "home" : base_domain.c_str()), false);
}
Expand Down

0 comments on commit 3519499

Please sign in to comment.