This is a blueprint for triggering actions based on presses of the buttons of the Smartthings S2 Remote Control (MR40Z) using the ZWave-JS Integration. The following button presses are handled for each of the 4 buttons:
Single Press
Double Press
Triple Press
Button Hold
blueprint:
name: Smartthings S2 Remote Control Switch - MR40Z (ZWave-JS)
description: Create automations for the Smarthings S2 Remote Control Switch - MR40Z using ZWave-JS Integraetion
domain: automation
input:
zwave_device:
name: Smartthings S2 Remote Control Switch - MR40Z
description: List of available MR40Z's.
selector:
device:
integration: zwave_js
manufacturer: Minoston
model: MR40Z
button_1_single_pressed:
name: Button 1 - Single Pressed
description: Action to run, when button 1 is pressed.
default: []
selector:
action: {}
button_1_double_pressed:
name: Button 1 - Double Pressed
description: Action to run, when button 1 is double pressed.
default: []
selector:
action: {}
button_1_triple_pressed:
name: Button 1 - Triple Pressed
description: Action to run, when button 1 is triple pressed.
default: []
selector:
action: {}
button_1_held:
name: Button 1 - Button Held
description: Action to run, when the button 1 is held.
default: []
selector:
action: {}
button_2_single_pressed:
name: Button 2 - Single Pressed
description: Action to run, when the button 2 pressed.
default: []
selector:
action: {}
button_2_double_pressed:
name: Button 2 - Double Pressed
description: Action to run, when button 2 is double pressed.
default: []
selector:
action: {}
button_2_triple_pressed:
name: Button 2 - Triple Pressed
description: Action to run, when button 2 is triple pressed.
default: []
selector:
action: {}
button_2_held:
name: Button 2 - Button Held
description: Action to run, when the button 2 is held.
default: []
selector:
action: {}
button_3_single_pressed:
name: Button 3 - Single Pressed
description: Action to run, when the button 3 is pressed.
default: []
selector:
action: {}
button_3_double_pressed:
name: Button 3 - Double Pressed
description: Action to run, when button 3 is double pressed.
default: []
selector:
action: {}
button_3_triple_pressed:
name: Button 3 - Triple Pressed
description: Action to run, when button 3 is triple pressed.
default: []
selector:
action: {}
button_3_held:
name: Button 3 - Button Held
description: Action to run, when the button 3 is held.
default: []
selector:
action: {}
button_4_single_pressed:
name: Button 4 - Single Pressed
description: Action to run, when the button 4 is pressed.
default: []
selector:
action: {}
button_4_double_pressed:
name: Button 4 - Double Pressed
description: Action to run, when button 4 is double pressed.
default: []
selector:
action: {}
button_4_triple_pressed:
name: Button 4 - Triple Pressed
description: Action to run, when button 4 is triple pressed.
default: []
selector:
action: {}
button_4_held:
name: Button 4 - Button Held
description: Action to run, when the button 4 is held.
default: []
selector:
action: {}
mode: single
max_exceeded: silent
variables:
device_id: !input 'zwave_device'
trigger:
- platform: event
event_type: zwave_js_value_notification
condition: '{{ trigger.event.data.device_id == device_id }}'
action:
- variables:
button_id: '{{ trigger.event.data.property_key_name }}'
press_count: '{{ trigger.event.data.value }}'
- service: logbook.log
data:
name: Button Id
message: '{{ button_id }}'
- service: logbook.log
data:
name: Press Count
message: '{{ press_count }}'
- service: logbook.log
data:
name: Device
message: '{{ zwave_device }}'
- choose:
- conditions: '{{ button_id == "001" and press_count == "KeyPressed" }}'
sequence: !input 'button_1_single_pressed'
- conditions: '{{ button_id == "002" and press_count == "KeyPressed" }}'
sequence: !input 'button_2_single_pressed'
- conditions: '{{ button_id == "003" and press_count == "KeyPressed" }}'
sequence: !input 'button_3_single_pressed'
- conditions: '{{ button_id == "004" and press_count == "KeyPressed" }}'
sequence: !input 'button_4_single_pressed'
- conditions: '{{ button_id == "001" and press_count == "KeyPressed2x" }}'
sequence: !input 'button_1_double_pressed'
- conditions: '{{ button_id == "002" and press_count == "KeyPressed2x" }}'
sequence: !input 'button_2_double_pressed'
- conditions: '{{ button_id == "003" and press_count == "KeyPressed2x" }}'
sequence: !input 'button_3_double_pressed'
- conditions: '{{ button_id == "004" and press_count == "KeyPressed2x" }}'
sequence: !input 'button_4_double_pressed'
- conditions: '{{ button_id == "001" and press_count == "KeyPressed3x" }}'
sequence: !input 'button_1_triple_pressed'
- conditions: '{{ button_id == "002" and press_count == "KeyPressed3x" }}'
sequence: !input 'button_2_triple_pressed'
- conditions: '{{ button_id == "003" and press_count == "KeyPressed3x" }}'
sequence: !input 'button_3_triple_pressed'
- conditions: '{{ button_id == "004" and press_count == "KeyPressed3x" }}'
sequence: !input 'button_4_triple_pressed'
- conditions: '{{ button_id == "001" and press_count == "KeyHeldDown" }}'
sequence: !input 'button_1_held'
- conditions: '{{ button_id == "002" and press_count == "KeyHeldDown" }}'
sequence: !input 'button_2_held'
- conditions: '{{ button_id == "003" and press_count == "KeyHeldDown" }}'
sequence: !input 'button_3_held'
- conditions: '{{ button_id == "004" and press_count == "KeyHeldDown" }}'
sequence: !input 'button_4_held'