diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 03b8182..ea7af93 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -1011,7 +1011,7 @@ display: break; case 10: // light switch (component_id) { - case 34: // power_button + case 32: // power_button if (!touch_event) { // Release ha_call_service->execute("light.toggle", "", "", detailed_entity->state.c_str()); } @@ -1039,7 +1039,7 @@ display: break; case 22: // fan switch (component_id) { - case 17: // bt_oscillate + case 15: // bt_oscillate if (!touch_event) { // Release ha_call_service->execute("fan.oscillate", "oscillating", "toggle", detailed_entity->state.c_str()); } @@ -2999,20 +2999,11 @@ script: parameters: brightness: float then: - - if: - condition: - - lambda: return (!id(is_uploading_tft)); - then: - - lambda: |- - if (!id(is_uploading_tft)) { - if (brightness == display_brightness->state and current_page->state != "boot" and current_page->state != "screensaver") - disp1->send_command("wakeup_timer.en=1"); - else - disp1->set_backlight_brightness(brightness / 100.0f); - current_brightness->update(); - } - - delay: 5s - - lambda: if (!id(is_uploading_tft)) current_brightness->update(); + - lambda: |- + if (!id(is_uploading_tft)) { + disp1->set_backlight_brightness(brightness / 100.0f); + current_brightness->update(); + } - id: set_climate mode: restart diff --git a/hmi/dev/nspanel_eu_code/alarm.txt b/hmi/dev/nspanel_eu_code/alarm.txt index f7bdd14..1f1f2c8 100644 --- a/hmi/dev/nspanel_eu_code/alarm.txt +++ b/hmi/dev/nspanel_eu_code/alarm.txt @@ -12,6 +12,7 @@ Page alarm Events Preinitialize Event + dim=brightness if(api==0) { page home @@ -23,7 +24,6 @@ Page alarm vis bt_vacat,0 vis bt_bypass,0 } - vis unavailable,0 printh 92 prints "current_page",0 printh 00 @@ -192,16 +192,6 @@ Text bt_disarm_icon Text :  Max. Text Size : 3 -Text unavailable - Attributes - ID : 32 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Picture bt_home_pic Attributes ID : 4 @@ -402,26 +392,3 @@ Hotspot bt_disarm printh 00 printh FF FF FF -Timer wakeup_timer - Attributes - ID : 31 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 29 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 29 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim1) { @@ -304,16 +304,6 @@ Text page_index Text : Max. Text Size : 12 -Text unavailable - Attributes - ID : 31 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 1 - Button button_back Attributes ID : 28 @@ -340,29 +330,6 @@ Timer swipestore swipex=tch0 swipey=tch1 -Timer wakeup_timer - Attributes - ID : 30 - Scope : local - Period (ms): 100 - Enabled : yes - - Events - Timer Event - if(dim