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:
@@ -2,15 +2,15 @@ import { HomeAssistant } from '@dermotduffy/custom-card-helpers';
|
||||
import { CSSResultGroup, html, LitElement, TemplateResult, unsafeCSS } from 'lit';
|
||||
import { customElement, property } from 'lit/decorators.js';
|
||||
import { until } from 'lit/directives/until.js';
|
||||
import { RawFrigateCardConfig } from '../config/types';
|
||||
import { RawAdvancedCameraCardConfig } from '../config/types';
|
||||
import { localize } from '../localize/localize';
|
||||
import basicBlockStyle from '../scss/basic-block.scss';
|
||||
import { getDiagnostics } from '../utils/diagnostics';
|
||||
import { DeviceRegistryManager } from '../utils/ha/registry/device';
|
||||
import { renderMessage } from './message';
|
||||
|
||||
@customElement('frigate-card-diagnostics')
|
||||
export class FrigateCardDiagnostics extends LitElement {
|
||||
@customElement('advanced-camera-card-diagnostics')
|
||||
export class AdvancedCameraCardDiagnostics extends LitElement {
|
||||
// Not a reactive property to avoid multiple diagnostics fetches.
|
||||
public hass?: HomeAssistant;
|
||||
|
||||
@@ -18,7 +18,7 @@ export class FrigateCardDiagnostics extends LitElement {
|
||||
public deviceRegistryManager?: DeviceRegistryManager;
|
||||
|
||||
@property({ attribute: false })
|
||||
public rawConfig?: RawFrigateCardConfig;
|
||||
public rawConfig?: RawAdvancedCameraCardConfig;
|
||||
|
||||
protected async _renderDiagnostics(): Promise<TemplateResult> {
|
||||
const diagnostics = await getDiagnostics(
|
||||
@@ -52,6 +52,6 @@ export class FrigateCardDiagnostics extends LitElement {
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'frigate-card-diagnostics': FrigateCardDiagnostics;
|
||||
'advanced-camera-card-diagnostics': AdvancedCameraCardDiagnostics;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user