Homeseer WD200+ Zwave Plus Wall Dimmer

This is so awesome!! I just read in this thread "LED Mode" on HomeSeer Switches (100/200 series) that HA has support for the LEDs. I’ve built a package to set a few of the states on the switch to easily enable automations to set them up.

Notes:

  • My HS-WD200+ is on node 6 so you’ll probably have to change the automations node_id field to align with yours.
  • I’ve limited the blink frequency to max: 50 because that’s five seconds between off and on and I didn’t care about it blinking off and on with minutes in between.
  • If you rename any of the entity_ids be aware that the last automation’s template looks for the number value in the entities’ names. You’ll get an error if you remap the entity names but not the color automation.
  • I didn’t progam all of the available options for the HS-WD200+ because I don’t care about any of the others.

Every click of the mouse modifies the Z-Wave settings on the device, real time!

from my packages/hs_wd200.yaml file:

homeassistant:

input_boolean:
  hs_wd200_status_mode:
    name: Status Mode
    initial: on
  hs_wd200_normal_mode:
    name: Normal Mode
    initial: off

group:
  input_hs_wd200_normal_mode_on:
    name: Input HS-WD200+ Normal Mode ON
    entities:
      - input_boolean.hs_wd200_status_mode
  input_hs_wd200_status_mode_on:
    name: Input HS-WD200+ Status Mode ON
    entities:
      - input_boolean.hs_wd200_normal_mode

input_number:
  hs_wd200_leds_blink_mask:
    name: LEDs Blink Mask
    min: 0
    max: 127
    mode: box
  hs_wd200_leds_blink_frequency: # Limited this to 50 since that's 5 seconds between blinks real max is 255!!
    name: LEDs Blink Frequency
    min: 0
    max: 50

input_select:
  hs_wd200_dimmer_led_mode:
    name: Dimmer LED Mode
    options:
      - Normal mode
      - Status mode
  hs_wd200_normal_mode_led_color:
    name: Normal Mode LED Color
    options:
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_1_color:
    name: LED 1 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_2_color:
    name: LED 2 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_3_color:
    name: LED 3 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_4_color:
    name: LED 4 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_5_color:
    name: LED 5 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_6_color:
    name: LED 6 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green
  hs_wd200_led_7_color:
    name: LED 7 Color
    options:
      - 'Off'
      - White
      - Yellow
      - Cyan
      - Magenta
      - Red
      - Blue
      - Green

automation:
  - id: hs_wd200_normal_mode_panel
    alias: HS-WD200+ Normal Mode Panel
    trigger:
      platform: state
      entity_id: input_boolean.hs_wd200_normal_mode
      from: 'off'
      to: 'on'
    condition: []
    action:
      - service: homeassistant.turn_off
        data:
          entity_id: group.input_hs_wd200_normal_mode_on
      - service: input_select.select_option
        data:
          entity_id: input_select.hs_wd200_dimmer_led_mode
          option: Normal mode

  - id: hs_wd200_status_mode_panel
    alias: HS-WD200+ Status Mode Panel
    trigger:
      platform: state
      entity_id: input_boolean.hs_wd200_status_mode
      from: 'off'
      to: 'on'
    condition: []
    action:
    - service: homeassistant.turn_off
      data:
        entity_id: group.input_hs_wd200_status_mode_on
    - service: input_select.select_option
      data:
        entity_id: input_select.hs_wd200_dimmer_led_mode
        option: Status mode

  - id: hs_wd200_dimmer_led_mode
    initial_state: true
    alias: HS-WD200+ Dimmer LED Mode
    trigger:
      platform: state
      entity_id: input_select.hs_wd200_dimmer_led_mode
    condition: []
    action:
    - service: zwave.set_config_parameter
      data_template:
        node_id: 6
        parameter: 13
        value: "{{ states('input_select.hs_wd200_dimmer_led_mode') }}"

  - id: hs_wd200_normal_mode_led_color
    initial_state: true
    alias: HS-WD200+ Normal Mode LED Color
    trigger:
      platform: state
      entity_id: input_select.hs_wd200_normal_mode_led_color
    condition: []
    action:
    - service: zwave.set_config_parameter
      data_template:
        node_id: 6
        parameter: 14
        value: "{{ states('input_select.hs_wd200_normal_mode_led_color') }}"

  - id: hs_wd200_leds_blink_mask
    initial_state: true
    alias: HS-WD200+ LEDs Blink Mask
    trigger:
      platform: state
      entity_id: input_number.hs_wd200_leds_blink_mask
    condition: []
    action:
    - service: zwave.set_config_parameter
      data_template:
        node_id: 6
        parameter: 31
        value: "{{ states('input_number.hs_wd200_leds_blink_mask') | int }}"

  - id: hs_wd200_leds_blink_frequency
    initial_state: true
    alias: HS-WD200+ LEDs Blink Frequency
    trigger:
      platform: state
      entity_id: input_number.hs_wd200_leds_blink_frequency
    condition: []
    action:
    - service: zwave.set_config_parameter
      data_template:
        node_id: 6
        parameter: 30
        value: "{{ states('input_number.hs_wd200_leds_blink_frequency') | int }}"

# This automation is dependent on the entity_id names, see parameter template caclulation.
  - id: hs_wd200_led_color
    initial_state: true
    alias: HS-WD200+ LED Color
    trigger:
      platform: state
      entity_id: input_select.hs_wd200_led_1_color, input_select.hs_wd200_led_2_color, input_select.hs_wd200_led_3_color, input_select.hs_wd200_led_4_color, input_select.hs_wd200_led_5_color, input_select.hs_wd200_led_6_color, input_select.hs_wd200_led_7_color
    condition: []
    action:
    - service: zwave.set_config_parameter
      data_template:
        node_id: 6
        parameter: "{{ trigger.to_state.entity_id[26] | int + 20 }}"
        value: "{{ trigger.to_state.state }}"

If you’re using custom:button-card like me you can use this card definition to get functionality like I show in the animated gif at the top:

cards:
  - cards:
      - color_type: card
        entity: input_boolean.hs_wd200_normal_mode
        name: Normal Mode
        show_icon: false
        state:
          - value: 'on'
          - value: 'off'
        tap_action:
          action: call-service
          service: homeassistant.turn_on
          service_data:
            entity_id: input_boolean.hs_wd200_normal_mode
        type: 'custom:button-card'
      - color_type: card
        entity: input_boolean.hs_wd200_status_mode
        name: Status Mode
        show_icon: false
        state:
          - value: 'on'
          - value: 'off'
        tap_action:
          action: call-service
          service: homeassistant.turn_on
          service_data:
            entity_id: input_boolean.hs_wd200_status_mode
        type: 'custom:button-card'
    type: horizontal-stack
  - card:
      entities:
        - entity: input_select.hs_wd200_normal_mode_led_color
      title: Normal Mode Options
      type: entities
    conditions:
      - entity: input_boolean.hs_wd200_normal_mode
        state: 'on'
    type: conditional
  - card:
      entities:
        - entity: input_number.hs_wd200_leds_blink_frequency
        - entity: input_number.hs_wd200_leds_blink_mask
        - entity: input_select.hs_wd200_led_7_color
        - entity: input_select.hs_wd200_led_6_color
        - entity: input_select.hs_wd200_led_5_color
        - entity: input_select.hs_wd200_led_4_color
        - entity: input_select.hs_wd200_led_3_color
        - entity: input_select.hs_wd200_led_2_color
        - entity: input_select.hs_wd200_led_1_color
      title: Status Mode Options
      type: entities
    conditions:
      - entity: input_boolean.hs_wd200_status_mode
        state: 'on'
    type: conditional
type: vertical-stack

Now, I need to bake in some automations to set some of these LEDs…