feat: Rename the card to advanced-camera-card (#1873)
Whilst the Frigate support in this card is the best among camera engines, the name incorrectly suggests that Frigate is a requirement. Instead, to broaden the appeal, change to more camera agnostic name. This does not suggest any change in priority, role or support for Frigate. This change is likely to be bug prone, due to the size of the rename -- the code contains 1500+ references to "Frigate" most of which make sense to rename, some which do not, all of which needed human assessment. - Closes #1298 BREAKING CHANGE: References to `frigate-card` in all kinds of configuration need to be updated to `advanced-camera-card`. An automated config upgrade should take care of the majority of usecases (click `Edit -> Upgrade -> Save`), though may not be perfect.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FrigateCardError } from '../types.js';
|
||||
import { AdvancedCameraCardError } from '../types.js';
|
||||
|
||||
export class CameraInitializationError extends FrigateCardError {}
|
||||
export class CameraNoIDError extends FrigateCardError {}
|
||||
export class CameraInitializationError extends AdvancedCameraCardError {}
|
||||
export class CameraNoIDError extends AdvancedCameraCardError {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { HomeAssistant } from '@dermotduffy/custom-card-helpers';
|
||||
import { localize } from '../../localize/localize';
|
||||
import { FrigateCardError } from '../../types';
|
||||
import { AdvancedCameraCardError } from '../../types';
|
||||
import { homeAssistantWSRequest } from '../../utils/ha/ws-request';
|
||||
import { RecordingSegment } from '../types';
|
||||
import {
|
||||
@@ -38,7 +38,7 @@ export const getRecordingsSummary = async (
|
||||
camera: camera_name,
|
||||
|
||||
// Ask for the summary relative to HA timezone
|
||||
// See: https://github.com/dermotduffy/frigate-hass-card/issues/1267
|
||||
// See: https://github.com/dermotduffy/advanced-camera-card/issues/1267
|
||||
timezone: hass.config.time_zone,
|
||||
},
|
||||
true,
|
||||
@@ -100,7 +100,7 @@ export async function retainEvent(
|
||||
true,
|
||||
);
|
||||
if (!response.success) {
|
||||
throw new FrigateCardError(localize('error.failed_retain'), {
|
||||
throw new AdvancedCameraCardError(localize('error.failed_retain'), {
|
||||
request: retainRequest,
|
||||
response: response,
|
||||
});
|
||||
@@ -153,7 +153,7 @@ export const getEventSummary = async (
|
||||
instance_id: clientID,
|
||||
|
||||
// Ask for the summary relative to HA timezone
|
||||
// See: https://github.com/dermotduffy/frigate-hass-card/issues/1267
|
||||
// See: https://github.com/dermotduffy/advanced-camera-card/issues/1267
|
||||
timezone: hass.config.time_zone,
|
||||
},
|
||||
true,
|
||||
|
||||
@@ -228,7 +228,7 @@ export class CameraManager {
|
||||
}
|
||||
|
||||
// Engines are created sequentially, to avoid duplicate creation of the same
|
||||
// engine. See: https://github.com/dermotduffy/frigate-hass-card/issues/941
|
||||
// engine. See: https://github.com/dermotduffy/advanced-camera-card/issues/941
|
||||
const engineByConfig = await this._getEnginesForCameras(camerasConfig);
|
||||
|
||||
// Configuration is initialized in parallel.
|
||||
@@ -272,7 +272,7 @@ export class CameraManager {
|
||||
|
||||
log(
|
||||
this._api.getConfigManager().getCardWideConfig(),
|
||||
'Frigate Card CameraManager initialized (Cameras: ',
|
||||
'Advanced Camera Card CameraManager initialized (Cameras: ',
|
||||
this._store.getCameras(),
|
||||
`, Duration: ${
|
||||
(new Date().getTime() - initializationStartTime.getTime()) / 1000
|
||||
@@ -546,7 +546,7 @@ export class CameraManager {
|
||||
|
||||
log(
|
||||
this._api.getConfigManager().getCardWideConfig(),
|
||||
'Frigate Card CameraManager favorite request (',
|
||||
'Advanced Camera Card CameraManager favorite request (',
|
||||
`Duration: ${(new Date().getTime() - queryStartTime.getTime()) / 1000}s,`,
|
||||
'Media:',
|
||||
media.getID(),
|
||||
@@ -679,7 +679,7 @@ export class CameraManager {
|
||||
|
||||
log(
|
||||
this._api.getConfigManager().getCardWideConfig(),
|
||||
'Frigate Card CameraManager request [Input queries:',
|
||||
'Advanced Camera Card CameraManager request [Input queries:',
|
||||
_queries.length,
|
||||
', Cached output queries:',
|
||||
cachedOutputQueries,
|
||||
|
||||
@@ -181,7 +181,7 @@ export class ReolinkCameraManagerEngine extends BrowseMediaCameraManagerEngine {
|
||||
// First fetch all the Reolink cameras that show up under the media root,
|
||||
// that match the expected camera. Some Reolink cameras will not show up
|
||||
// here causing errors.
|
||||
// https://github.com/dermotduffy/frigate-hass-card/issues/1723
|
||||
// https://github.com/dermotduffy/advanced-camera-card/issues/1723
|
||||
const camerasWithMedia = await this._browseMediaManager.walkBrowseMedias(
|
||||
hass,
|
||||
[
|
||||
|
||||
@@ -48,7 +48,7 @@ export class CameraManagerStore implements CameraManagerReadOnlyConfigStore {
|
||||
// In setting the store cameras, take great care to replace/add first before
|
||||
// remove. Otherwise, there may be race conditions where the card attempts
|
||||
// to render a view with (momentarily) no camera.
|
||||
// See: https://github.com/dermotduffy/frigate-hass-card/issues/1533
|
||||
// See: https://github.com/dermotduffy/advanced-camera-card/issues/1533
|
||||
|
||||
// Replace/Add the new cameras.
|
||||
for (const camera of cameras) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AdvancedCameraCardView, SSLCiphers } from '../config/types';
|
||||
import { CapabilityKey, Icon } from '../types';
|
||||
import { FrigateCardView, SSLCiphers } from '../config/types';
|
||||
import { ViewMedia } from '../view/media';
|
||||
|
||||
// ====
|
||||
@@ -114,7 +114,7 @@ export interface CameraManagerCameraMetadata {
|
||||
|
||||
export interface CameraEndpointsContext {
|
||||
media?: ViewMedia;
|
||||
view?: FrigateCardView;
|
||||
view?: AdvancedCameraCardView;
|
||||
}
|
||||
|
||||
export interface CameraEndpoint {
|
||||
|
||||
Reference in New Issue
Block a user