Initial version of substream support.

This commit is contained in:
Dermot Duffy
2023-02-24 20:41:11 -08:00
parent f8c824b135
commit 812c3e1018
20 changed files with 295 additions and 147 deletions
+11 -11
View File
@@ -1,16 +1,16 @@
import {
ActionConfig,
handleActionConfig,
hasAction,
HomeAssistant
ActionConfig,
handleActionConfig,
hasAction,
HomeAssistant,
} from 'custom-card-helpers';
import {
Actions,
ActionsConfig,
ActionType,
FrigateCardAction,
FrigateCardCustomAction,
frigateCardCustomActionSchema
Actions,
ActionsConfig,
ActionType,
FrigateCardAction,
FrigateCardCustomAction,
frigateCardCustomActionSchema,
} from '../types.js';
/**
@@ -43,7 +43,7 @@ export function createFrigateCardCustomAction(
media_player_action?: 'play' | 'stop';
},
): FrigateCardCustomAction | null {
if (action === 'camera_select') {
if (action === 'camera_select' || action === 'live_substream_select') {
if (!args?.camera) {
return null;
}