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,7 +1,7 @@
|
||||
import { LovelaceCardEditor } from '@dermotduffy/custom-card-helpers';
|
||||
import { ReactiveController } from 'lit';
|
||||
import { CameraManager } from '../camera-manager/manager';
|
||||
import { FrigateCardConfig } from '../config/types';
|
||||
import { AdvancedCameraCardConfig } from '../config/types';
|
||||
import {
|
||||
createDeviceRegistryCache,
|
||||
DeviceRegistryManager,
|
||||
@@ -177,7 +177,7 @@ export class CardController
|
||||
|
||||
public static async getConfigElement(): Promise<LovelaceCardEditor> {
|
||||
await import('../editor.js');
|
||||
return document.createElement('frigate-card-editor');
|
||||
return document.createElement('advanced-camera-card-editor');
|
||||
}
|
||||
|
||||
public getConfigManager(): ConfigManager {
|
||||
@@ -255,7 +255,7 @@ export class CardController
|
||||
return this._statusBarItemManager;
|
||||
}
|
||||
|
||||
public static getStubConfig(entities: string[]): FrigateCardConfig {
|
||||
public static getStubConfig(entities: string[]): AdvancedCameraCardConfig {
|
||||
const cameraEntity = entities.find((element) => element.startsWith('camera.'));
|
||||
return {
|
||||
cameras: [
|
||||
@@ -266,7 +266,7 @@ export class CardController
|
||||
// Need to use 'as unknown' to convince Typescript that this really isn't a
|
||||
// mistake, despite the miniscule size of the configuration vs the full type
|
||||
// description.
|
||||
} as unknown as FrigateCardConfig;
|
||||
} as unknown as AdvancedCameraCardConfig;
|
||||
}
|
||||
|
||||
public getStyleManager(): StyleManager {
|
||||
|
||||
Reference in New Issue
Block a user