Automation for triggering the Heiman Siren

I have the siren below, and i am trying to figure out how to make an automation to trigger the siren when the alarm is triggered.
I have this siren implemented with zigbee2mqtt with mqtt discovery.
I am able to trigger the alarm using the development tools mqtt publish

I have been looking at

Mqtt publish option

topic: home-assistant/light/1/state
payload: "{\"Status\":\"off\", \"Data\":\"something\"}"

But i don’t know how to use this in an automation for the lines below.

Model HS2WD-E
Vendor HEIMAN
Description Smart siren
Supports warning
Picture HEIMAN HS2WD-E

The alarm can be trigged by publishing to zigbee2mqtt/[FRIENDLY_NAME]/set message {"warning": {"duration": 10, "mode": "emergency", "strobe": false}} .

Nobody who can point me in a direction?

It will look something like this:

  - alias: 'Activate siren'
    trigger:
      platform: state
      entity_id: alarm_control_panel.your_alarm
      to: 'triggered'
    action:
      service: mqtt.publish
      data:
        topic: zigbee2mqtt/your_siren/set_message
        payload: '{"warning": {"duration": 10, "mode": "emergency", "strobe": false}}'

You will need to replace your_alarm and your_siren with the names of your alarm panel and Heiman siren.

1 Like

Thank you this indeed works.
I tried this a few times, but I did something wrong because now it works.

1 Like

Hello,
I have an issue with the setup of the siren.
I am using Zigbee2MQTT, the siren is working but only with this setup:
{“warning”: {“duration”: 10, “mode”: “emergency”, “strobe”: false}}

When I try to customize the sound with below setup is simply not working, I am geting the below error in the automation debugging

{“warning”: {“mode”: “police_panic”, “level”: “low”, “strobe_level”:“low”, “strobe”: “true”, “strobe_duty_cycle”: 2, “duration”: 2}}

Error I am getting
value should be a string for dictionary value @ data[‘payload_template’]