---
title: "Siren"
description: "Spook adds actions that turn a siren in Home Assistant on or off for a while, and back when the time is up, also across a restart."
canonical_url: "https://spook.boo/siren"
---
# Siren

> Spook adds actions that turn a siren in Home Assistant on or off for a while, and back when the time is up, also across a restart.

The siren integration is how Home Assistant controls sirens, alarm sounders and chimes.

Home Assistant can hand a siren a duration when it turns it on, if the siren supports one. Spook adds actions that turn a siren on or off for a while, and keeps the time itself, across a restart of Home Assistant.

## Actions

Spook adds two actions for sirens. You find them wherever you add an action, marked with a 👻.

### Turn on for

Turns sirens on for a while, and turns them back off when the time is up. Spook stores when each one is due back, so a restart of Home Assistant in between does not stop that.

It is [Turn on for](https://spook.boo/misc#turn-on-for), with the same rules, for sirens only. Named outright, anything that is not a siren is refused with an error. Picked up through an area, a device, a floor, a label or a group, it is passed over.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **turn on for**, and select **Siren: Turn on for 👻**.
3. Under **Targets**, choose the sirens.
4. Set **Duration** to how long they should stay on, like `00:15:00` for fifteen minutes.
5. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=siren.turn_on_for) opens it in your Home Assistant, ready to run once.

**Technical details**

| Action properties |
| --- |
| Action | Siren: Turn on for 👻 |
| Action name | `siren.turn_on_for` |
| Action targets | Yes, `siren` entities |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=siren.turn_on_for) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=siren.turn_on_for) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `duration` | string | Yes | `00:15:00` |

**Example actions in YAML**

The garden siren, for thirty seconds:

```yaml
action: siren.turn_on_for
target:
  entity_id: siren.garden
data:
  duration:
    seconds: 30
```

**Known limitations**

- The rules of [Turn on for](https://spook.boo/misc#turn-on-for) apply: only something plainly `on` or `off` is held. Something already on is left alone, and turning it off yourself ends the hold.
- A siren that cannot be turned both on and off is refused when named, and passed over in an area. There would be no way back.
- Spook turns a siren on with `siren.turn_on` and no tone, volume or duration, so it sounds the way it does by default.
- A siren that stops by itself before the time is up ends the hold, the same as turning it off yourself.

### Turn off for

Turns sirens off for a while, and turns them back on when the time is up. Spook stores when each one is due back, so a restart of Home Assistant in between does not stop that.

It is [Turn off for](https://spook.boo/misc#turn-off-for), with the same rules, for sirens only. Named outright, anything that is not a siren is refused with an error. Picked up through an area, a device, a floor, a label or a group, it is passed over.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **turn off for**, and select **Siren: Turn off for 👻**.
3. Under **Targets**, choose the sirens.
4. Set **Duration** to how long they should stay off, like `00:30:00` for half an hour.
5. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=siren.turn_off_for) opens it in your Home Assistant, ready to run once.

**Technical details**

| Action properties |
| --- |
| Action | Siren: Turn off for 👻 |
| Action name | `siren.turn_off_for` |
| Action targets | Yes, `siren` entities |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=siren.turn_off_for) [![Open your Home Assistant instance and show the Actions tool with a specific action selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=siren.turn_off_for) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `duration` | string | Yes | `00:30:00` |

**Example actions in YAML**

The hallway siren, quiet for five minutes:

```yaml
action: siren.turn_off_for
target:
  entity_id: siren.hallway
data:
  duration:
    minutes: 5
```

**Known limitations**

- The rules of [Turn off for](https://spook.boo/misc#turn-off-for) apply: only something plainly `on` or `off` is held. Something already off is left alone, and turning it on yourself ends the hold.
- A siren that cannot be turned both on and off is refused when named, and passed over in an area. There would be no way back.
- Spook turns a siren back on with `siren.turn_on` and no tone, volume or duration, so it sounds the way it does by default.


## Sitemap

See the full [sitemap](https://spook.boo/sitemap.md) for all pages.
