Formatting fixes.
This commit is contained in:
+14
-4
@@ -475,7 +475,10 @@ export function getCameraID(
|
||||
return (
|
||||
(typeof config?.id === 'string' && config.id) ||
|
||||
(typeof config?.camera_entity === 'string' && config.camera_entity) ||
|
||||
(typeof config?.webrtc_card === 'object' && config.webrtc_card && typeof config.webrtc_card['entity'] === 'string' && config.webrtc_card['entity']) ||
|
||||
(typeof config?.webrtc_card === 'object' &&
|
||||
config.webrtc_card &&
|
||||
typeof config.webrtc_card['entity'] === 'string' &&
|
||||
config.webrtc_card['entity']) ||
|
||||
(typeof config?.camera_name === 'string' && config.camera_name) ||
|
||||
''
|
||||
);
|
||||
@@ -497,9 +500,16 @@ export function getCameraTitle(
|
||||
// used on raw configuration in the editor.
|
||||
return (
|
||||
(typeof config?.title === 'string' && config.title) ||
|
||||
(typeof config?.camera_entity === 'string' ? getEntityTitle(hass, config.camera_entity) : '') ||
|
||||
(typeof config?.webrtc_card === 'object' && config.webrtc_card && typeof config.webrtc_card['entity'] === 'string' && config.webrtc_card['entity']) ||
|
||||
(typeof config?.camera_name === 'string' ? prettifyFrigateName(config.camera_name) : '') ||
|
||||
(typeof config?.camera_entity === 'string'
|
||||
? getEntityTitle(hass, config.camera_entity)
|
||||
: '') ||
|
||||
(typeof config?.webrtc_card === 'object' &&
|
||||
config.webrtc_card &&
|
||||
typeof config.webrtc_card['entity'] === 'string' &&
|
||||
config.webrtc_card['entity']) ||
|
||||
(typeof config?.camera_name === 'string'
|
||||
? prettifyFrigateName(config.camera_name)
|
||||
: '') ||
|
||||
(typeof config?.id === 'string' && config.id) ||
|
||||
''
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user