diff --git a/keypad_blueprint.yaml b/keypad_blueprint.yaml index 47b85a8..6e99441 100755 --- a/keypad_blueprint.yaml +++ b/keypad_blueprint.yaml @@ -35,8 +35,30 @@ blueprint: default: [] selector: action: + volume_normal: + name: Volume + description: Volume level for announcements on the keypad + default: 7 + selector: + number: + min: 0 + max: 10 + step: 1 + unit_of_measurement: "" + volume_night: + name: Night Mode Arm/Disarm Volume + description: Volume level for the keypad in Armed Night mode + default: 0 + selector: + number: + min: 0 + max: 10 + step: 1 + unit_of_measurement: "" variables: alarm: !input alarm + volume_night: !input volume_night + volume_normal: !input volume_normal formatted_delay: > {% set delay = state_attr(alarm, 'delay') %} {% set total_seconds = delay if delay is not none else 0 %} @@ -119,10 +141,18 @@ trigger: entity_id: !input alarm to: armed_away id: alarm_armed_away + - platform: state + entity_id: !input alarm + to: armed_vacation + id: alarm_armed_away - platform: state entity_id: !input alarm to: armed_home id: alarm_armed_home + - platform: state + entity_id: !input alarm + to: armed_night + id: alarm_armed_home - platform: state entity_id: !input alarm to: pending @@ -144,7 +174,7 @@ action: - code_entered - keypad_disarm sequence: - - service: alarmo.disarm + - action: alarmo.disarm data: entity_id: !input alarm code: > @@ -164,7 +194,7 @@ action: entity_id: !input alarm state: disarmed sequence: - - service: alarmo.arm + - action: alarmo.arm data: entity_id: !input alarm mode: '{{ trigger.id.split("_")[2] }}' @@ -183,7 +213,7 @@ action: event_data: null timeout: '5' continue_on_timeout: false - - service: alarmo.arm + - action: alarmo.arm data: entity_id: !input alarm mode: '{{ trigger.id.split("_")[2] }}' @@ -197,7 +227,7 @@ action: id: - invalid_code sequence: - - service: zwave_js.set_value + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -210,7 +240,7 @@ action: - condition: trigger id: need_bypass sequence: - - service: zwave_js.set_value + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -223,7 +253,14 @@ action: - condition: trigger id: alarm_disarmed sequence: - - service: zwave_js.set_value + - action: zwave_js.set_config_parameter + target: + device_id: !input keypad + data: + endpoint: "0" + parameter: "4" + value: "{{ volume_normal if trigger.from_state.state != 'armed_night' else volume_night }}" + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -232,11 +269,18 @@ action: property: "2" property_key: "1" value: 99 + - action: zwave_js.set_config_parameter + target: + device_id: !input keypad + data: + endpoint: "0" + parameter: "4" + value: "{{ volume_normal }}" - conditions: - condition: trigger id: alarm_armed_away sequence: - - service: zwave_js.set_value + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -249,7 +293,14 @@ action: - condition: trigger id: alarm_armed_home sequence: - - service: zwave_js.set_value + - action: zwave_js.set_config_parameter + target: + device_id: !input keypad + data: + endpoint: "0" + parameter: "4" + value: "{{ volume_normal if trigger.to_state.state != 'armed_night' else volume_night }}" + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -257,12 +308,19 @@ action: endpoint: "0" property: "10" property_key: "1" - value: 99 + value: 100 + - action: zwave_js.set_config_parameter + target: + device_id: !input keypad + data: + endpoint: "0" + parameter: "4" + value: "{{ volume_normal }}" - conditions: - condition: trigger id: alarm_arming sequence: - - service: zwave_js.set_value + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -275,7 +333,7 @@ action: - condition: trigger id: alarm_pending sequence: - - service: zwave_js.set_value + - action: zwave_js.set_value target: device_id: !input keypad data: @@ -288,7 +346,7 @@ action: - condition: trigger id: alarm_triggered sequence: - - service: zwave_js.set_value + - action: zwave_js.set_value target: device_id: !input keypad data: