uid: caddxKeypad tags: [] props: parameters: - context: item description: Item to send the pincode to label: Item name: item required: false type: TEXT - default: Partition1 description: The selected partition label: Partition name: selectedPartition required: false type: TEXT - description: The length of the pin label: Pin Length name: pinLength required: true type: INTEGER - description: Replace pincode characters with this string, leave blank to show it as-is label: Mask character name: mask required: false type: TEXT parameterGroups: [] timestamp: Jul 12, 2021, 10:00:06 AM component: f7-block config: label: Please Input Pin style: --f7-button-text-color: var(--f7-text-color) --f7-button-bg-color: var(--f7-card-bg-color) --f7-theme-color-rgb: var(--f7-color-blue-rgb) class: - padding slots: default: - component: f7-card slots: default: - component: f7-card-header config: class: - display-flex - justify-content-center slots: default: - component: Label config: text: "=(vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition" - component: f7-card-content config: class: - display-flex - justify-content-center slots: default: - component: Label config: text: "=(props.mask && vars.pincode) ? ' ' + props.mask.repeat(vars.pincode.length || 0) + ' ' : ' ' + vars.pincode + ' '" - component: f7-row config: class: - margin slots: default: - component: f7-col config: width: 20 class: - display-flex - justify-content-center slots: default: - component: f7-badge config: bgColor: '=(items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "-") ? "gray" : (items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "ON") ? "red" : "green"' style: width: 80px slots: default: - component: Label config: text: ARMED - component: f7-col config: width: 20 class: - display-flex - justify-content-center slots: default: - component: f7-badge config: bgColor: '=(items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_ReadytoArm"].state === "-") ? "gray" : (items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_ReadytoArm"].state === "ON") ? "green" : (items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_ReadytoForceArm"].state === "ON") ? "blue" :"gray"' style: width: 80px slots: default: - component: Label config: text: READY - component: f7-col config: width: 20 class: - display-flex - justify-content-center slots: default: - component: f7-badge config: bgColor: '=(items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "-") ? "gray" : (items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "ON") ? "red" : "green"' style: width: 80px slots: default: - component: Label config: text: FIRE - component: f7-col config: width: 20 class: - display-flex - justify-content-center slots: default: - component: f7-badge config: bgColor: '=(items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "-") ? "gray" : (items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "ON") ? "red" : "green"' style: width: 80px slots: default: - component: Label config: text: POWER - component: f7-row slots: default: - component: f7-col config: width: 20 slots: default: - component: f7-row config: class: - margin-left - margin-top slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: disabled: false raised: true large: true - component: f7-row config: class: - margin-left slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: flame iconSize: 24 iconColor: red active: false raised: true large: true action: command actionItem: CaddxBridge_SendCommand actionCommand: ="partition_secondary_command|4,1" - component: f7-row config: class: - margin-left slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: plus iconSize: 24 iconColor: green active: false raised: true large: true action: command actionItem: CaddxBridge_SendCommand actionCommand: ="partition_secondary_command|5,1" - component: f7-row config: class: - margin-left slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: shield_fill iconSize: 24 iconColor: blue active: false raised: true large: true action: command actionItem: CaddxBridge_SendCommand actionCommand: ="partition_secondary_command|6,1" - component: f7-col config: width: 60 slots: default: - component: f7-row config: class: - margin slots: default: - component: oh-repeater config: fragment: true for: digit in: - "1" - "2" - "3" - "4" - "5" - "6" - "7" - "8" - "9" - T - "0" - S slots: default: - component: f7-col config: width: "33" class: - margin-vertical-half slots: default: - component: oh-button config: text: '=(loop.digit != "T" && loop.digit != "S") ? loop.digit : ""' iconF7: '=(loop.digit == "T") ? "trash" : (loop.digit == "S") ? "hand_thumbsup" : ""' active: false raised: true large: true action: '=(loop.digit == "S") ? "command" : "variable"' actionVariable: pincode actionVariableValue: '=(loop.digit == "T")? "" : (vars.pincode) ? (vars.pincode + loop.digit).substr(-props.pinLength)+"" : loop.digit' actionItem: CaddxBridge_SendCommand actionCommand: '="partition_primary_command_with_pin|0x" + (vars.pincode).substr(1,1) + (vars.pincode).substr(0,1) + ",0x" + (vars.pincode).substr(3,1) + (vars.pincode).substr(2,1) + ",0x" + (vars.pincode+"00").substr(4,1) + (vars.pincode+"00").substr(4,1) + "," + ((items[((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition) + "_Armed"].state === "ON") ? "1" : "2") + "," + (1 << (((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition).substr(-1) - 1))' - component: f7-col config: width: 20 slots: default: - component: f7-row config: class: - margin-right - margin-top slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: person_2_square_stack_fill iconSize: 24 active: false raised: true large: true action: command actionItem: CaddxBridge_SendCommand actionCommand: '="partition_secondary_command|0," + (1 << (((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition).substr(-1) - 1))' - component: f7-row config: class: - margin-right slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: music_note_2 iconSize: 24 active: =items[Partition1_ChimeModeOn] == "ON" raised: true large: true action: command actionItem: CaddxBridge_SendCommand actionCommand: '="partition_secondary_command|1," + (1 << (((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition).substr(-1) - 1))' - component: f7-row config: class: - margin-right slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: house_alt iconSize: 24 active: false raised: true large: true action: command actionItem: CaddxBridge_SendCommand actionCommand: '="partition_secondary_command|2," + (1 << (((vars.selectedPartition === NULL) ? props.selectedPartition : vars.selectedPartition).substr(-1) - 1))' - component: f7-row config: class: - margin-right slots: default: - component: f7-col config: class: - margin-vertical-half slots: default: - component: oh-button config: iconF7: arrow_branch iconSize: 24 active: false raised: true large: true action: popup actionModal: widget:caddxZoneBypass actionModalConfig: - partitionPrefix: vars.selectedPartition - component: f7-row config: style: --f7-theme-color: var(--f7-color-blue) --f7-button-bg-color: transparent class: margin slots: default: - component: oh-repeater config: fragment: true for: partition in: - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 slots: default: - component: f7-col config: width: "10" slots: default: - component: oh-button config: bgColor: '=(items["Partition" + loop.partition + "_Armed"].state === "-") ? "gray" : (items["Partition" + loop.partition + "_Armed"].state === "ON") ? "red" : "green"' style: --f7-button-hover-bg-color: var(--f7-color-blue-tint) --f7-button-pressed-bg-color: var(--f7-color-blue-tint) text: =loop.partition fill: true disabled: '=(items["Partition" + loop.partition + "_Armed"].state === "-") ? true : false' raised: false action: variable actionVariable: selectedPartition actionVariableValue: ='Partition' + loop.partition