Skip to content

Commit

Permalink
Replace PageIcon by DisplayComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardtfn committed Nov 21, 2024
1 parent 007ae6a commit d0930be
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions esphome/nspanel_esphome_addon_climate_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ globals:
initial_value: 'false'

- id: chip_climate # Climate chip shown on page Home
type: PageIcon*
type: DisplayComponent*
restore_value: false

logger:
Expand Down Expand Up @@ -316,7 +316,7 @@ script:
- id: update_climate_icon
mode: restart
parameters:
target_icon: PageIcon*
target_icon: DisplayComponent*
action: uint
mode: uint
then:
Expand Down Expand Up @@ -371,14 +371,14 @@ script:
icon_color = 1530; // cyan
break;
}
if (!icon.empty() and target_icon->icon != icon) {
copyStringToCharArray(target_icon->icon, icon);
if (current_page->state == target_icon->page)
icon_set_icon->execute(target_icon);
if (!icon.empty() and target_icon->text != icon) {
copyStringToCharArray(target_icon->text, icon);
if (id(current_page_id) == target_icon->page_id)
display_component_send_text->execute(target_icon);
}
if (icon_color>=0 and target_icon->icon_color != icon_color) {
target_icon->icon_color = static_cast<uint16_t>(icon_color);
if (current_page->state == target_icon->page)
if (icon_color>=0 and target_icon->color != icon_color) {
target_icon->color = static_cast<uint16_t>(icon_color);
if (id(current_page_id) == target_icon->page_id)
icon_set_color->execute(target_icon);
}
...

0 comments on commit d0930be

Please sign in to comment.