Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Home Assistant Logs: What Are They Telling You?

· 6 min read · Home Automation

In this article
  1. Why Logs Matter in Home Assistant
  2. Where to Find the Logs
  3. Understanding Log Levels
  4. Common Log Messages and What They Mean
  5. How to Use Logs to Fix an Automation
  6. Log Rotation and Storage
  7. Frequently Asked Questions

Your Home Assistant logs are telling you exactly why an automation didn't run, a device went offline, or an integration is misbehaving. Reading them is the fastest way to diagnose and fix most problems in your smart home setup.

Why Logs Matter in Home Assistant

Home Assistant is a complex system that connects dozens of devices, integrations, and automations. When something goes wrong—a light doesn't turn on, a sensor stops updating, or an automation fires at the wrong time—the logs are the only place that records what actually happened behind the scenes. Without them, you're guessing. With them, you can pinpoint the exact error message, the time it occurred, and often the component that caused it.

Most users only look at logs when something breaks, but checking them regularly can reveal underlying issues before they become noticeable. A sensor that occasionally drops connection, an integration that throws warnings every hour, or an automation that fails silently—all of these leave traces in the log.

Where to Find the Logs

Home Assistant provides two main ways to view logs: the web interface and the underlying log files.

  • Settings → System → Logs: This shows the last 20 log entries by default, with a dropdown to increase that number. It's the quickest way to see recent errors.
  • Settings → System → Logs → “Load Full Logs”: This loads the entire log file into the browser, which is useful for searching through a longer time period.
  • File system: The main log file is home-assistant.log, located in the config directory. If you use the Home Assistant Operating System, you can access it via the Samba add-on or the SSH & Web Terminal add-on.

For more advanced filtering, you can use the logger integration to set custom log levels for specific integrations. For example, you can set logger: in configuration.yaml to show debug logs for a particular integration that's misbehaving.

Understanding Log Levels

Each log entry has a severity level, which tells you how serious the issue is.

  • DEBUG: Detailed diagnostic information, usually only enabled when troubleshooting.
  • INFO: Normal operational messages, like “Home Assistant started” or “Device connected.”
  • WARNING: Something unexpected happened, but the system continued. For example, a sensor didn't respond, but the integration retried successfully.
  • ERROR: A failure occurred that prevented a task from completing. For instance, an automation failed to execute or a service call returned an error.
  • CRITICAL: A severe problem that may cause Home Assistant to stop working.

Most of the time, you'll be looking at WARNING and ERROR entries. Warnings are often safe to ignore if they're infrequent, but a flood of warnings usually indicates a configuration problem or a flaky device.

Common Log Messages and What They Mean

Here are a few typical log entries you might see and how to interpret them.

  • “Timeout”: A device or service didn't respond within the expected time. This could be a network issue, a device that's powered off, or an integration that's overloaded.
  • “Failed to call service”: An automation or script tried to call a service (like light.turn_on) but it failed. The log usually includes the reason, such as “entity not found” or “invalid parameters.”
  • “Entity not available”: The integration can't reach the device, so the entity is marked as unavailable. This often happens when a device goes offline or a cloud service has an outage.
  • “Rate limit exceeded”: You've made too many requests to an external API (like a weather service) in a short time. This is common with free tiers of integrations that have strict limits.
  • “Invalid config”: There's an error in your configuration.yaml file. The log will usually point to the specific line or key that's wrong.

When you see an error, the most important thing is to read the entire message—not just the first line. The full error often includes a stack trace that shows exactly which component and function failed.

How to Use Logs to Fix an Automation

Let's say you have an automation that should turn on a light at sunset, but it doesn't work. Here's how you'd use the logs to diagnose it.

  1. Open Settings → System → Logs and look for entries around the time the automation should have fired.
  2. If you see an error like “Service light.turn_on not found,” check that the entity ID is correct in your automation.
  3. If you see “Entity light.living_room is unavailable,” check if the light is powered on and connected to your network.
  4. If there are no log entries at all, the automation may not have been triggered. Check the automation's trigger conditions and ensure it's enabled.
  5. Use the “Run” button in the automation editor to test it manually and watch the logs for any new errors.

Logs are also invaluable for debugging automations that run but do the wrong thing. For example, if an automation triggers but the condition fails, you'll see a “Condition not met” message in the log.

Log Rotation and Storage

Home Assistant keeps logs for a limited time. By default, the log file is rotated when it reaches 50 MB, and only the last few days are kept. If you need to keep logs for longer, you can configure the logger integration to set a different max_log_size or use the system_log integration to store events in the database.

For long-term analysis, you can send logs to an external service like a syslog server or use the history integration to record specific events. However, for most users, the built-in log viewer is sufficient.

Frequently Asked Questions

Why are my logs full of warnings but everything works?

Warnings often indicate minor issues that don't break functionality—like a sensor that occasionally fails to update or a service that takes too long to respond. If the warnings are infrequent and don't affect your automations, you can ignore them. But if they're constant, it's worth investigating, as they may point to a failing device or an integration that needs updating.

How do I clear the logs?

You can't clear the log file from the web interface, but you can delete the home-assistant.log file from the config directory. The system will create a new one on the next restart. Alternatively, restarting Home Assistant will rotate the log file, but the old one is still on disk until it's overwritten.

What is the difference between the log and the history?

The log records events and errors in real-time, while the history database stores the state changes of entities over time. The log is for troubleshooting; the history is for seeing trends and past states. They serve different purposes.

Can I search the logs for a specific entity?

Yes. In the “Load Full Logs” view, you can use your browser's search function (Ctrl+F or Cmd+F) to find text. You can also use the logger integration to set a custom log level for a specific integration, which will show more or fewer messages for that integration.

Why do I see “Error doing job: Task exception was never retrieved”?

This is a common Python error that appears when a task fails but the exception isn't handled. It often indicates a bug in an integration or a custom component. Check the full traceback in the log to see which integration caused it, and consider updating or removing that integration.

How can I make logs more detailed for a specific integration?

Add the following to your configuration.yaml:

logger:
default: warning
logs:
homeassistant.components.zwave: debug
homeassistant.components.mqtt: debug

This sets the default log level to warning and enables debug logging for the Z-Wave and MQTT integrations. After saving, restart Home Assistant to apply the changes. Remember to remove these lines once you're done troubleshooting, as debug logging can fill up the log quickly.