@@ -27,6 +27,8 @@ external_components:
|
||||
type: git
|
||||
url: https://github.com/Blackymas/NSPanel_HA_Blueprint
|
||||
ref: dev # To do: Change it for releasing
|
||||
components:
|
||||
- nspanel_ha_blueprint
|
||||
refresh: 3s # To do: Change it for releasing
|
||||
- source:
|
||||
type: git
|
||||
@@ -466,13 +468,6 @@ api:
|
||||
visible: bool
|
||||
then:
|
||||
- lambda: |-
|
||||
static const char *const TAG = "service.icon";
|
||||
ESP_LOGI(TAG, "id: %s", id.c_str());
|
||||
ESP_LOGI(TAG, "id_empty: %s", YESNO(id.empty()));
|
||||
ESP_LOGI(TAG, "icon: %s", icon.c_str());
|
||||
ESP_LOGI(TAG, "icon_color: %i", icon_color.size());
|
||||
ESP_LOGI(TAG, "visible: %s", YESNO(visible));
|
||||
ESP_LOGI(TAG, "page: %s", current_page->state.c_str());
|
||||
if (!id(is_uploading_tft) and !(id.empty())) {
|
||||
if (!(icon.empty())) disp1->set_component_text_printf(id.c_str(), "%s", icon.c_str());
|
||||
if (icon_color.size() == 3)
|
||||
@@ -1298,14 +1293,14 @@ api:
|
||||
then:
|
||||
- lambda: |-
|
||||
if (!id(is_uploading_tft) and !(id.empty())) {
|
||||
if (!(icon.empty())) disp1->set_component_text_printf("%s_icon", id.c_str(), icon.c_str());
|
||||
if (!(icon.empty())) disp1->set_component_text_printf((id + "_icon").c_str(), "%s", icon.c_str());
|
||||
if (icon_color.size() == 3)
|
||||
disp1->set_component_font_color((id + "_icon").c_str(), esphome::display::ColorUtil::color_to_565(esphome::Color(icon_color[0],
|
||||
icon_color[1],
|
||||
icon_color[2])));
|
||||
|
||||
if (!(name.empty())) disp1->set_component_text_printf("%s_label", id.c_str(), name.c_str());
|
||||
if (!(value.empty())) disp1->set_component_text_printf("%s", id.c_str(), value.c_str());
|
||||
if (!(name.empty())) disp1->set_component_text_printf((id + "_label").c_str(), "%s", name.c_str());
|
||||
if (!(value.empty())) disp1->set_component_text_printf(id.c_str(), "%s", value.c_str());
|
||||
if (value_color.size() == 3)
|
||||
disp1->set_component_font_color(id.c_str(), esphome::display::ColorUtil::color_to_565(esphome::Color(value_color[0],
|
||||
value_color[1],
|
||||
@@ -2378,7 +2373,7 @@ script:
|
||||
std::string temp_units = "${temp_units}";
|
||||
if (temp_units == "°F" || temp_units == "F" || temp_units == "°f" || temp_units == "f")
|
||||
unit_based_temperature = (unit_based_temperature * 9 / 5) + 32;
|
||||
disp1->set_component_text_printf("home.current_temp", "%.1f${temp_units}", unit_based_temperature);
|
||||
disp1->set_component_text_printf("home.indr_temp", "%.1f${temp_units}", unit_based_temperature);
|
||||
}
|
||||
|
||||
- id: display_wrapped_text
|
||||
|
||||
Reference in New Issue
Block a user