HomeSeer multi-tap controls

This blueprint allows you to configure the multi-tap actions on HomeSeer devices.

Note: This blueprint assumes that you are using the original ZWave integration.

blueprint:
  name: HomeSeer multi-tap actions
  domain: automation
  input:
      zwave_entity:
          name: zwave entity
          description: Choose the zwave entity
          selector:
            entity:
              integration: zwave
              domain: zwave
      two_tap_up:
        name: 2x tap up
        description: Action to run on double tap up
        default: []
        selector:
          action:
      two_tap_down:
        name: 2x tap down
        description: Action to run on double tap down
        default: []
        selector:
          action:
      three_tap_up:
        name: 3x tap up
        description: Action to run on triple tap up
        default: []
        selector:
          action:
      three_tap_down:
        name: 3x tap down
        description: Action to run on triple tap down
        default: []
        selector:
          action:
      four_tap_up:
        name: 4x tap up
        description: Action to run on four taps up
        default: []
        selector:
          action:
      four_tap_down:
        name: 4x tap down
        description: Action to run on four taps down
        default: []
        selector:
          action:
      five_tap_up:
        name: 5x tap up
        description: Action to run on five taps up
        default: []
        selector:
          action:
      five_tap_down:
        name: 5x tap down
        description: Action to run on five taps down
        default: []
        selector:
          action:

mode: restart
max_exceeded: silent

variables:
  zwave_entity: !input zwave_entity

trigger:
  - platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: !input zwave_entity

action:
  - variables:
      scene_id: '{{ trigger.event.data.scene_id }}'
      scene_data: '{{ trigger.event.data.scene_data }}'
  - choose:
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 1 }}'
      - condition: template
        value_template: '{{ scene_data == 7860 }}'
      sequence: !input two_tap_up
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 2 }}'
      - condition: template
        value_template: '{{ scene_data == 7860 }}'
      sequence: !input two_tap_down
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 1 }}'
      - condition: template
        value_template: '{{ scene_data == 7920 }}'
      sequence: !input three_tap_up
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 2 }}'
      - condition: template
        value_template: '{{ scene_data == 7920 }}'
      sequence: !input three_tap_down
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 1 }}'
      - condition: template
        value_template: '{{ scene_data == 7980 }}'
      sequence: !input four_tap_up
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 2 }}'
      - condition: template
        value_template: '{{ scene_data == 7980 }}'
      sequence: !input four_tap_down
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 1 }}'
      - condition: template
        value_template: '{{ scene_data == 8040 }}'
      sequence: !input five_tap_up
    - conditions:
      - condition: template
        value_template: '{{ scene_id == 2 }}'
      - condition: template
        value_template: '{{ scene_data == 8040 }}'
      sequence: !input five_tap_down
1 Like

@blich Thanks for sharing your blueprint! This worked perfectly for my setup, and it simplifies my existing automations quite a bit.

I only wish Home-Assistant provided a way to do select multiple zwave entities here, without having to hardcode a specific number of them. I have 5 of these switches in my kitchen area, and I’d love to create a single automation via blueprint so that they can all behave the same way with respect to the multi-tap controls.

I can easily adapt your blueprint to accomodate this, but it’d be specific to my setup and not easily sharable :man_shrugging:

I’ve modified the original code provided for OpenZWave use. If you are using the OpenZWave Beta extension you can use the following logic to replace the code based on the native zwave implementation.

I tested this only the fan controller switch. I do not know if other HomeSeer switches will have issues.

Simple changes were to convert from entity select to node id entry, to match conditions to the node_id coming from the event and to filter based on the scene_value_id, which replaces scene_data when using OZW. I also converted the match values to be consistent with what is coming in the event. No longer do the four digit scene IDs work.

As far as I am aware there is no easy way to convert from an entity selector to a node_id, thus I have changed the selector to a number field and this will require you to change your automations to identify switches generating events by their node_id. I could not determine an easy way to match based on entity selection (node_id could not be found) and the event from OZW does not contain the entity. If someone else has a fix for this, please share.

blueprint:
  name: HomeSeer multi-tap actions
  domain: automation
  input:
    ozwave_entity:
      name: OZW Node Identity
      description: Provide the node id of the entity that will control this automation. 
    two_tap_up:
      name: 2x tap up
      description: Action to run on double tap up
      default: []
      selector:
        action: {}
    two_tap_down:
      name: 2x tap down
      description: Action to run on double tap down
      default: []
      selector:
        action: {}
    three_tap_up:
      name: 3x tap up
      description: Action to run on triple tap up
      default: []
      selector:
        action: {}
    three_tap_down:
      name: 3x tap down
      description: Action to run on triple tap down
      default: []
      selector:
        action: {}
    four_tap_up:
      name: 4x tap up
      description: Action to run on four taps up
      default: []
      selector:
        action: {}
    four_tap_down:
      name: 4x tap down
      description: Action to run on four taps down
      default: []
      selector:
        action: {}
    five_tap_up:
      name: 5x tap up
      description: Action to run on five taps up
      default: []
      selector:
        action: {}
    five_tap_down:
      name: 5x tap down
      description: Action to run on five taps down
      default: []
      selector:
        action: {}
  source_url: https://community.home-assistant.io/t/homeseer-multi-tap-controls/257141
mode: restart
max_exceeded: silent
variables:
  ozwave_node: !input ozwave_entity
trigger:
- platform: event
  event_type: ozw.scene_activated
condition: "{{ trigger.event.data.node_id == (ozwave_node | int) }}"
action:
- variables:
    scene_id: '{{ trigger.event.data.scene_id }}'
    scene_value_id: '{{ trigger.event.data.scene_value_id }}'
- choose:
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 1 }}'
    - condition: template
      value_template: '{{ scene_value_id  == 4 }}'
    sequence: !input 'two_tap_up'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 2 }}'
    - condition: template
      value_template: '{{ scene_value_id == 4 }}'
    sequence: !input 'two_tap_down'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 1 }}'
    - condition: template
      value_template: '{{ scene_value_id == 5 }}'
    sequence: !input 'three_tap_up'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 2 }}'
    - condition: template
      value_template: '{{ scene_value_id  == 5 }}'
    sequence: !input 'three_tap_down'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 1 }}'
    - condition: template
      value_template: '{{ scene_value_id  == 6 }}'
    sequence: !input 'four_tap_up'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 2 }}'
    - condition: template
      value_template: '{{ scene_value_id  == 6 }}'
    sequence: !input 'four_tap_down'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 1 }}'
    - condition: template
      value_template: '{{ scene_value_id  == 7 }}'
    sequence: !input 'five_tap_up'
  - conditions:
    - condition: template
      value_template: '{{ scene_id == 2 }}'
    - condition: template
      value_template: '{{ scene_value_id  == 7 }}'
    sequence: !input 'five_tap_down'

If you use this blueprint to replace the previous one, you will need to rebuild your automations. You should remove them if you change the contents of your original blueprint file, as this new format will not be compatible with your existing automations if based on the old logic.

If someone has an update for Z-Wave JS please share. I have not updated to use Z-Wave JS.