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:
@@ -1,4 +1,5 @@
|
||||
import pkg from '../../package.json';
|
||||
import { ProblemPresence } from '../card-controller/problems/types';
|
||||
import { RawAdvancedCameraCardConfig } from '../config/types';
|
||||
import { getIntegrationManifest } from '../ha/integration';
|
||||
import { IntegrationManifest } from '../ha/integration/types';
|
||||
@@ -46,6 +47,7 @@ interface Diagnostics {
|
||||
|
||||
ha_version?: string;
|
||||
config?: RawAdvancedCameraCardConfig;
|
||||
problems?: ProblemPresence;
|
||||
|
||||
custom_integrations: {
|
||||
frigate: IntegrationDiagnostics & {
|
||||
@@ -80,6 +82,7 @@ export const getDiagnostics = async (
|
||||
hass?: HomeAssistant,
|
||||
deviceRegistryManager?: DeviceRegistryManager,
|
||||
rawConfig?: RawAdvancedCameraCardConfig,
|
||||
problems?: ProblemPresence,
|
||||
): Promise<Diagnostics> => {
|
||||
// Get the Frigate devices in order to extract the Frigate integration and
|
||||
// server version numbers.
|
||||
@@ -121,6 +124,7 @@ export const getDiagnostics = async (
|
||||
},
|
||||
hass_web_proxy: await getIntegrationDiagnostics(HASS_WEB_PROXY_DOMAIN, hass),
|
||||
},
|
||||
...(problems && { problems }),
|
||||
...(rawConfig && { config: rawConfig }),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user