Siren

The Siren integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] lets you control siren and chime devices and build automations around when they turn on or off.

Note

Building block integration

This siren is a building block integration that cannot be added to your Home Assistant directly but is used and provided by other integrations.

A building block integration differs from the typical integration that connects to a device or service. Instead, other integrations that do integrate a device or service into Home Assistant use this siren building block to provide entities, services, and other functionality that you can use in your automations or dashboards.

If one of your integrations features this building block, this page documents the functionality the siren building block offers.

The state of a siren entity

The state of a siren entity can be either On or Off.

In addition, the entity can have the following states:

  • Unavailable: The entity is currently unavailable.
  • Unknown: The state is not yet known.

List of triggers

The Siren integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following triggers. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.

  • Siren turned off (siren.turned_off) Triggers after one or more sirens turn off.

  • Siren turned on (siren.turned_on) Triggers after one or more sirens turn on.

For an overview of every trigger across all integrations, see the triggers reference.

List of conditions

The Siren integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] provides the following conditions. Each link below opens a dedicated page with examples, fields, and a step-by-step UI walkthrough.

  • Siren is off (siren.is_off) Tests if one or more sirens are off.

  • Siren is on (siren.is_on) Tests if one or more sirens are on.

For an overview of every condition across all integrations, see the conditions reference.

Actions

Siren actions

Available actionsActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called sequence. [Learn more]: siren.turn_on, siren.turn_off, siren.toggle

Action: Turn on

The siren.turn_on action turns the siren on.

Data attribute Optional Description
entity_id yes String or list of strings that point at entity_id’s of sirens to control.

There are three optional input parameters that can be passed into the action depending on whether or not your device supports them. Check the device’s integration documentation for more details.

Parameter Name Input Type Notes
tone string or integer When the available_tones property is a map, either the key or value can be used.
duration integer
volume_level float between 0 and 1

Action: Turn off

The siren.turn_off action turns the siren off.

Data attribute Optional Description
entity_id yes String or list of strings that point at entity_id’s of sirens to control.

Action: Toggle

The siren.toggle action toggles the siren on or off.

Data attribute Optional Description
entity_id yes String or list of strings that point at entity_id’s of sirens to control.

Siren automation examples

You can use siren triggers and conditions in automations to stay informed, light a path, or silence a siren at the right time.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: get a phone alert when the siren starts

If a siren turns on while you are in another part of the building, you may want a notification right away. This automation sends a message to your phone as soon as the entry siren starts.

  • Trigger: Siren turned on
    • Target: Entry siren
  • Action: Send a notification message
    • Target: My Device (notify.my_device)
YAML example for a siren start notification
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Notify when the siren turns on"
triggers:
  - trigger: siren.turned_on
    target:
      entity_id: siren.entry
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      title: "Siren started"
      message: >
        The entry siren just turned on.

Automation: turn off a siren after it has been on for 5 minutes

If you want a siren to stop after a set time, you can check whether it is still on before turning it off. This automation checks every minute and turns off the patio siren after it has stayed on for 5 minutes.

  • Trigger: Time pattern: Every minute
  • Condition: Siren is on
    • Target: Patio siren
    • For at least: 00:05:00
  • Action: Turn off siren
YAML example for turning off a siren after 5 minutes
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Turn off the patio siren after 5 minutes"
triggers:
  - trigger: time_pattern
    minutes: "/1"
conditions:
  - condition: siren.is_on
    target:
      entity_id: siren.patio
    options:
      for: "00:05:00"
actions:
  - action: siren.turn_off
    target:
      entity_id: siren.patio