Skip to content

Instantly share code, notes, and snippets.

@rduplain
Last active December 29, 2022 03:42
Show Gist options
  • Save rduplain/45d6d6075024af39aa34f2342c4afa46 to your computer and use it in GitHub Desktop.
Save rduplain/45d6d6075024af39aa34f2342c4afa46 to your computer and use it in GitHub Desktop.

Revisions

  1. rduplain revised this gist Dec 29, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion zwave-js-hank-scn04-4-button-remote.yaml
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    blueprint:
    name: Hank Four-button Scene Controller
    name: Hank Four-button Scene Controller (Z-Wave JS)
    description: Create automations for Hank Electronics / Technisat 4-button remote using the ZWave-JS integration
    domain: automation

  2. rduplain revised this gist Mar 18, 2022. No changes.
  3. rduplain revised this gist Aug 26, 2021. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions zwave-js-hank-scn04-4-button-remote.yaml
    Original file line number Diff line number Diff line change
    @@ -83,19 +83,19 @@ action:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    key_state: "{{ trigger.event.data.value }}"
    - choose:
    - conditions: "{{ scene_id == '001' and key_state == '0' }}"
    - conditions: "{{ scene_id == '001' and key_state == 0 }}"
    sequence: !input button_1_pressed
    - conditions: "{{ scene_id == '001' and key_state == '2' }}"
    - conditions: "{{ scene_id == '001' and key_state == 2 }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '002' and key_state == '0' }}"
    - conditions: "{{ scene_id == '002' and key_state == 0 }}"
    sequence: !input button_2_pressed
    - conditions: "{{ scene_id == '002' and key_state == '2' }}"
    - conditions: "{{ scene_id == '002' and key_state == 2 }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '003' and key_state == '0' }}"
    - conditions: "{{ scene_id == '003' and key_state == 0 }}"
    sequence: !input button_3_pressed
    - conditions: "{{ scene_id == '003' and key_state == '2' }}"
    - conditions: "{{ scene_id == '003' and key_state == 2 }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '004' and key_state == '0' }}"
    - conditions: "{{ scene_id == '004' and key_state == 0 }}"
    sequence: !input button_4_pressed
    - conditions: "{{ scene_id == '004' and key_state == '2' }}"
    sequence: !input button_4_held
    - conditions: "{{ scene_id == '004' and key_state == 2 }}"
    sequence: !input button_4_held
  4. rduplain revised this gist Aug 26, 2021. 1 changed file with 16 additions and 16 deletions.
    32 changes: 16 additions & 16 deletions zwave-js-hank-scn04-4-button-remote.yaml
    Original file line number Diff line number Diff line change
    @@ -13,56 +13,56 @@ blueprint:
    model: SCN04

    button_1_pressed:
    name: Button 1 (Sleep icon) Pressed
    name: Button 1 (Sleep) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_1_held:
    name: Button 1 (Sleep icon) Held Down
    name: Button 1 (Sleep) Held Down
    description: Action to run when button is held
    default: []
    selector:
    action:

    button_2_pressed:
    name: Button 2 (People icon) Pressed
    name: Button 2 (People) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_2_held:
    name: Button 2 (People icon) Held Down
    name: Button 2 (People) Held Down
    description: Action to run when button is held
    default: []
    selector:
    action:

    button_3_pressed:
    name: Button 3 (Centre button) Pressed
    name: Button 3 (Center) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_3_held:
    name: Button 3 (Centre button) Held Down
    name: Button 3 (Center) Held Down
    description: Action to run when button is held
    default: []
    selector:
    action:

    button_4_pressed:
    name: Button 4 (Power icon) Pressed
    name: Button 4 (Power) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_4_held:
    name: Button 4 (Power icon) Held Down
    name: Button 4 (Power) Held Down
    description: Action to run when button is held
    default: []
    selector:
    @@ -83,19 +83,19 @@ action:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    key_state: "{{ trigger.event.data.value }}"
    - choose:
    - conditions: "{{ scene_id == '001' and key_state == 'KeyPressed' }}"
    - conditions: "{{ scene_id == '001' and key_state == '0' }}"
    sequence: !input button_1_pressed
    - conditions: "{{ scene_id == '001' and key_state == 'KeyHeldDown' }}"
    - conditions: "{{ scene_id == '001' and key_state == '2' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '002' and key_state == 'KeyPressed' }}"
    - conditions: "{{ scene_id == '002' and key_state == '0' }}"
    sequence: !input button_2_pressed
    - conditions: "{{ scene_id == '002' and key_state == 'KeyHeldDown' }}"
    - conditions: "{{ scene_id == '002' and key_state == '2' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '003' and key_state == 'KeyPressed' }}"
    - conditions: "{{ scene_id == '003' and key_state == '0' }}"
    sequence: !input button_3_pressed
    - conditions: "{{ scene_id == '003' and key_state == 'KeyHeldDown' }}"
    - conditions: "{{ scene_id == '003' and key_state == '2' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '004' and key_state == 'KeyPressed' }}"
    - conditions: "{{ scene_id == '004' and key_state == '0' }}"
    sequence: !input button_4_pressed
    - conditions: "{{ scene_id == '004' and key_state == 'KeyHeldDown' }}"
    - conditions: "{{ scene_id == '004' and key_state == '2' }}"
    sequence: !input button_4_held
  5. rduplain created this gist Aug 26, 2021.
    101 changes: 101 additions & 0 deletions zwave-js-hank-scn04-4-button-remote.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,101 @@
    blueprint:
    name: Hank Four-button Scene Controller
    description: Create automations for Hank Electronics / Technisat 4-button remote using the ZWave-JS integration
    domain: automation

    input:
    hank_scn04:
    name: Hank Four-button Controller
    selector:
    device:
    integration: zwave_js
    manufacturer: HANK Electronics Ltd.
    model: SCN04

    button_1_pressed:
    name: Button 1 (Sleep icon) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_1_held:
    name: Button 1 (Sleep icon) Held Down
    description: Action to run when button is held
    default: []
    selector:
    action:

    button_2_pressed:
    name: Button 2 (People icon) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_2_held:
    name: Button 2 (People icon) Held Down
    description: Action to run when button is held
    default: []
    selector:
    action:

    button_3_pressed:
    name: Button 3 (Centre button) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_3_held:
    name: Button 3 (Centre button) Held Down
    description: Action to run when button is held
    default: []
    selector:
    action:

    button_4_pressed:
    name: Button 4 (Power icon) Pressed
    description: Action to run when button is pressed
    default: []
    selector:
    action:

    button_4_held:
    name: Button 4 (Power icon) Held Down
    description: Action to run when button is held
    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 hank_scn04

    action:
    - variables:
    scene_id: "{{ trigger.event.data.property_key_name }}"
    key_state: "{{ trigger.event.data.value }}"
    - choose:
    - conditions: "{{ scene_id == '001' and key_state == 'KeyPressed' }}"
    sequence: !input button_1_pressed
    - conditions: "{{ scene_id == '001' and key_state == 'KeyHeldDown' }}"
    sequence: !input button_1_held
    - conditions: "{{ scene_id == '002' and key_state == 'KeyPressed' }}"
    sequence: !input button_2_pressed
    - conditions: "{{ scene_id == '002' and key_state == 'KeyHeldDown' }}"
    sequence: !input button_2_held
    - conditions: "{{ scene_id == '003' and key_state == 'KeyPressed' }}"
    sequence: !input button_3_pressed
    - conditions: "{{ scene_id == '003' and key_state == 'KeyHeldDown' }}"
    sequence: !input button_3_held
    - conditions: "{{ scene_id == '004' and key_state == 'KeyPressed' }}"
    sequence: !input button_4_pressed
    - conditions: "{{ scene_id == '004' and key_state == 'KeyHeldDown' }}"
    sequence: !input button_4_held