Open
Conversation
- Added level, integration, search_term, and lines parameters to filter logs - Filters can be combined for more precise results - Returns total_lines and filters_applied in response - Improves token efficiency by allowing targeted log queries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Exclude uv.lock from version control as it contains environment-specific lock data that shouldn't be shared across different development environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added error log filtering to Features section - Included usage examples for filtering logs - Added detailed Error Log Filtering section with parameters and examples - Documents the ability to filter by level, integration, search term, and line limit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds advanced filtering capabilities to the
get_error_logtool, making it easier to troubleshoot Home Assistant issues efficiently.Changes
1. Enhanced Error Log Filtering (app/hass.py, app/server.py)
Added four optional parameters to the
get_error_logtool:level: Filter by log level (ERROR, WARNING, INFO, DEBUG)integration: Filter by integration name (e.g., 'mqtt', 'zwave')search_term: Filter by keyword or phrase (case-insensitive)lines: Limit number of lines returned (most recent N lines)Benefits:
Example use cases:
level="ERROR"- Get only error entriesintegration="mqtt", lines=50- Get last 50 MQTT integration log entriessearch_term="timeout", level="WARNING"- Get warnings containing "timeout"2. Updated .gitignore
.claude/settings.local.jsonfor Claude Code settingsuv.lockto exclude environment-specific lock files3. Updated README Documentation
Testing
The changes have been tested with various filter combinations to ensure proper filtering and response formatting.
🤖 Generated with Claude Code