원클릭으로
debug
// Debug errors, bugs, and unexpected behavior systematically in Home Assistant integration. Use when investigating errors, analyzing stack traces, fixing bugs, or troubleshooting unexpected behavior.
// Debug errors, bugs, and unexpected behavior systematically in Home Assistant integration. Use when investigating errors, analyzing stack traces, fixing bugs, or troubleshooting unexpected behavior.
Create a beta pre-release for community testing with intelligent version detection. Use when creating beta releases, publishing pre-releases, or preparing versions for community testing.
Create a stable production release with intelligent detection (finalize beta or direct release). Use when publishing stable releases, finalizing beta versions, or creating production releases.
Implement approved plans with precision and quality for Linus Dashboard Home Assistant integration. Use when implementing features, executing approved plans, writing code following standards, or developing new functionality.
Check if project is ready for release with comprehensive pre-release validation. Use when verifying release readiness, running validation checks, or checking project quality before publishing.
Rollback a failed release by deleting tags and reverting version changes. Use when a release fails, needs to be cancelled, or when reverting a problematic release.
Review code quality, security, and maintainability before committing. Use when reviewing code changes, checking code quality, performing security review, or validating changes before commit.
| name | debug |
| description | Debug errors, bugs, and unexpected behavior systematically in Home Assistant integration. Use when investigating errors, analyzing stack traces, fixing bugs, or troubleshooting unexpected behavior. |
Debug errors, bugs, and unexpected behavior in the Linus Dashboard Home Assistant integration.
Before debugging, load:
Collect Information:
Questions to Ask:
home-assistant.log?Common Error Categories:
# Symptoms:
# - "coroutine was never awaited"
# - Event loop blocking
# - Timeouts
# Check for:
await missing_function() # Missing await
blocking_io_call() # Blocking I/O in async context
# Symptoms:
# - Integration fails to load
# - Config flow errors
# - Entity not showing up
# Check for:
# - Missing async_setup_entry/async_unload_entry
# - Incorrect platform registration
# - Missing unique_id on entities
# - Data not stored in hass.data correctly
# Symptoms:
# - Connection refused
# - Timeouts
# - 4xx/5xx HTTP errors
# Check for:
# - Supabase URL/key configuration
# - Network connectivity
# - API rate limits
# - Timeout values
Review Code:
git logCheck Logs:
# Home Assistant logs
tail -f /config/home-assistant.log | grep linus
# Check for warnings
grep -i "warning.*linus" /config/home-assistant.log
Add Debug Logging:
import logging
_LOGGER = logging.getLogger(__name__)
_LOGGER.debug("Variable value: %s", variable)
_LOGGER.info("Entering function with args: %s", args)
Apply Fix:
Test the Fix:
Verification:
Documentation:
Solution: Add await before async function calls
# Before
result = async_function()
# After
result = await async_function()
Solution: Check entry setup and platform registration
# Ensure proper setup
async def async_setup_entry(hass, entry):
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True
Solution: Verify state updates and coordinator refresh
# Ensure coordinator updates
await self.coordinator.async_request_refresh()
Solution: Increase timeout or optimize slow operations
# Add proper timeout
async with timeout(30):
result = await slow_operation()
Home Assistant Developer Tools:
Python Debugging:
# Add breakpoint (if debugging locally)
import pdb; pdb.set_trace()
# Add detailed logging
_LOGGER.debug("State: %s, Attrs: %s", self.state, self.extra_state_attributes)
Git Tools:
# Find when bug was introduced
git log --oneline -- path/to/file.py
# Check recent changes
git diff HEAD~5 -- path/to/file.py
Before completing debug: