---
title: "Integration management"
description: "Spook adds actions to Home Assistant to turn integrations on and off, stop and start polling for updates, list and rename them, and ignore everything Home Assistant discovered."
canonical_url: "https://spook.boo/integrations"
---
# Integration management

> Spook adds actions to Home Assistant to turn integrations on and off, stop and start polling for updates, list and rename them, and ignore everything Home Assistant discovered.

Integrations in Home Assistant are the glue between your Home Assistant instance and your devices, services and platforms. You manage them under **Settings** > **Devices & services**, one at a time, by hand.

Spook adds actions for that work, so an automation or script can do it for you: turn an integration off and on again, stop it from asking its devices for updates for a while, find the ones that failed to set up, rename one, or ignore a whole pile of discovered devices in one go.

## Actions

Spook adds seven actions for integrations. You find them wherever you add an action, marked with a 👻. They all belong to the Home Assistant Core Integration, so that is the name in front of them in the list.

Run by hand, these actions need a user that is an administrator, except [List integrations](#list-integrations), which every user can run. Your automations can always run them. So can your scripts, unless a user who is not an administrator starts one.

### Disable an integration

Turns off an integration, one entry of it or all of them at once.

Some integrations you only want running part of the time. The thermostat of the holiday home, only while you are there. The integration of the Christmas lights, from December to January. The cloud service with a paid plan, only when you actually use it. Doing that by hand under **Settings** works, as long as somebody remembers. An automation does.

While an integration is disabled, its devices and entities are disabled with it, exactly like when you disable it in **Settings**. Turning it back on is [Enable an integration](#enable-an-integration).

The whole story, with what Home Assistant does itself and what to use when you only want it quiet: [Disable or enable an integration from an automation](https://spook.boo/disable-integration-from-automation).

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **disable an integration**, and select **Home Assistant Core Integration: Disable an integration 👻**.
3. Under **Integration entry**, pick the integration you want to turn off. An integration you set up twice, like two Hue bridges, has two entries.
4. Or, to turn off every entry of an integration at once, leave that empty and type its domain under **Integration**, like `hue`. The domain is the short technical name of the integration, the one you see in its address in Home Assistant.
5. Select **Save**.

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

![The Actions tool with Disable an integration 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-disable-config-entry.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Disable an integration 👻 |
| Action name | `homeassistant.disable_config_entry` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.disable_config_entry) [![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=homeassistant.disable_config_entry) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `config_entry_id` | string \| list of strings | No | `dc23e666e6100f184e642a0ac345d3eb` |
| `domain` | string \| list of strings | No | `hue` |

Give one or both. A `domain` takes every entry of that integration, including entries added after the automation was written. A domain without any entries is refused, so a typo gives you an error.

**Finding the config entry ID**

Not sure what the `config_entry_id` of your integration is? Open this action in the Actions tool, pick the integration under **Integration entry**, and select **Go to YAML mode**. The YAML shows the ID.

**Example actions in YAML**

One entry of an integration:

```yaml
action: homeassistant.disable_config_entry
data:
  config_entry_id: "dc23e666e6100f184e642a0ac345d3eb"
```

Every entry of an integration:

```yaml
action: homeassistant.disable_config_entry
data:
  domain: hue
```

Several entries at once:

```yaml
action: homeassistant.disable_config_entry
data:
  config_entry_id:
    - "dc23e666e6100f184e642a0ac345d3eb"
    - "df98a97c9341a0f184e642a0ac345d3b"
```

### Enable an integration

Turns an integration back on, one entry of it or all of them at once.

The other half of [Disable an integration](#disable-an-integration). The holiday home's thermostat comes back when you arrive, the Christmas lights come back in December. It also turns on an integration you disabled yourself under **Settings**. The action does not care who turned it off.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **enable an integration**, and select **Home Assistant Core Integration: Enable an integration 👻**.
3. Under **Integration entry**, pick the integration you want to turn on.
4. Or, to turn on every entry of an integration at once, leave that empty and type its domain under **Integration**, like `hue`.
5. Select **Save**.

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

![The Actions tool with Enable an integration 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-enable-config-entry.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Enable an integration 👻 |
| Action name | `homeassistant.enable_config_entry` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.enable_config_entry) [![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=homeassistant.enable_config_entry) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `config_entry_id` | string \| list of strings | No | `dc23e666e6100f184e642a0ac345d3eb` |
| `domain` | string \| list of strings | No | `hue` |

Give one or both. A `domain` takes every entry of that integration, including entries added after the automation was written. A domain without any entries is refused, so a typo gives you an error.

**Finding the config entry ID**

Not sure what the `config_entry_id` of your integration is? Open this action in the Actions tool, pick the integration under **Integration entry**, and select **Go to YAML mode**. The YAML shows the ID.

**Example actions in YAML**

One entry of an integration:

```yaml
action: homeassistant.enable_config_entry
data:
  config_entry_id: "dc23e666e6100f184e642a0ac345d3eb"
```

Every entry of an integration:

```yaml
action: homeassistant.enable_config_entry
data:
  domain: hue
```

Several entries at once:

```yaml
action: homeassistant.enable_config_entry
data:
  config_entry_id:
    - "dc23e666e6100f184e642a0ac345d3eb"
    - "df98a97c9341a0f184e642a0ac345d3b"
```

### Disable polling for updates

Stops an integration from asking its device or service for updates on a schedule.

Many integrations poll: every so many seconds or minutes, they ask for fresh data. Usually that is what you want. But an integration that talks to a paid API costs money on every poll, also while nobody is home to look at the numbers. With polling off, the integration keeps working. It only stops asking on its own.

Home Assistant has this as a switch in the system options of an integration entry. This action flips that same switch from an automation. Turning it back on is [Enable polling for updates](#enable-polling-for-updates).

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **disable polling**, and select **Home Assistant Core Integration: Disable polling for updates 👻**.
3. Under **Integration entry**, pick the integration that should stop polling.
4. Select **Save**.

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

![The Actions tool with Disable polling for updates 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-disable-polling.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Disable polling for updates 👻 |
| Action name | `homeassistant.disable_polling` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.disable_polling) [![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=homeassistant.disable_polling) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `config_entry_id` | string | Yes | `dc23e666e6100f184e642a0ac345d3eb` |

**Finding the config entry ID**

Not sure what the `config_entry_id` of your integration is? Open this action in the Actions tool, pick the integration under **Integration entry**, and select **Go to YAML mode**. The YAML shows the ID.

**Example actions in YAML**

Stop polling one integration entry:

```yaml
action: homeassistant.disable_polling
data:
  config_entry_id: "dc23e666e6100f184e642a0ac345d3eb"
```

**Known limitations**

- The switch in the UI reloads the integration right after you flip it. This action does not, and some integrations only look at the setting when they load. If polling carries on, follow this action with **Home Assistant Core Integration: Reload config entry** (`homeassistant.reload_config_entry`) for the same entry.
- It takes one integration entry at a time. For several, add the action once for each.
- An integration that does not poll, because its device pushes updates by itself, has nothing to stop.

### Enable polling for updates

Lets an integration ask its device or service for updates on a schedule again.

The other half of [Disable polling for updates](#disable-polling-for-updates). Stop the paid API polling when you leave the house, start it again when you come back home. The same switch as in the system options of the integration entry, flipped from an automation.

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **enable polling**, and select **Home Assistant Core Integration: Enable polling for updates 👻**.
3. Under **Integration entry**, pick the integration that should start polling again.
4. Select **Save**.

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

![The Actions tool with Enable polling for updates 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-enable-polling.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Enable polling for updates 👻 |
| Action name | `homeassistant.enable_polling` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.enable_polling) [![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=homeassistant.enable_polling) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `config_entry_id` | string | Yes | `dc23e666e6100f184e642a0ac345d3eb` |

**Finding the config entry ID**

Not sure what the `config_entry_id` of your integration is? Open this action in the Actions tool, pick the integration under **Integration entry**, and select **Go to YAML mode**. The YAML shows the ID.

**Example actions in YAML**

Start polling one integration entry again:

```yaml
action: homeassistant.enable_polling
data:
  config_entry_id: "dc23e666e6100f184e642a0ac345d3eb"
```

**Known limitations**

- The switch in the UI reloads the integration right after you flip it. This action does not, and an integration often only starts its polling when it loads. To get it going right away, follow this action with **Home Assistant Core Integration: Reload config entry** (`homeassistant.reload_config_entry`) for the same entry.
- It takes one integration entry at a time. For several, add the action once for each.

### Ignore all discovered devices & services

Ignores everything Home Assistant discovered and is waiting for you to set up, in one go.

Home Assistant finds things on your network by itself, and lists them under **Settings** > **Devices & services** as discovered. Great when it is the new light you just bought. Less great when it is the neighbors' TV, every Bluetooth gadget that walks past, or the same printer for the third time. You can ignore them one by one. This ignores them all at once.

You can limit it to one or more integrations. For example, run it every night for the `samsungtv` integration only, and keep the rest of the discoveries for you to look at. A device found over Bluetooth belongs to the integration that knows it, like `xiaomi_ble`, not to `bluetooth`.

The whole story, with what Home Assistant does itself and how to ignore new ones as soon as they turn up: [Get rid of new devices discovered](https://spook.boo/new-devices-discovered).

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **ignore all**, and select **Home Assistant Core Integration: Ignore all currently discovered devices 👻**.
3. To ignore only what one integration discovered, type its domain under **Integration domain**, like `samsungtv`. Leave it empty to ignore everything. The editor takes one domain. For more than one, give a list in YAML mode.
4. Select **Save**.

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

![The Actions tool with Ignore all currently discovered devices 👻 picked and filled in with an example.](https://spook.boo/images/screenshots/en/light/action-homeassistant-ignore-all-discovered.webp)

What **Try this action** opens, filled in with an example.

**Technical details**

| Action properties |
| --- |
| Action | Ignore all currently discovered devices 👻 |
| Action name | `homeassistant.ignore_all_discovered` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.ignore_all_discovered) [![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=homeassistant.ignore_all_discovered) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `domain` | string \| list of strings | No | `samsungtv` |

Every discovery ends up in the list of ignored integrations, with the name Home Assistant showed for it and a 👻 behind it, so you can tell which ones Spook ignored. When Home Assistant has no name for one, it is called "Ignored by Spook". You can stop ignoring any of them from that list, the same as with one you ignored yourself.

**Example actions in YAML**

Ignore everything ESPHome discovered:

```yaml
action: homeassistant.ignore_all_discovered
data:
  domain: "esphome"
```

### List integrations

Lists your integration entries, the ones under **Settings** > **Devices & services**, with the state each one is in.

The integrations dashboard shows you which integration failed to set up, or is waiting to retry. Only when you look. This gives an automation the same list, so it can tell you instead: every morning, or right after a restart. Ask for only the integrations in trouble, or only those of one integration, and you get exactly those.

Never the passwords, tokens or API keys an integration logs in with. Those stay where they are.

Everybody can list the integrations, not only administrators. Home Assistant's own listing is open to every user too.

**How to use it**

1. Open the automation or script that needs the list, and select **Add action**.
2. Search for **list integrations**, and select **Home Assistant Core Integration: List integrations 👻**.
3. To list only some, pick states under **State**, like **Waiting to retry**, or type domains under **Integration**, like `hue`. Leave both empty for all of them.
4. Under **Response variable**, give the list a name, like `result`. The steps after this one can use it.
5. Select **Save**.

Just want to see it work? [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.list_config_entries) opens it in your Home Assistant. Run it, and the response shows your integrations.

**Technical details**

| Action properties |
| --- |
| Action | List integrations 👻 |
| Action name | `homeassistant.list_config_entries` |
| Action targets | No |
| Action response | Yes, the integration entries |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.list_config_entries) [![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=homeassistant.list_config_entries) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `domain` | string \| list of strings | No | `hue` |
| `state` | string \| list of strings | No | `setup_retry` |

An entry has to match both fields. More than one value in a field widens that field: two states find the entries in either of them. An empty field counts as left out.

The states an entry can be in: `loaded`, `setup_error`, `migration_error`, `setup_retry`, `not_loaded`, `failed_unload`, `setup_in_progress` and `unload_in_progress`. A state that is not one of those is refused, so a typo gives you an error instead of an empty list.

| Action response data |
| --- |
| Attribute | Type | Description |
| `config_entries` | list | The integration entries, sorted by domain, then name. Empty when none. |

Each entry in the list has:

| **Attribute** | **Type** | **Description** |
| --- | --- | --- |
| `entry_id` | string | The ID of the entry, the one the other integration actions take as `config_entry_id`. |
| `domain` | string | The integration, like `hue`. |
| `title` | string | The name of the entry, as the dashboard shows it. |
| `source` | string | How it was added, like `user`, `zeroconf`, or `ignore` for an integration you ignored. |
| `state` | string | One of the states above. |
| `reason` | string \| null | Why it is not loaded, when the integration said why. Often the same text the dashboard shows. |
| `disabled_by` | string \| null | `user` when somebody disabled it, `null` while it is enabled. |
| `pref_disable_new_entities` | boolean | Whether new entities of this integration are added disabled. |
| `pref_disable_polling` | boolean | Whether polling for updates is off. |
| `created_at` | string | When the entry was added, as an ISO 8601 date and time. |
| `modified_at` | string | When the entry last changed, as an ISO 8601 date and time. |

**Example actions in YAML**

Every integration that failed to set up, or is waiting to retry:

```yaml
action: homeassistant.list_config_entries
data:
  state:
    - setup_error
    - setup_retry
response_variable: result
```

Every entry of the Hue integration:

```yaml
action: homeassistant.list_config_entries
data:
  domain: hue
response_variable: result
```

**Integrations in trouble**

Every morning, a notification on your phone naming the integrations that failed to set up or are waiting to retry, with the reason when there is one. Nothing wrong, no notification:

```yaml
triggers:
  - trigger: time
    at: "08:00:00"
actions:
  - action: homeassistant.list_config_entries
    data:
      state:
        - setup_error
        - setup_retry
    response_variable: result
  - condition: template
    value_template: "{{ result.config_entries | count > 0 }}"
  - action: notify.mobile_app_phone
    data:
      title: Integrations in trouble
      message: |-
        {% for entry in result.config_entries -%}
        {{ entry.title }} ({{ entry.domain }}){% if entry.reason %}: {{ entry.reason }}{% endif %}
        {% endfor %}
```

**Known limitations**

- The list is what was there at the moment of the call. An integration that finishes setting up a second later is still listed as setting up.
- An integration you ignored is listed too, with `ignore` as its source. To leave those out, add `| rejectattr('source', 'eq', 'ignore')` where you use the list in a template.

### Update an integration

Renames an integration entry, or changes whether the new entities it finds are added as disabled.

Two things you change by hand on the integrations dashboard: the name of an entry, and the **Enable newly added entities** switch in its system options. This does both from an automation or script. Rename the bridge after you moved it upstairs, or stop an integration that keeps finding things from adding them as enabled entities while you clean up.

Only what you fill in changes. Leave the name out, and the name stays.

Polling for updates is the third switch in the system options. It has its own actions: [Disable polling for updates](#disable-polling-for-updates) and [Enable polling for updates](#enable-polling-for-updates).

**How to use it**

1. Open the automation or script that should do this, and select **Add action**.
2. Search for **update an integration**, and select **Home Assistant Core Integration: Update an integration 👻**.
3. Under **Integration entry**, pick the integration you want to change.
4. Fill in a new **Name**, or turn on **Disable new entities**, or both.
5. Select **Save**.

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

**Technical details**

| Action properties |
| --- |
| Action | Update an integration 👻 |
| Action name | `homeassistant.update_config_entry` |
| Action targets | No |
| Action response | No response |
| Spook's influence | Newly added action |
| Tools | [Try this action](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.update_config_entry) [![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=homeassistant.update_config_entry) |

| Action data parameters |
| --- |
| Attribute | Type | Required | Default / Example |
| `config_entry_id` | string | Yes | `dc23e666e6100f184e642a0ac345d3eb` |
| `title` | string | No | `"Upstairs bridge"` |
| `disable_new_entities` | boolean | No | `true` |

Give `title`, `disable_new_entities`, or both. A call with neither is refused, and so is an empty name. Spaces before or after the name are left off.

`disable_new_entities: true` adds the entities the integration finds from now on as disabled. The entities it already has stay as they are.

**Finding the config entry ID**

Not sure what the `config_entry_id` of your integration is? Open this action in the Actions tool, pick the integration under **Integration entry**, and select **Go to YAML mode**. The YAML shows the ID. Or use [List integrations](#list-integrations): each entry in its response has its `entry_id`.

**Example actions in YAML**

Rename an integration entry:

```yaml
action: homeassistant.update_config_entry
data:
  config_entry_id: "dc23e666e6100f184e642a0ac345d3eb"
  title: "Upstairs bridge"
```

Add new entities of an integration as disabled:

```yaml
action: homeassistant.update_config_entry
data:
  config_entry_id: "dc23e666e6100f184e642a0ac345d3eb"
  disable_new_entities: true
```

The same for every entry of MQTT, with [List integrations](#list-integrations) finding them:

```yaml
sequence:
  - action: homeassistant.list_config_entries
    data:
      domain: mqtt
    response_variable: result
  - repeat:
      for_each: "{{ result.config_entries | map(attribute='entry_id') | list }}"
      sequence:
        - action: homeassistant.update_config_entry
          data:
            config_entry_id: "{{ repeat.item }}"
            disable_new_entities: true
```

**Known limitations**

- It takes one integration entry at a time. For several, add the action once for each, or repeat it over [List integrations](#list-integrations), like the example above.
- Renaming an integration entry does not rename its devices or entities.
- Some integrations reload themselves when anything about their entry changes, a new name included. Renaming them on the dashboard does the same.
- Polling for updates is not part of it. [Disable polling for updates](#disable-polling-for-updates) and [Enable polling for updates](#enable-polling-for-updates) do that.

## Blueprints & tutorials

There are no known blueprints or tutorials for these actions yet. Made one, or found one? [Let us know in our discussion forums](https://github.com/frenck/spook/discussions).

## Feature requests, ideas, and support

Got an idea to take this further, like a new action, entity or repair? [Let us know in our discussion forums](https://github.com/frenck/spook/discussions).

Stuck, or found a bug? The [Support](https://spook.boo/support) page tells you where to go for help.


## Sitemap

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