feat: Add hardened error handling and retries (#2451)

- Closes #1830
 - Closes #2099
This commit is contained in:
Dermot Duffy
2026-06-30 17:45:12 -07:00
committed by dermotduffy
parent 4bc787e2b7
commit 47bcce93d3
182 changed files with 7877 additions and 4043 deletions
+3 -6
View File
@@ -7,7 +7,6 @@ import {
} from '../const';
import { Entity } from '../ha/registry/entity/types';
import { supportsFeature } from '../ha/supports-feature';
import { localize } from '../localize/localize';
import { errorToConsole } from '../utils/basic';
import { ViewMedia } from '../view/item';
import { ViewItemClassifier } from '../view/item-classifier';
@@ -165,12 +164,10 @@ export class MediaPlayerManager {
}
const dashboardConfig = cameraConfig.cast?.dashboard;
// Guaranteed by schema refinement when cast.method is 'dashboard', but
// needed for TypeScript narrowing since refine() doesn't narrow types.
if (!dashboardConfig?.dashboard_path || !dashboardConfig?.view_path) {
this._api.getMessageManager().setMessageIfHigherPriority({
type: 'error',
icon: 'mdi:cast',
message: localize('error.no_dashboard_or_view'),
});
return;
}