Refactor main types.ts .

This commit is contained in:
Dermot Duffy
2023-10-02 22:35:58 -07:00
parent 5ebd85e5e8
commit 9b72dd8089
77 changed files with 2268 additions and 1819 deletions
+5 -4
View File
@@ -2,12 +2,13 @@ import { HomeAssistant } from 'custom-card-helpers';
import { CSSResultGroup, html, LitElement, TemplateResult, unsafeCSS } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { createRef, Ref, ref } from 'lit/directives/ref.js';
import liveHAStyle from '../../scss/live-ha.scss';
import { CameraConfig, FrigateCardMediaPlayer } from '../../types.js';
import { getStateObjOrDispatchError } from './live.js';
import { CameraConfig } from '../../config/types';
import '../../patches/ha-camera-stream';
import '../../patches/ha-hls-player.js';
import '../../patches/ha-web-rtc-player.ts';
import liveHAStyle from '../../scss/live-ha.scss';
import { FrigateCardMediaPlayer } from '../../types.js';
import { getStateObjOrDispatchError } from './live.js';
@customElement('frigate-card-live-ha')
export class FrigateCardLiveHA extends LitElement implements FrigateCardMediaPlayer {
@@ -55,7 +56,7 @@ export class FrigateCardLiveHA extends LitElement implements FrigateCardMediaPla
}
public async getScreenshotURL(): Promise<string | null> {
return await this._playerRef.value?.getScreenshotURL() ?? null;
return (await this._playerRef.value?.getScreenshotURL()) ?? null;
}
protected render(): TemplateResult | void {