Issue Date: 2026-01-12
Affected Versions: 2.0.10 and earlier
Fixed in: 2.0.11+
Problem:
When users clicked links in notifications to access the WebUI, they were redirected to the add-on selection screen instead of the Sentry WebUI.
Root Cause:
Home Assistant's persistent notification system doesn't always handle markdown links reliably, especially:
- Relative URLs may not navigate correctly
- Link behavior varies between HA versions
- Some mobile apps don't handle ingress links in notifications
Solution:
- Removed reliance on clickable markdown links
- Provided clear step-by-step access instructions in notification text
- Emphasized sidebar panel access (most reliable)
- Added fallback method via Settings → Add-ons
Before:
- [🛡️ Open WebUI](/hassio/ingress/ha_sentry/) - Full dependency visualizationAfter:
How to Access WebUI:
1. Via Sidebar Panel (Recommended): Look for the 'Sentry' panel in your sidebar
2. Via Add-on Settings: Settings → Add-ons → Home Assistant Sentry → Open Web UIProblem:
When users enabled enable_installation_review: true in the add-on configuration, the logs still showed the feature as disabled.
Root Cause:
The run.sh script was missing the environment variable exports for the three installation review configuration options:
ENABLE_INSTALLATION_REVIEWINSTALLATION_REVIEW_SCHEDULEINSTALLATION_REVIEW_SCOPE
Without these exports, the Python code always saw the default values (disabled).
Solution:
Added the missing environment variable exports to run.sh:
export ENABLE_INSTALLATION_REVIEW=$(bashio::config 'enable_installation_review')
export INSTALLATION_REVIEW_SCHEDULE=$(bashio::config 'installation_review_schedule')
export INSTALLATION_REVIEW_SCOPE=$(bashio::config 'installation_review_scope')Also added enhanced logging:
When Enabled:
============================================================
INSTALLATION REVIEW FEATURE ENABLED
============================================================
Schedule: weekly
Scope: full
AI-powered: true
Installation reviews will analyze your HA setup and provide recommendations
============================================================
When Disabled:
Installation review feature is disabled in configuration
enable_installation_review: False
To enable: Set 'enable_installation_review: true' in add-on config
Problem:
Home Assistant clears its logs on restart, and many updates require a restart. This meant that after updating and restarting, the "old" logs were gone, making before/after comparison impossible.
Root Cause:
The log monitor only saved previous_logs.json which was overwritten on each check. When HA restarted and cleared its logs, the new check would have very few or no error logs, making comparison meaningless.
Solution:
Implemented a dual log storage system:
previous_logs.json- Short-term storage of the most recent checkbaseline_logs.json- Long-term stable baseline that persists across HA restarts
How It Works:
# Saving logs
- Always save to previous_logs.json
- Update baseline_logs.json only when system is stable (< 20 errors)
- Baseline provides a stable reference point across restarts
# Loading logs
- Try to load previous_logs.json first
- If previous logs are empty (post-restart), fall back to baseline_logs.json
- This ensures we always have something to compare againstEnhanced Logging:
First Run (Establishing Baseline):
============================================================
ESTABLISHING BASELINE
============================================================
No previous log data available - this may be first run
Creating baseline snapshot for future comparisons
Future checks will compare against this baseline to detect new errors
============================================================
Normal Operation:
============================================================
LOG MONITORING CHECK
============================================================
Comparing current logs against baseline to detect new errors
Note: Baseline persists across HA restarts for accurate comparison
After HA Restart:
Previous logs appear empty (possible HA restart), trying baseline logs
Loaded 15 baseline error lines from 2026-01-11T22:30:00
Using baseline for comparison (helps detect issues across HA restarts)
- Enable the add-on with
enable_web_ui: true - Wait for an update check to complete
- Open the notification
- Verify the notification contains clear instructions (not just links)
- Follow the instructions to access the WebUI via sidebar panel
- ✅ WebUI should open correctly
- Set
enable_installation_review: truein add-on config - Restart the add-on
- Check the add-on logs
- ✅ You should see the "INSTALLATION REVIEW FEATURE ENABLED" banner
- ✅ Logs should show schedule and scope
- Wait for the scheduled review (or trigger manually if implemented)
- ✅ You should receive an installation review notification
- Enable
monitor_logs_after_update: truein add-on config - Wait for first check to complete (establishes baseline)
- Check logs for "ESTABLISHING BASELINE" message
- Restart Home Assistant (simulating post-update restart)
- Wait for next log check
- Check logs for "Using baseline for comparison" message
- ✅ Log comparison should work despite HA restart
-
ha_sentry/rootfs/usr/bin/run.sh- Added 3 missing environment variable exports
-
ha_sentry/rootfs/app/sentry_service.py- Enhanced installation review initialization logging
- Updated notification format to provide clear access instructions
- Removed reliance on markdown links
-
ha_sentry/rootfs/app/log_monitor.py- Added
BASELINE_LOGS_FILEconstant - Enhanced
save_current_logs()to maintain baseline - Enhanced
load_previous_logs()to fall back to baseline - Added comprehensive logging for baseline operations
- Updated
check_logs()with enhanced documentation
- Added
-
tests/test_three_feature_fixes.py(new)- Comprehensive test suite for all three fixes
- Validates environment variable exports
- Validates notification improvements
- Validates baseline log persistence
- ✅ Installation review feature now works as expected
- ✅ Users can reliably access WebUI from notifications
- ✅ Log monitoring now works across HA restarts (most update scenarios)
- ✅ Better user experience with clear instructions
- ✅ Enhanced logging makes troubleshooting easier
- ✅ All changes are backward compatible
- ✅ Existing log files continue to work
- ✅ No configuration changes required
- ✅ No breaking changes to APIs or behavior
- No action required from users
- Baseline log file will be created automatically on first run after upgrade
- Installation review will start working if already enabled in config
python3 tests/test_three_feature_fixes.pyExpected output:
Tests completed: 5 passed, 0 failed
- Verify installation review logs show "ENABLED" when configured
- Verify installation review notification appears on schedule
- Verify WebUI accessible via sidebar panel
- Verify WebUI accessible via Add-on Settings
- Verify notification provides clear access instructions
- Verify log monitoring establishes baseline on first run
- Verify log monitoring uses baseline after HA restart
- Verify log comparison reports work with baseline
- Original issue: "New Features Not Working" (2026-01-12)
- Related: Notification link fix (previous iterations)
- Related: Log monitoring enhancements
- Add manual trigger for installation review
- Add WebUI deep linking support via intent:// URLs for mobile
- Add pre-update log snapshot API for integration with update process
- Add baseline health check and auto-refresh mechanism
- Markdown links in notifications still may not work in some HA versions/apps
- Baseline is updated only in stable states (may not capture all scenarios)
- Installation review requires AI to be enabled for best results