Core extensions

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, 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.

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.

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 opens it in your Home Assistant, ready to run once.

The Actions tool with Disable an integration 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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. 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 opens it in your Home Assistant, ready to run once.

The Actions tool with Enable an integration 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

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.

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 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.
What Try this action opens, filled in with an example.

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. 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 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.
What Try this action opens, filled in with an example.

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.

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 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.
What Try this action opens, filled in with an example.

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 opens it in your Home Assistant. Run it, and the response shows your integrations.

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 and 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 opens it in your Home Assistant, ready to run once.

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.

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.

Stuck, or found a bug? The Support page tells you where to go for help.