|

Smart Plug Routine not Working Home Assistant? Here’s How to Fix It

The most likely reason your smart plug routine isn’t running is that an entity the automation depends on has become `unavailable` — often the plug itself or a sensor it watches. Run this quick test first: open Developer Tools → States, find your plug’s entity (usually `switch.livingroomplug`), and toggle it to `on`. If the plug physically responds, the integration is fine and the problem is in the automation logic. If it stays `off` or shows `unavailable`, fix the connection to the plug before touching your routine.

Three Quick Checks Before Digging Into Automations

These steps take less than a minute and rule out the simplest failures.

  • Is the automation actually enabled? Go to Settings → Automations, open your routine, and check the toggle at the top-right. If it’s grayed out, Home Assistant disabled it due to an error. Scroll to the bottom of the automation page for the error message.
  • Does the plug respond from the UI? Toggle the plug’s entity card in Developer Tools → States. If it doesn’t flip, the coordinator (ZHA, Zigbee2MQTT, deCONZ) has lost the device. Check the integration’s log for `unavailable` entries.
  • Are all entity IDs still valid? If you recently updated an integration or moved a device, the automation may point to an old entity ID. Open the automation in YAML mode and check every `entity_id` in triggers, conditions, and actions. Delete any that no longer exist.

Ordered Quick Fixes

Try these in order. After each fix, use the verification step described below to confirm success before moving on.

1. Reload the Integration

Reloading forces Home Assistant to reconnect to the plug’s coordinator without a full system restart.

  • Go to Settings → Devices & Services → Integrations.
  • Find the integration managing your plug (ZHA, Zigbee2MQTT, deCONZ, Tuya, etc.).
  • Click the three-dot menu and select Reload.
  • Wait 30 seconds.

Verification: Toggle the plug from the UI. Then go to Settings → Automations, open your routine, and click Run (the play button at the bottom of the automation page). The routine should execute within 5 seconds. If it does, the fix is confirmed.

2. Re-Pair the Automation Trigger

Sometimes the trigger’s event subscription becomes stale. Refreshing it costs nothing.

  • Open the automation in YAML mode (three-dot menu → Edit in YAML).
  • For a state-based trigger (e.g., `platform: state`), add a temporary `for:` line with `00:00:01` (one second). Save the automation, then remove that line after one successful run.
  • Save again and restart Core from Settings → System → Restart Core.

Verification: Wait for the trigger condition to occur (e.g., time of day, motion sensor activation) and confirm the plug responds. If you used a time-based trigger, you can also jump ahead by temporarily setting the trigger time one minute in the future, then waiting.

3. Re-Pair the Smart Plug

If the plug still shows `unavailable` or fails to toggle after reloading the integration, re-pair it directly.

  • In your coordinator’s interface (ZHA: Devices → Add Device; Zigbee2MQTT: Permit Join (All); deCONZ: Add New Light), enable pairing mode.
  • Put the plug in pairing mode (usually a long press of the button until it blinks rapidly).
  • Once discovered, rename it to the same friendly name it had before so existing automations keep working.

Verification: Toggle the plug from the UI. Then run the automation manually from the Automations page. If the plug changes state, the routine is restored.

The One Hidden Failure Mode to Detect Early

The most common silent killer is a trigger condition that depends on an entity that has gone `unavailable` without producing an error in the automation. Example: a routine that turns on a plug when the sun sets — if the `sun.sun` entity becomes unavailable because of a broken weather integration update, the automation simply never fires. Home Assistant does not flag this.

How to catch it: Go to Developer Tools → States and search for every entity referenced in your automation’s triggers, conditions, and actions. Look for any entity showing `unavailable` or `unknown`. If you find one, that entity alone can freeze the entire routine. Replace it with a fallback or fix the source integration.

Deeper Causes by Trigger Type

Trigger Type Typical Failure Fix
Time-based (time, sun) System time zone mismatch after DST change Settings → General → Time zone – confirm it matches your local zone.
Device-triggered (motion sensor, door sensor) Sensor battery died or reports `unknown` state Replace battery and re-pair the sensor.
State change of another plug The “source” plug’s entity was deleted by an integration update Re-add the source plug or update the automation’s entity ID.
Template trigger Template syntax error after HA update Validate the template at Developer Tools → Template.
HomeKit / Alexa / Google relay Cloud service token expired Relink the cloud integration in Settings → Devices & Services.

Quick Decision Checklist

Run through this checklist before wasting time editing YAML. Check each item once.

  • [ ] Plug toggles from Home Assistant UI? If no, fix the integration connection first.
  • [ ] Automation toggle is ON (not grayed out)?
  • [ ] Automation’s trigger mode is `single` (not `queued` or `parallel` unless you deliberately set it)?
  • [ ] Every entity ID in triggers, conditions, and actions is currently available in Developer Tools → States (none show `unavailable` or `unknown`)?
  • [ ] The plug’s coordinator (ZHA, Zigbee2MQTT, etc.) shows no errors in its log (Settings → System → Logs)?

If all boxes are checked and the routine still fails, move to the escalation step below.

When to Stop Troubleshooting

You’ve run the quick fixes and the checklist passes. The routine still doesn’t fire. Further re-pairing or reloading will likely waste time. Instead, create a minimal test automation with the same trigger and a simple action (e.g., turn on a virtual binary helper). If the test automation works, the problem is isolated to the original automation’s logic (a stale condition, wrong mode, or YAML syntax error). If the test automation also fails, the issue is at the integration or coordinator level — try updating the coordinator firmware, switching to a different coordinator (e.g., ZHA → Zigbee2MQTT), or checking the plug’s own logs.

If you’re using a Matter-over-Thread smart plug, the failure often traces to a Thread border router losing mesh connectivity. Check your Thread network health in the Apple Home or Google Home app. If the plug’s routing node is offline, power-cycle the border router (e.g., your Amazon Echo Show or Apple TV) rather than the plug itself.

FAQ

Q: My smart plug works manually but not in a routine. What’s the most common cause?

A: The automation’s trigger condition references an entity that has become `unavailable` — check all referred entities in Developer Tools → States.

Q: Do I need to restart Home Assistant after changing a routine?

A: Usually no — Home Assistant automatically reloads automations when you save them. If the routine still doesn’t fire after saving, restart the Core service from Settings → System → Restart Core.

Q: Can a low battery in my smart plug cause routines to fail?

A: Only if the plug is battery-powered (rare; most are mains-powered). For battery-powered Zigbee plugs, low battery can cause intermittent connectivity — replace the battery and re-pair if the plug shows as `unavailable`.

Q: Does the plug’s brand matter for routine reliability?

A: Yes — some plugs (especially older Wi-Fi-only models) rely on cloud polling and drop out if the internet blips. Local-protocol plugs (Zigbee, Z-Wave, Matter) are far more reliable for routines. If you’re using a Wi-Fi plug that keeps disconnecting, consider switching to a local-protocol option like the Linkind Matter Smart Plug for direct local control without cloud dependency.

Explore This Topic

Related guides in this cluster:

Similar Posts