Skip to content

Instantly share code, notes, and snippets.

@tjd-dev
Last active October 21, 2022 16:09
Show Gist options
  • Save tjd-dev/e39073a683bf96e13c4969a09f84b19a to your computer and use it in GitHub Desktop.
Save tjd-dev/e39073a683bf96e13c4969a09f84b19a to your computer and use it in GitHub Desktop.

Revisions

  1. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 47 additions and 47 deletions.
    94 changes: 47 additions & 47 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -132,57 +132,57 @@ blueprint:
    selector:
    action: {}

    trigger:
    - platform: event
    trigger:
    platform: event
    event_type: zwave_js_value_notification
    event_data:
    command_class_name: Central Scene
    device_id: !input minoston_mr40z
    action:
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    scene_value_id: "{{ trigger.event.data.value }}"
    action:
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    scene_value_id: "{{ trigger.event.data.value }}"

    - choose:
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_1_1
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_1_2
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressede3x' }}"
    sequence: !input button_1_3
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_1_released
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_2_1
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_2_2
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_2_3
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_2_released
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_3_1
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_3_2
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_3_3
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_3_released
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_4_1
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_4_2
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_4_3
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    - choose:
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_1_1
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_1_2
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressede3x' }}"
    sequence: !input button_1_3
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_1_released
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_2_1
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_2_2
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_2_3
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_2_released
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_3_1
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_3_2
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_3_3
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_3_released
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_4_1
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_4_2
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_4_3
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    mode: single
    max_exceeded: silent
  2. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -184,5 +184,5 @@ blueprint:
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    mode: single
    max_exceeded: silent
    mode: single
    max_exceeded: silent
  3. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 48 additions and 48 deletions.
    96 changes: 48 additions & 48 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    blueprint:
    blueprint:
    name: Minoston MR40Z S2 Remote Control Switch
    description: Create an automation for the Minoston MR40Z 4 button remote using ZWAVE-JS integration
    domain: automation
    @@ -120,69 +120,69 @@
    selector:
    action: {}
    button_4_held:
    name: Hold Button Four (Right Small)
    name: Hold Button Four (Right Small)
    description: Action to run on button hold.
    default: []
    selector:
    action: {}
    button_4_released:
    name: Release Button Four (Right Small)
    name: Release Button Four (Right Small)
    description: Action to run on button release.
    default: []
    selector:
    action: {}

    trigger:
    platform: event
    - platform: event
    event_type: zwave_js_value_notification
    event_data:
    command_class_name: Central Scene
    device_id: !input minoston_mr40z
    action:
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    scene_value_id: "{{ trigger.event.data.value }}"
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    scene_value_id: "{{ trigger.event.data.value }}"

    - choose:
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_1_1
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_1_2
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressede3x' }}"
    sequence: !input button_1_3
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_1_released
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_2_1
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_2_2
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_2_3
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_2_released
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_3_1
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_3_2
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_3_3
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_3_released
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_4_1
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_4_2
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_4_3
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    - choose:
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_1_1
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_1_2
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressede3x' }}"
    sequence: !input button_1_3
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_1_released
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_2_1
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_2_2
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_2_3
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_2_released
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_3_1
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_3_2
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_3_3
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_3_released
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_4_1
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_4_2
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_4_3
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    mode: single
    max_exceeded: silent
  4. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -132,13 +132,13 @@
    selector:
    action: {}

    trigger:
    - platform: event
    trigger:
    platform: event
    event_type: zwave_js_value_notification
    event_data:
    command_class_name: Central Scene
    device_id: !input minoston_mr40z
    action:
    action:
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    scene_value_id: "{{ trigger.event.data.value }}"
    @@ -184,5 +184,5 @@ action:
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    mode: single
    max_exceeded: silent
    mode: single
    max_exceeded: silent
  5. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -133,7 +133,7 @@
    action: {}

    trigger:
    platform: event
    - platform: event
    event_type: zwave_js_value_notification
    event_data:
    command_class_name: Central Scene
  6. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -132,8 +132,6 @@
    selector:
    action: {}

    mode:single
    max_exceeded: silent
    trigger:
    platform: event
    event_type: zwave_js_value_notification
    @@ -185,4 +183,6 @@ action:
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released
    sequence: !input button_4_released
    mode: single
    max_exceeded: silent
  7. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -132,7 +132,7 @@
    selector:
    action: {}

    mode: single
    mode:single
    max_exceeded: silent
    trigger:
    platform: event
  8. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -133,9 +133,7 @@
    action: {}

    mode: single

    max_exceeded: silent

    trigger:
    platform: event
    event_type: zwave_js_value_notification
  9. Tim Dolan revised this gist Oct 21, 2022. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    name: Minoston MR40Z S2 Remote Control Switch
    blueprint:
    name: Minoston MR40Z S2 Remote Control Switch
    description: Create an automation for the Minoston MR40Z 4 button remote using ZWAVE-JS integration
    domain: automation
    input:
  10. Tim Dolan created this gist Oct 21, 2022.
    189 changes: 189 additions & 0 deletions scene_controller.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,189 @@
    name: Minoston MR40Z S2 Remote Control Switch
    description: Create an automation for the Minoston MR40Z 4 button remote using ZWAVE-JS integration
    domain: automation
    input:
    minoston_mr40z:
    name: Minoston MR40Z
    description: The Minoston MR40Z to interact with.
    selector:
    device:
    integration: zwave_js
    manufacturer: Minoston
    model: MR40Z
    button_1_1:
    name: Press Button One (Top Large) 1x
    description: Action to run on button press once.
    default: []
    selector:
    action: {}
    button_1_2:
    name: Press Button One (Top Large) 2x
    description: Action to run on button press twice.
    default: []
    selector:
    action: {}
    button_1_3:
    name: Press Button One (Top Large) 3x
    description: Action to run on button press thrice.
    default: []
    selector:
    action: {}
    button_1_held:
    name: Hold Button One (Top Large)
    description: Action to run on button hold.
    default: []
    selector:
    action: {}
    button_1_released:
    name: Release Button One (Top Large)
    description: Action to run on button release.
    default: []
    selector:
    action: {}
    button_2_1:
    name: Press Button Two (Bottom Large) 1x
    description: Action to run on button press once.
    default: []
    selector:
    action: {}
    button_2_2:
    name: Press Button Two (Bottom Large) 2x
    description: Action to run on button press twice.
    default: []
    selector:
    action: {}
    button_2_3:
    name: Press Button Two (Bottom Large) 3x
    description: Action to run on button press thrice.
    default: []
    selector:
    action: {}
    button_2_held:
    name: Hold Button Two (Bottom Large)
    description: Action to run on button hold.
    default: []
    selector:
    action: {}
    button_2_released:
    name: Release Button Two (Bottom Large)
    description: Action to run on button release.
    default: []
    selector:
    action: {}
    button_3_1:
    name: Press Button Three (Left Small) 1x
    description: Action to run on button press once.
    default: []
    selector:
    action: {}
    button_3_2:
    name: Press Button Three (Left Small) 2x
    description: Action to run on button press twice.
    default: []
    selector:
    action: {}
    button_3_3:
    name: Press Button One (Left Small) 3x
    description: Action to run on button press thrice.
    default: []
    selector:
    action: {}
    button_3_held:
    name: Hold Button Three (Left Small)
    description: Action to run on button hold.
    default: []
    selector:
    action: {}
    button_3_released:
    name: Release Button Three (Left Small)
    description: Action to run on button release.
    default: []
    selector:
    action: {}
    button_4_1:
    name: Press Button Four (Right Small) 1x
    description: Action to run on button press once.
    default: []
    selector:
    action: {}
    button_4_2:
    name: Press Button Four (Right Small) 2x
    description: Action to run on button press twice.
    default: []
    selector:
    action: {}
    button_4_3:
    name: Press Button One (Right Small) 3x
    description: Action to run on button press thrice.
    default: []
    selector:
    action: {}
    button_4_held:
    name: Hold Button Four (Right Small)
    description: Action to run on button hold.
    default: []
    selector:
    action: {}
    button_4_released:
    name: Release Button Four (Right Small)
    description: Action to run on button release.
    default: []
    selector:
    action: {}

    mode: single

    max_exceeded: silent

    trigger:
    platform: event
    event_type: zwave_js_value_notification
    event_data:
    command_class_name: Central Scene
    device_id: !input minoston_mr40z
    action:
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    scene_value_id: "{{ trigger.event.data.value }}"

    - choose:
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_1_1
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_1_2
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyPressede3x' }}"
    sequence: !input button_1_3
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '001' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_1_released
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_2_1
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_2_2
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_2_3
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '002' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_2_released
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_3_1
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_3_2
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_3_3
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '003' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_3_released
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed' }}"
    sequence: !input button_4_1
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed2x' }}"
    sequence: !input button_4_2
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyPressed3x' }}"
    sequence: !input button_4_3
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyHeldDown' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and scene_value_id == 'KeyReleased' }}"
    sequence: !input button_4_released