diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 6ec11ac..97d9990 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -7682,34 +7682,38 @@ action: ## PAGE ALARM ## - alias: Alarm settings page conditions: '{{ nspanel_event.page == page.alarm }}' - sequence: &refresh_page_alarm - - variables: #https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarm_control_panel/const.py - alarm: - state: '{{ states(nspanel_event.entity) | default("unavailable") }}' - friendly_name: '{{ state_attr(nspanel_event.entity, "friendly_name") }}' - supported_features: '{{ state_attr(nspanel_event.entity, "supported_features") | int(0) }}' - code_format: '{{ state_attr(nspanel_event.entity, "code_format") }}' - icon: > - {% set icon_attr = state_attr(nspanel_event.entity, "icon") | default("") %} - {{ - all_icons[icon_attr.split(":")[1]] | default(all_icons.shield) - if - icon_attr not in ["unavailable", "unknown", "", None] - and icon_attr is string - and icon_attr.split(":") | count > 0 - else all_icons.shield - }} - - condition: '{{ alarm.supported_features > 0 }}' - ### DEBUG - Service to set alarm page - - service: '{{ nextion.command.alarm_settings }}' - data: - page_icon: '{{ alarm.icon }}' - page_title: '{{ alarm.friendly_name }}' - state: '{{ alarm.supported_features }}' - supported_features: '{{ alarm.supported_features }}' - code_format: '{{ alarm.code_format }}' - entity: '{{ nspanel_event.entity }}' - continue_on_error: true + sequence: &refresh-page_alarm + - variables: + alarm_entity: !input alarm + - if: '{{ alarm_entity is string and alarm_entity is match "alarm_control_panel." }}' + then: + - variables: #https://github.com/home-assistant/core/blob/dev/homeassistant/components/alarm_control_panel/const.py + alarm: + state: '{{ states(alarm_entity) | default("unavailable") }}' + friendly_name: '{{ state_attr(alarm_entity, "friendly_name") }}' + supported_features: '{{ state_attr(alarm_entity, "supported_features") | int(0) }}' + code_format: '{{ state_attr(alarm_entity, "code_format") }}' + icon: > + {% set icon_attr = state_attr(alarm_entity, "icon") | default("") %} + {{ + all_icons[icon_attr.split(":")[1]] | default(all_icons.shield) + if + icon_attr not in ["unavailable", "unknown", "", None] + and icon_attr is string + and icon_attr.split(":") | count > 0 + else all_icons.shield + }} + - condition: '{{ alarm.supported_features > 0 }}' + - service: '{{ nextion.command.alarm_settings }}' + data: + page_icon: '{{ alarm.icon }}' + page_title: '{{ alarm.friendly_name }}' + state: '{{ alarm.state }}' + supported_features: '{{ alarm.supported_features }}' + code_format: '{{ alarm.code_format }}' + entity: '{{ alarm_entity }}' + mui_alarm: '{{ dict.values(mui[language].alarm) | list }}' + continue_on_error: true ## PAGE CLIMATE ## - alias: Climate page @@ -8953,11 +8957,10 @@ action: - '{{ nspanel_event.page == page.fan }}' - '{{ trigger.entity_id is match "fan." }}' sequence: *refresh_page_fan - - alias: 'Alarm page' - conditions: - - '{{ nspanel_event.page == page.alarm }}' - - '{{ trigger.entity_id is match "alarm_control_panel." }}' - sequence: *refresh_page_alarm + #- alias: 'Alarm page' + # conditions: + # - '{{ nspanel_event.page == page.alarm }}' + # sequence: *refresh-page_alarm ##### UPDATE ENTITY PAGES ##### - alias: 'Update entity pages' @@ -9037,13 +9040,7 @@ action: id: alarm_state - '{{ trigger.event.data.new_state.state not in ["unavailable", "unknown", "", None] }}' - '{{ nspanel_event.page == page.alarm }}' - sequence: - - variables: - alarm_entity: '{{ trigger.event.data.entity_id }}' - supported_features: '{{ state_attr(alarm_entity, "supported_features") }}' - code_arm_required: '{{ state_attr(alarm_entity, "code_arm_required") }}' - - *climate-update_slider #DEBUG - - *climate-update_buttons #DEBUG + sequence: *refresh-page_alarm ########## TRIGGER - HOME PAGE ########### diff --git a/nspanel_esphome.yaml b/nspanel_esphome.yaml index e94f919..62ca6f2 100644 --- a/nspanel_esphome.yaml +++ b/nspanel_esphome.yaml @@ -511,6 +511,7 @@ api: supported_features: int code_format: string entity: string + mui_alarm: string[] #std::vector #std::map then: - if: condition: @@ -529,6 +530,80 @@ api: ESP_LOGD("service.alarm_settings", "supported_features: %i", supported_features); ESP_LOGD("service.alarm_settings", "code_format: %s", code_format.c_str()); ESP_LOGD("service.alarm_settings", "entity: %s", entity.c_str()); + ESP_LOGD("service.alarm_settings", "mui_alarm[1]: %s", mui_alarm[1].c_str()); + } + + - lambda: |- # Alarm page - Header + if (page_icon == "" or page_icon.empty()) + id(disp1).set_component_text_printf("icon_state", "%s", "\uE497"); //mdi:shield + else + id(disp1).set_component_text_printf("icon_state", "%s", page_icon.c_str()); + id(disp1).set_component_text_printf("page_label", "%s", page_title.c_str()); + - lambda: |- # Alarm page - Button's icons + id(disp1).set_component_text_printf("bt_home_icon", "\uE689"); //mdi:shield-home + id(disp1).set_component_text_printf("bt_away_icon", "\uE99C"); //mdi:shield-lock + id(disp1).set_component_text_printf("bt_night_icon", "\uF827"); //mdi:shield-moon + id(disp1).set_component_text_printf("bt_vacat_icon", "\uE6BA"); //mdi:shield-airplane + id(disp1).set_component_text_printf("bt_bypass_icon", "\uF19F"); //mdi:shield-edit + id(disp1).set_component_text_printf("bt_disarm_icon", "\uE99D"); //mdi:shield-off + + + # Supported features + # ARM_HOME = 1 + # ARM_AWAY = 2 + # ARM_NIGHT = 4 + # TRIGGER = 8 + # ARM_CUSTOM_BYPASS = 16 + # ARM_VACATION = 32 + + - lambda: |- # Alarm - Buttons + if (supported_features & 1) // Alarm - Button - Home + { + id(disp1).send_command_printf("bt_home_pic.pic=%i", (state=="armed_home") ? 133 : 132); + id(disp1).set_component_text_printf("bt_home_text", mui_alarm[0].c_str()); + id(disp1).set_component_background_color("bt_home_text", (state=="armed_home") ? 19818 : 52857); + id(disp1).set_component_background_color("bt_home_icon", (state=="armed_home") ? 19818 : 52857); + //id(disp1).set_component_font_color(btnicon.c_str(), btn_icon_font); + id(disp1).show_component("bt_home"); + } + if (supported_features & 2) // Alarm - Button - Away + { + id(disp1).send_command_printf("bt_away_pic.pic=%i", (state=="armed_away") ? 133 : 132); + id(disp1).set_component_text_printf("bt_away_text", mui_alarm[1].c_str()); + id(disp1).set_component_background_color("bt_away_text", (state=="armed_away") ? 19818 : 52857); + id(disp1).set_component_background_color("bt_away_icon", (state=="armed_away") ? 19818 : 52857); + id(disp1).show_component("bt_away"); + } + if (supported_features & 4) // Alarm - Button - Night + { + id(disp1).send_command_printf("bt_night_pic.pic=%i", (state=="armed_night") ? 133 : 132); + id(disp1).set_component_text_printf("bt_night_text", mui_alarm[2].c_str()); + id(disp1).set_component_background_color("bt_night_text", (state=="armed_night") ? 19818 : 52857); + id(disp1).set_component_background_color("bt_night_icon", (state=="armed_night") ? 19818 : 52857); + id(disp1).show_component("bt_night"); + } + if (supported_features & 32) // Alarm - Button - Vacation + { + id(disp1).send_command_printf("bt_vacat_pic.pic=%i", (state=="armed_vacation") ? 133 : 132); + id(disp1).set_component_text_printf("bt_vacat_text", mui_alarm[3].c_str()); + id(disp1).set_component_background_color("bt_vacat_text", (state=="armed_vacation") ? 19818 : 52857); + id(disp1).set_component_background_color("bt_vacat_icon", (state=="armed_vacation") ? 19818 : 52857); + id(disp1).show_component("bt_vacat"); + } + if (supported_features & 16) // Alarm - Button - Custom bypass + { + id(disp1).send_command_printf("bt_bypass_pic.pic=%i", (state=="armed_bypass") ? 133 : 132); + id(disp1).set_component_text_printf("bt_bypass_text", mui_alarm[4].c_str()); + id(disp1).set_component_background_color("bt_bypass_text", (state=="armed_bypass") ? 19818 : 52857); + id(disp1).set_component_background_color("bt_bypass_icon", (state=="armed_bypass") ? 19818 : 52857); + id(disp1).show_component("bt_bypass"); + } + if ( true ) // Alarm - Button - Disarm + { + id(disp1).send_command_printf("bt_disarm_pic.pic=%i", (state=="disarmed") ? 133 : 132); + id(disp1).set_component_text_printf("bt_disarm_text", mui_alarm[5].c_str()); + id(disp1).set_component_background_color("bt_disarm_text", (state=="disarmed") ? 19818 : 52857); + id(disp1).set_component_background_color("bt_disarm_icon", (state=="disarmed") ? 19818 : 52857); } ##### START - GLOBALS CONFIGURATION ##### diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index 499a38b..4d48c1d 100644 Binary files a/nspanel_eu.HMI and b/nspanel_eu.HMI differ diff --git a/nspanel_eu.tft b/nspanel_eu.tft index 50ff16e..592a02d 100644 Binary files a/nspanel_eu.tft and b/nspanel_eu.tft differ diff --git a/nspanel_eu_code/alarm.txt b/nspanel_eu_code/alarm.txt index a3f7116..cc39d72 100644 --- a/nspanel_eu_code/alarm.txt +++ b/nspanel_eu_code/alarm.txt @@ -25,6 +25,11 @@ Page alarm prints lastclick.txt,0 printh 00 printh FF FF FF + vis bt_home,0 + vis bt_away,0 + vis bt_night,0 + vis bt_vacat,0 + vis bt_bypass,0 } Touch Press Event @@ -99,19 +104,9 @@ Text bt_home_text Text : Home Max. Text Size : 10 -Text bt_home_bri - Attributes - ID : 12 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_away_text Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -119,19 +114,9 @@ Text bt_away_text Text : Away Max. Text Size : 10 -Text bt_away_bri - Attributes - ID : 15 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_night_text Attributes - ID : 17 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -139,39 +124,19 @@ Text bt_night_text Text : Night Max. Text Size : 10 -Text bt_night_bri - Attributes - ID : 18 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_vacat_text Attributes - ID : 20 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Vacaation + Text : Vacation Max. Text Size : 10 -Text bt_vacat_bri - Attributes - ID : 21 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_bypass_text Attributes - ID : 23 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -179,19 +144,9 @@ Text bt_bypass_text Text : Bypass Max. Text Size : 10 -Text bt_bypass_bri - Attributes - ID : 24 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_disarm_text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -199,19 +154,9 @@ Text bt_disarm_text Text : Disarm Max. Text Size : 10 -Text bt_disarm_bri - Attributes - ID : 27 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_home_icon Attributes - ID : 28 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +166,7 @@ Text bt_home_icon Text bt_away_icon Attributes - ID : 29 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +176,7 @@ Text bt_away_icon Text bt_night_icon Attributes - ID : 30 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +186,7 @@ Text bt_night_icon Text bt_vacat_icon Attributes - ID : 31 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +196,7 @@ Text bt_vacat_icon Text bt_bypass_icon Attributes - ID : 32 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +206,7 @@ Text bt_bypass_icon Text bt_disarm_icon Attributes - ID : 33 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -285,35 +230,35 @@ Picture bt_home_pic Picture bt_away_pic Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_night_pic Attributes - ID : 16 + ID : 14 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_vacat_pic Attributes - ID : 19 + ID : 16 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_bypass_pic Attributes - ID : 22 + ID : 18 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_disarm_pic Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID: disabled @@ -346,12 +291,15 @@ Hotspot alarm_back Hotspot bt_home Attributes - ID : 34 + ID : 28 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_home_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -363,12 +311,15 @@ Hotspot bt_home Hotspot bt_away Attributes - ID : 35 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_away_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -380,12 +331,15 @@ Hotspot bt_away Hotspot bt_night Attributes - ID : 36 + ID : 30 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_night_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -397,12 +351,15 @@ Hotspot bt_night Hotspot bt_vacat Attributes - ID : 37 + ID : 31 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_vacat_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -414,12 +371,15 @@ Hotspot bt_vacat Hotspot bt_bypass Attributes - ID : 38 + ID : 32 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_bypass_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -431,12 +391,15 @@ Hotspot bt_bypass Hotspot bt_disarm Attributes - ID : 39 + ID : 33 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_disarm_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 57bf742..da98489 100644 Binary files a/nspanel_us.HMI and b/nspanel_us.HMI differ diff --git a/nspanel_us.tft b/nspanel_us.tft index 96bbfb0..099eee2 100644 Binary files a/nspanel_us.tft and b/nspanel_us.tft differ diff --git a/nspanel_us_code/alarm.txt b/nspanel_us_code/alarm.txt index a3f7116..cc39d72 100644 --- a/nspanel_us_code/alarm.txt +++ b/nspanel_us_code/alarm.txt @@ -25,6 +25,11 @@ Page alarm prints lastclick.txt,0 printh 00 printh FF FF FF + vis bt_home,0 + vis bt_away,0 + vis bt_night,0 + vis bt_vacat,0 + vis bt_bypass,0 } Touch Press Event @@ -99,19 +104,9 @@ Text bt_home_text Text : Home Max. Text Size : 10 -Text bt_home_bri - Attributes - ID : 12 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_away_text Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -119,19 +114,9 @@ Text bt_away_text Text : Away Max. Text Size : 10 -Text bt_away_bri - Attributes - ID : 15 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_night_text Attributes - ID : 17 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -139,39 +124,19 @@ Text bt_night_text Text : Night Max. Text Size : 10 -Text bt_night_bri - Attributes - ID : 18 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_vacat_text Attributes - ID : 20 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Vacaation + Text : Vacation Max. Text Size : 10 -Text bt_vacat_bri - Attributes - ID : 21 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_bypass_text Attributes - ID : 23 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -179,19 +144,9 @@ Text bt_bypass_text Text : Bypass Max. Text Size : 10 -Text bt_bypass_bri - Attributes - ID : 24 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_disarm_text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -199,19 +154,9 @@ Text bt_disarm_text Text : Disarm Max. Text Size : 10 -Text bt_disarm_bri - Attributes - ID : 27 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_home_icon Attributes - ID : 28 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +166,7 @@ Text bt_home_icon Text bt_away_icon Attributes - ID : 29 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +176,7 @@ Text bt_away_icon Text bt_night_icon Attributes - ID : 30 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +186,7 @@ Text bt_night_icon Text bt_vacat_icon Attributes - ID : 31 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +196,7 @@ Text bt_vacat_icon Text bt_bypass_icon Attributes - ID : 32 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +206,7 @@ Text bt_bypass_icon Text bt_disarm_icon Attributes - ID : 33 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -285,35 +230,35 @@ Picture bt_home_pic Picture bt_away_pic Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_night_pic Attributes - ID : 16 + ID : 14 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_vacat_pic Attributes - ID : 19 + ID : 16 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_bypass_pic Attributes - ID : 22 + ID : 18 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_disarm_pic Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID: disabled @@ -346,12 +291,15 @@ Hotspot alarm_back Hotspot bt_home Attributes - ID : 34 + ID : 28 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_home_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -363,12 +311,15 @@ Hotspot bt_home Hotspot bt_away Attributes - ID : 35 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_away_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -380,12 +331,15 @@ Hotspot bt_away Hotspot bt_night Attributes - ID : 36 + ID : 30 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_night_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -397,12 +351,15 @@ Hotspot bt_night Hotspot bt_vacat Attributes - ID : 37 + ID : 31 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_vacat_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -414,12 +371,15 @@ Hotspot bt_vacat Hotspot bt_bypass Attributes - ID : 38 + ID : 32 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_bypass_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -431,12 +391,15 @@ Hotspot bt_bypass Hotspot bt_disarm Attributes - ID : 39 + ID : 33 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_disarm_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI index 0e07d5a..c10d98f 100644 Binary files a/nspanel_us_land.HMI and b/nspanel_us_land.HMI differ diff --git a/nspanel_us_land.tft b/nspanel_us_land.tft index 24c96c5..681043f 100644 Binary files a/nspanel_us_land.tft and b/nspanel_us_land.tft differ diff --git a/nspanel_us_land_code/alarm.txt b/nspanel_us_land_code/alarm.txt index a3f7116..cc39d72 100644 --- a/nspanel_us_land_code/alarm.txt +++ b/nspanel_us_land_code/alarm.txt @@ -25,6 +25,11 @@ Page alarm prints lastclick.txt,0 printh 00 printh FF FF FF + vis bt_home,0 + vis bt_away,0 + vis bt_night,0 + vis bt_vacat,0 + vis bt_bypass,0 } Touch Press Event @@ -99,19 +104,9 @@ Text bt_home_text Text : Home Max. Text Size : 10 -Text bt_home_bri - Attributes - ID : 12 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_away_text Attributes - ID : 14 + ID : 13 Scope : local Dragging : 0 Send Component ID : disabled @@ -119,19 +114,9 @@ Text bt_away_text Text : Away Max. Text Size : 10 -Text bt_away_bri - Attributes - ID : 15 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_night_text Attributes - ID : 17 + ID : 15 Scope : local Dragging : 0 Send Component ID : disabled @@ -139,39 +124,19 @@ Text bt_night_text Text : Night Max. Text Size : 10 -Text bt_night_bri - Attributes - ID : 18 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_vacat_text Attributes - ID : 20 + ID : 17 Scope : local Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : Vacaation + Text : Vacation Max. Text Size : 10 -Text bt_vacat_bri - Attributes - ID : 21 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_bypass_text Attributes - ID : 23 + ID : 19 Scope : local Dragging : 0 Send Component ID : disabled @@ -179,19 +144,9 @@ Text bt_bypass_text Text : Bypass Max. Text Size : 10 -Text bt_bypass_bri - Attributes - ID : 24 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_disarm_text Attributes - ID : 26 + ID : 21 Scope : local Dragging : 0 Send Component ID : disabled @@ -199,19 +154,9 @@ Text bt_disarm_text Text : Disarm Max. Text Size : 10 -Text bt_disarm_bri - Attributes - ID : 27 - Scope : local - Dragging : 0 - Send Component ID : disabled - Associated Keyboard: none - Text : - Max. Text Size : 4 - Text bt_home_icon Attributes - ID : 28 + ID : 22 Scope : local Dragging : 0 Send Component ID : disabled @@ -221,7 +166,7 @@ Text bt_home_icon Text bt_away_icon Attributes - ID : 29 + ID : 23 Scope : local Dragging : 0 Send Component ID : disabled @@ -231,7 +176,7 @@ Text bt_away_icon Text bt_night_icon Attributes - ID : 30 + ID : 24 Scope : local Dragging : 0 Send Component ID : disabled @@ -241,7 +186,7 @@ Text bt_night_icon Text bt_vacat_icon Attributes - ID : 31 + ID : 25 Scope : local Dragging : 0 Send Component ID : disabled @@ -251,7 +196,7 @@ Text bt_vacat_icon Text bt_bypass_icon Attributes - ID : 32 + ID : 26 Scope : local Dragging : 0 Send Component ID : disabled @@ -261,7 +206,7 @@ Text bt_bypass_icon Text bt_disarm_icon Attributes - ID : 33 + ID : 27 Scope : local Dragging : 0 Send Component ID : disabled @@ -285,35 +230,35 @@ Picture bt_home_pic Picture bt_away_pic Attributes - ID : 13 + ID : 12 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_night_pic Attributes - ID : 16 + ID : 14 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_vacat_pic Attributes - ID : 19 + ID : 16 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_bypass_pic Attributes - ID : 22 + ID : 18 Scope : local Dragging : 0 Send Component ID: disabled Picture bt_disarm_pic Attributes - ID : 25 + ID : 20 Scope : local Dragging : 0 Send Component ID: disabled @@ -346,12 +291,15 @@ Hotspot alarm_back Hotspot bt_home Attributes - ID : 34 + ID : 28 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_home_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"home\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -363,12 +311,15 @@ Hotspot bt_home Hotspot bt_away Attributes - ID : 35 + ID : 29 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_away_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"away\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -380,12 +331,15 @@ Hotspot bt_away Hotspot bt_night Attributes - ID : 36 + ID : 30 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_night_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"night\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -397,12 +351,15 @@ Hotspot bt_night Hotspot bt_vacat Attributes - ID : 37 + ID : 31 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_vacat_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"vacation\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -414,12 +371,15 @@ Hotspot bt_vacat Hotspot bt_bypass Attributes - ID : 38 + ID : 32 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_bypass_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"bypass\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92 @@ -431,12 +391,15 @@ Hotspot bt_bypass Hotspot bt_disarm Attributes - ID : 39 + ID : 33 Scope : local Dragging : 0 Send Component ID: disabled Events + Touch Press Event + bt_disarm_pic.pic=134 + Touch Release Event lastclick.txt="{\"domain\": \"alarm\", \"key\": \"disarm\", \"value\": \"click\", \"entity\": \""+home.entity.txt+"\"}" printh 92