Programming ZSE 50 siren in automations

I am looking for information to help me program a Zooz ZSE 50 siren in automations.

I have it working with an automation but I can only use the default siren sound and led light settings. I would like to change them for individual automations, i.e. different settings for a water leak vs movement vs fire alarm.
There is probably a way to do this via yaml in the automation but I’m not sure how to proceed.

I’ve been working on that very thing.

When calling siren.zse50_alarm_play_tone, the values you pass for tone and volume_level will override the default values. It appears that other values will not be affected.

I haven’t tried changing the color yet.

When it comes to selecting actions based on which sensors are triggered, you can use 1) an automation for each sensor, 2) an automation with each sensor and its actions, or 3) make a helper of all your sensors, trigger the automation when the helper changes state, then depending on which sensor set your action(s).

So far I’ve just managed to make an automation with a sensor helper and one action. I’m working on more possibilities.

Here’s a script that sets every parameter that controls the siren. You can change the values to suit.

I’m now figuring out how to set those values with variables passed from an automation. Any suggestion would be appreciated!

sequence:
  - parallel:
      - action: zwave_js.set_value
        metadata: {}
        data:
          entity_id:
            - number.zse50_alarm_playback_mode
          command_class: "112"
          property: "1"
          value: "0"
      - action: zwave_js.set_value
        metadata: {}
        data:
          entity_id:
            - number.zse50_alarm_playback_duration
          property: "2"
          value: "1"
          command_class: "112"
      - action: zwave_js.set_value
        metadata: {}
        data:
          entity_id:
            - number.zse50_alarm_playback_loop_count
          property: "3"
          value: "1"
          command_class: "112"
      - action: zwave_js.set_value
        metadata: {}
        data:
          entity_id:
            - number.zse50_alarm_led_indicator_mode
          command_class: "112"
          property: "6"
          value: "1"
      - action: zwave_js.set_value
        metadata: {}
        data:
          entity_id:
            - number.zse50_alarm_led_indicator_color
          value: "85"
          command_class: "112"
          property: "7"
      - action: zwave_js.set_value
        metadata: {}
        data:
          entity_id:
            - number.zse50_alarm_led_indicator_brightness
          value: "5"
          command_class: "112"
          property: "14"
  - sequence:
      - action: siren.turn_on
        metadata: {}
        data:
        # sets the sound and volume
          tone: "25"
          volume_level: 0.33
        target:
          entity_id: siren.zse50_alarm_play_tone
      - delay:
          hours: 0
          minutes: 0
          seconds: 3
          milliseconds: 0
      - action: siren.turn_off
        metadata: {}
        data: {}
        target:
          entity_id: siren.zse50_alarm_play_tone
alias: Siren Play Ding
description: ""
icon: mdi:bell
1 Like

Thanks for the information, this might be what I am looking for.

So I understand correctly, are you putting this script into automation’s?
Where do command_class numbers come from?

Is this how parameters are addressed in automations?

I was thinking of making the 2 sirens I have into a group so each automation would trigger both simultaneously. I was having trouble with the group category and could not find anything that was close. Although it wouldn’t be difficult to address them individually.

Yes, notice that these are actions which can be in automations or scripts.
The command_class can be found in the Z-Wave JS UI under the Configuration tab:

There are about five actions that can be used to set the property values. I found the zwave_js.set_value to be the easiest.

Leaving here as it may help others. Small QOL improvement to find the right tone ID based on file name so I don’t have to keep updating automations as I add sounds:

      - action: siren.turn_on
        target:
          entity_id: siren.siren_chime_play_tone
        data:
          volume_level: 0.5
          tone: >
            {{ state_attr('siren.siren_chime_play_tone',
            'available_tones') |dictsort |selectattr('1', 'search',
            'grid_recovered') |map(attribute='0') |first }}
1 Like