Minoston MR40Z S2 Remote Control Switch (z-wave scene controller)

Here’s a blueprint to integrate the Minoston 4-button Zwave Plus (S2) scene controller switch.
This is a battery-powered scene controller with 4 buttons, two large and two small, in a detachable decora-sized form factor. It supports up to 3x presses for each button as well as ‘hold’ and ‘release’ triggers.

I’ve based this Blueprint on one for the Remotec ZRC-90 by @rule.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

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:
    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 == 'KeyPressed3x' }}"
        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

2 Likes

Here’s the code blueprinted

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:
    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: {}

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
mode: single
max_exceeded: silent

Thanks, I had the “blueprint:” section in my original post, but I guess the forum software stripped it because it was on the same line as the start of the code block.

Typo:
scene_value_id == 'KeyPressede3x'
should be
scene_value_id == 'KeyPressed3x'

I realized that I responded to wrong post. Here is response to code by Participant:

Typo:
scene_value_id == 'KeyPressede3x'
should be
scene_value_id == 'KeyPressed3x'

1 Like

Fixed, thanks.

Thank you for creating this blueprint. I love these little remotes.

1 Like

This may be a silly question, but I am having a problem setting the color of the light from HA. I tried by checking the box for the color name and selected the color “white”, however when I turn on the light it comes on with whatever color the light was last at, rather than the color white.

I also tried checking the box to specify the RGB value. I tried a value of 255 255 255, but then the light did not turn on at all. I then tried [255, 255, 255]. The light did turn on and off again, but still stays at whatever color it last was instead of the color specified.

Any suggestions?

Turns out it is nothing to do with the blueprint, I can reproduce the issue with a simple script. What I have found is that I cannot change the light color and the light brightness at the same time. If I only change one thing it works. If I try to set both, only one change will be applied. To get it to work I have to run 2 actions, one that changes the color and one that changes the brightness.

:+1: Cool, it wasn’t even clear how your first post related to the blueprint, but now I get it.

@Participant - Thanks for this. I am having trouble with zwave inclusion. Were they any tricks to get inclusion? I am pressing button one 5 times, but it pulses purple. Tried reset (button 4x5x5) and still getting purple not blue.

I don’t recall having to do anything special. It seemed to pair pretty easy, I did use the s2 inclusion QR code, though.

Is there a smarter way to do dimming with this template than this?

    button_2_held:
      - repeat:
          sequence:
            - device_id: bd04899bedfe1102cf9a3419ff0939ad
              domain: light
              entity_id: 982965739a285a63ad15534335724739
              type: brightness_decrease
          while:
            - condition: state
              entity_id: event.mremote1_scene_002
              attribute: event_type
              state: KeyHeldDown

Not that I’m aware of, but I’d be all ears if there is.

Anyone notice the remote stop working yesterday? Looking at the logs, mine updated to firmware 8.0. Log shows “Office Remote Firmware turned off 2:24:22 PM - 18 hours ago”
Since then it keeps logging that it sees it (example: Last seen changed to April 7, 2024 at 8:17 AM), but buttons don’t do anything or register as a button press. If you press a button, just another seen message pops up. Like all it is doing is pinging but not sending button commands.