feat: add problem detection framework for common problems (#2412)

Introduces a ProblemManager that detects and surfaces actionable issues
(stale config, legacy frigate-hass-card resources, slow/failed streams)
via status bar indicators and notification popups with fix actions.
This commit is contained in:
Dermot Duffy
2026-03-13 20:00:59 -07:00
committed by GitHub
parent 95faddd9a0
commit ab683df5e8
46 changed files with 2147 additions and 166 deletions
+19
View File
@@ -151,6 +151,25 @@ describe('getDiagnostics', () => {
});
});
it('should include problems in diagnostics', async () => {
const deviceRegistryManager = mock<DeviceRegistryManager>();
deviceRegistryManager.getMatchingDevices.mockResolvedValue([]);
const problems = {
config_upgrade: true,
legacy_resource: false,
};
const result = await getDiagnostics(
hass,
deviceRegistryManager,
{ cameras: [{ camera_entity: 'camera.office' }] },
problems,
);
expect(result.problems).toEqual(problems);
});
it('should fetch diagnostics without device model', async () => {
const deviceRegistryManager = mock<DeviceRegistryManager>();
deviceRegistryManager.getMatchingDevices.mockResolvedValue([]);