Merge pull request #1472 from felipecrs/prettier
Bump prettier to v3 and format all files
This commit is contained in:
+5
-4
@@ -1,14 +1,15 @@
|
||||
module.exports = {
|
||||
parser: "@typescript-eslint/parser", // Specifies the ESLint parser
|
||||
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
|
||||
sourceType: "module" // Allows for the use of imports
|
||||
sourceType: 'module', // Allows for the use of imports
|
||||
},
|
||||
extends: [
|
||||
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
|
||||
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
|
||||
'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
|
||||
],
|
||||
rules: {
|
||||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
|
||||
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -5,4 +5,4 @@ updates:
|
||||
directory: /
|
||||
schedule:
|
||||
interval: daily
|
||||
target-branch: "dev"
|
||||
target-branch: 'dev'
|
||||
|
||||
+23
-23
@@ -1,29 +1,29 @@
|
||||
---
|
||||
categories:
|
||||
- title: ":boom: Breaking Changes"
|
||||
label: "breaking"
|
||||
- title: ":rocket: Features"
|
||||
label: "enhancement"
|
||||
- title: ":fire: Removals and Deprecations"
|
||||
label: "removal"
|
||||
- title: ":bug: Fixes"
|
||||
label: "bug"
|
||||
- title: ":racehorse: Performance"
|
||||
label: "performance"
|
||||
- title: ":rotating_light: Testing"
|
||||
label: "testing"
|
||||
- title: ":construction_worker: Continuous Integration"
|
||||
label: "ci"
|
||||
- title: ":books: Documentation"
|
||||
label: "documentation"
|
||||
- title: ":hammer: Refactoring"
|
||||
label: "refactoring"
|
||||
- title: ":lipstick: Style"
|
||||
label: "style"
|
||||
- title: ":package: Dependencies"
|
||||
- title: ':boom: Breaking Changes'
|
||||
label: 'breaking'
|
||||
- title: ':rocket: Features'
|
||||
label: 'enhancement'
|
||||
- title: ':fire: Removals and Deprecations'
|
||||
label: 'removal'
|
||||
- title: ':bug: Fixes'
|
||||
label: 'bug'
|
||||
- title: ':racehorse: Performance'
|
||||
label: 'performance'
|
||||
- title: ':rotating_light: Testing'
|
||||
label: 'testing'
|
||||
- title: ':construction_worker: Continuous Integration'
|
||||
label: 'ci'
|
||||
- title: ':books: Documentation'
|
||||
label: 'documentation'
|
||||
- title: ':hammer: Refactoring'
|
||||
label: 'refactoring'
|
||||
- title: ':lipstick: Style'
|
||||
label: 'style'
|
||||
- title: ':package: Dependencies'
|
||||
labels:
|
||||
- "dependencies"
|
||||
- "build"
|
||||
- 'dependencies'
|
||||
- 'build'
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
|
||||
@@ -25,6 +25,12 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Lint
|
||||
run: yarn run lint
|
||||
|
||||
- name: Check formatting
|
||||
run: yarn run format-check
|
||||
|
||||
- name: Test & Coverage
|
||||
run: yarn run coverage
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
docs/js/
|
||||
@@ -1,8 +0,0 @@
|
||||
module.exports = {
|
||||
semi: true,
|
||||
trailingComma: 'all',
|
||||
singleQuote: true,
|
||||
printWidth: 89,
|
||||
tabWidth: 2,
|
||||
embeddedLanguageFormatting: 'auto',
|
||||
};
|
||||
-2
@@ -12,7 +12,6 @@ usageMatchRegex:
|
||||
# you can ignore it and use your own matching rules as well
|
||||
- "[^\\w\\d]localize\\(['\"`]({key})['\"`]"
|
||||
|
||||
|
||||
# An array of strings containing refactor templates.
|
||||
# The "$1" will be replaced by the keypath specified.
|
||||
# Optional: uncomment the following two lines to use
|
||||
@@ -20,6 +19,5 @@ usageMatchRegex:
|
||||
# refactorTemplates:
|
||||
# - i18n.get("$1")
|
||||
|
||||
|
||||
# If set to true, only enables this custom framework (will disable all built-in frameworks)
|
||||
monopoly: true
|
||||
|
||||
@@ -19,16 +19,16 @@
|
||||
|
||||
A comprehensive camera card for Home Assistant.
|
||||
|
||||
* Live viewing of multiple cameras.
|
||||
* Clips and snapshot browsing via mini-gallery.
|
||||
* Automatic updating to continually show latest clip / snapshot.
|
||||
* Support for filtering events by zone and label.
|
||||
* Arbitrary entity access via menu (e.g. motion sensor access).
|
||||
* Fullscreen mode.
|
||||
* Grid or carousel/swipeable media, thumbnails and cameras.
|
||||
* Direct media downloads.
|
||||
* Lovelace visual editing.
|
||||
* Full [Picture Elements](https://www.home-assistant.io/lovelace/picture-elements/) support.
|
||||
* Theme friendly.
|
||||
- Live viewing of multiple cameras.
|
||||
- Clips and snapshot browsing via mini-gallery.
|
||||
- Automatic updating to continually show latest clip / snapshot.
|
||||
- Support for filtering events by zone and label.
|
||||
- Arbitrary entity access via menu (e.g. motion sensor access).
|
||||
- Fullscreen mode.
|
||||
- Grid or carousel/swipeable media, thumbnails and cameras.
|
||||
- Direct media downloads.
|
||||
- Lovelace visual editing.
|
||||
- Full [Picture Elements](https://www.home-assistant.io/lovelace/picture-elements/) support.
|
||||
- Theme friendly.
|
||||
|
||||
See [full documentation](https://dermotduffy.github.io/frigate-hass-card).
|
||||
+5
-3
@@ -18,12 +18,14 @@ See [Advanced Installation](advanced-installation.md) for other installation res
|
||||
|
||||
## Adding your card
|
||||
|
||||
- On a Home Assistant dashboard, choose:
|
||||
- On a Home Assistant dashboard, choose:
|
||||
|
||||
```
|
||||
[Three dots menu] > Edit dashboard
|
||||
```
|
||||
- Click `+ Add Card` shown on the bottom of the screen
|
||||
- Choose `Custom: Frigate card` from the list
|
||||
|
||||
- Click `+ Add Card` shown on the bottom of the screen
|
||||
- Choose `Custom: Frigate card` from the list
|
||||
|
||||
## Initial configuration
|
||||
|
||||
|
||||
+7
-7
@@ -1,10 +1,10 @@
|
||||
* [Getting Started](README.md)
|
||||
* [Configuration](configuration/README.md)
|
||||
* [Examples](examples.md)
|
||||
* [Screenshots](screenshots.md)
|
||||
* [Troubleshooting](troubleshooting.md)
|
||||
* [Usage](usage/README.md)
|
||||
- [Getting Started](README.md)
|
||||
- [Configuration](configuration/README.md)
|
||||
- [Examples](examples.md)
|
||||
- [Screenshots](screenshots.md)
|
||||
- [Troubleshooting](troubleshooting.md)
|
||||
- [Usage](usage/README.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](developing.md)
|
||||
- [Developing](developing.md)
|
||||
|
||||
@@ -17,11 +17,11 @@ cameras:
|
||||
Only the `cameras` option is required, all other parameters are optional.
|
||||
|
||||
| Option | Description |
|
||||
| - | - |
|
||||
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`automations`](automations.md) | Take action when conditions are met. |
|
||||
| [`cameras`](cameras/README.md) | Configures the cameras to be used in the card. At least one camera must be specified. |
|
||||
| [`cameras_global`](cameras/README.md) | Global defaults that apply to all cameras from the `cameras` section. |
|
||||
| `card_id` | An optional ID to uniquely identify this card. For use when actions are being sent to card(s) via [URL actions](../usage/url-actions.md). Must exclusively consist of these characters: `[a-zA-Z0-9_]`.|
|
||||
| `card_id` | An optional ID to uniquely identify this card. For use when actions are being sent to card(s) via [URL actions](../usage/url-actions.md). Must exclusively consist of these characters: `[a-zA-Z0-9_]`. |
|
||||
| [`dimensions`](dimensions.md) | Configures the overall card dimensions. |
|
||||
| [`elements`](elements.md) | Add custom elements to the card. |
|
||||
| [`image`](image.md) | Configures the `image` view. |
|
||||
@@ -38,6 +38,6 @@ Only the `cameras` option is required, all other parameters are optional.
|
||||
#### Common configuration blocks
|
||||
|
||||
| Option | Description |
|
||||
| - | - |
|
||||
| ------------------------------ | --------------------- |
|
||||
| [`actions`](actions/README.md) | Configure actions. |
|
||||
| [`conditions`](conditions.md) | Configure conditions. |
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
* [Getting Started](../README.md)
|
||||
* [Configuration](README.md)
|
||||
* [`actions`](actions/README.md)
|
||||
* [`automations`](automations.md)
|
||||
* [`cameras`](cameras/README.md)
|
||||
* [`conditions`](conditions.md)
|
||||
* [`dimensions`](dimensions.md)
|
||||
* [`elements`](elements.md)
|
||||
* [`image`](image.md)
|
||||
* [`live`](live.md)
|
||||
* [`media_gallery`](media-gallery.md)
|
||||
* [`media_viewer`](media-viewer.md)
|
||||
* [`menu`](menu.md)
|
||||
* [`overrides`](overrides.md)
|
||||
* [`performance`](performance.md)
|
||||
* [`profiles`](profiles.md)
|
||||
* [`timeline`](timeline.md)
|
||||
* [`view`](view.md)
|
||||
* [Examples](../examples.md)
|
||||
* [Screenshots](../screenshots.md)
|
||||
* [Troubleshooting](../troubleshooting.md)
|
||||
* [Usage](../usage/README.md)
|
||||
- [Getting Started](../README.md)
|
||||
- [Configuration](README.md)
|
||||
- [`actions`](actions/README.md)
|
||||
- [`automations`](automations.md)
|
||||
- [`cameras`](cameras/README.md)
|
||||
- [`conditions`](conditions.md)
|
||||
- [`dimensions`](dimensions.md)
|
||||
- [`elements`](elements.md)
|
||||
- [`image`](image.md)
|
||||
- [`live`](live.md)
|
||||
- [`media_gallery`](media-gallery.md)
|
||||
- [`media_viewer`](media-viewer.md)
|
||||
- [`menu`](menu.md)
|
||||
- [`overrides`](overrides.md)
|
||||
- [`performance`](performance.md)
|
||||
- [`profiles`](profiles.md)
|
||||
- [`timeline`](timeline.md)
|
||||
- [`view`](view.md)
|
||||
- [Examples](../examples.md)
|
||||
- [Screenshots](../screenshots.md)
|
||||
- [Troubleshooting](../troubleshooting.md)
|
||||
- [Usage](../usage/README.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../developing.md)
|
||||
- [Developing](../developing.md)
|
||||
|
||||
@@ -44,7 +44,7 @@ Alternatively they can be configured on a per group-of-views basis, e.g. only
|
||||
when `live` view is tapped.
|
||||
|
||||
| Configuration path | Views to which it refers |
|
||||
| ----------------------- | ---------------------------------- |
|
||||
| ----------------------- | -------------------------------------- |
|
||||
| `image.actions` | `image` |
|
||||
| `live.actions` | `live` |
|
||||
| `media_gallery.actions` | `clips`, `snapshots`, `recordings` |
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
* [Getting Started](../../README.md)
|
||||
* [Configuration](../README.md)
|
||||
* [`actions`](README.md)
|
||||
* [Custom Actions](./custom/README.md)
|
||||
* [Stock Actions](./stock/README.md)
|
||||
* [`automations`](../automations.md)
|
||||
* [`cameras`](../cameras/README.md)
|
||||
* [`conditions`](../conditions.md)
|
||||
* [`dimensions`](../dimensions.md)
|
||||
* [`elements`](../elements.md)
|
||||
* [`image`](../image.md)
|
||||
* [`live`](../live.md)
|
||||
* [`media_gallery`](../media-gallery.md)
|
||||
* [`media_viewer`](../media-viewer.md)
|
||||
* [`menu`](../menu.md)
|
||||
* [`overrides`](../overrides.md)
|
||||
* [`performance`](../performance.md)
|
||||
* [`profiles`](../profiles.md)
|
||||
* [`timeline`](../timeline.md)
|
||||
* [`view`](../view.md)
|
||||
* [Screenshots](../../screenshots.md)
|
||||
* [Troubleshooting](../../troubleshooting.md)
|
||||
* [Usage](../../usage/README.md)
|
||||
- [Getting Started](../../README.md)
|
||||
- [Configuration](../README.md)
|
||||
- [`actions`](README.md)
|
||||
- [Custom Actions](./custom/README.md)
|
||||
- [Stock Actions](./stock/README.md)
|
||||
- [`automations`](../automations.md)
|
||||
- [`cameras`](../cameras/README.md)
|
||||
- [`conditions`](../conditions.md)
|
||||
- [`dimensions`](../dimensions.md)
|
||||
- [`elements`](../elements.md)
|
||||
- [`image`](../image.md)
|
||||
- [`live`](../live.md)
|
||||
- [`media_gallery`](../media-gallery.md)
|
||||
- [`media_viewer`](../media-viewer.md)
|
||||
- [`menu`](../menu.md)
|
||||
- [`overrides`](../overrides.md)
|
||||
- [`performance`](../performance.md)
|
||||
- [`profiles`](../profiles.md)
|
||||
- [`timeline`](../timeline.md)
|
||||
- [`view`](../view.md)
|
||||
- [Screenshots](../../screenshots.md)
|
||||
- [Troubleshooting](../../troubleshooting.md)
|
||||
- [Usage](../../usage/README.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../developing.md)
|
||||
- [Developing](../../developing.md)
|
||||
|
||||
@@ -4,11 +4,11 @@ Execute a Frigate Card action.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | A supported Frigate Card action. See below. |
|
||||
|
||||
@@ -19,11 +19,11 @@ Select a given camera.
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_select
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `camera_select`. |
|
||||
| `camera` | The [camera ID](../../cameras/README.md?id=cameras) of the camera to select. |
|
||||
@@ -49,11 +49,11 @@ Zoom in and/or pan for a given camera.
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: change_zoom
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `change_zoom`. |
|
||||
| `target_id` | The [camera ID](../../cameras/README.md?id=cameras) or a media ID (e.g. `frigate` event ID) to change zoom/pam settings for. |
|
||||
@@ -107,11 +107,11 @@ Select a display mode (e.g. view a `single` camera or a `grid` of cameras).
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: display_mode_select
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `display_mode_select`. |
|
||||
| `display_mode` | `single` to show a single camera at a time in a carousel, or `grid` to show a grid of cameras. |
|
||||
@@ -171,7 +171,7 @@ frigate_card_action: live_substream_on
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `live_substream_on`. |
|
||||
|
||||
@@ -185,12 +185,10 @@ frigate_card_action: live_substream_on
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `live_substream_on`. |
|
||||
|
||||
|
||||
|
||||
## `live_substream_select`
|
||||
|
||||
Select a substream. Use [Camera dependency configuration](../../cameras/README.md?id=dependencies) to configure substreams.
|
||||
@@ -198,11 +196,11 @@ Select a substream. Use [Camera dependency configuration](../../cameras/README.m
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live_substream_select
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ------------------------------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `live_substream_select`. |
|
||||
| `camera` | The [camera ID](../../cameras/README.md?id=cameras) of the substream to select. |
|
||||
@@ -214,11 +212,11 @@ Log a message to the Javascript console.
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: log
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------------- | ------- | ------------------------------------------------------------------------------ |
|
||||
| `action` | | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | | Must be `log`. |
|
||||
| `message` | | The message to log. |
|
||||
@@ -231,11 +229,11 @@ Perform a media player action.
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: media_player
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ----------------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `media_player`. |
|
||||
| `media_player` | The entity ID of the media_player on which to perform the action. |
|
||||
@@ -302,11 +300,11 @@ Execute a real PTZ action, whether configured manually (see [Camera PTZ configur
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | | Description |
|
||||
| - | - | - |
|
||||
| --------------------- | ------------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `action` | | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | | Must be `ptz`. |
|
||||
| `camera` | Currently selected camera | An optional camera ID to execute the action on. |
|
||||
@@ -323,11 +321,11 @@ Show or hide the PTZ controls.
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz_controls
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | -------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `ptz_controls`. |
|
||||
| `show` | If `true` shows the PTZ controls, if `false` hides them. |
|
||||
@@ -339,11 +337,11 @@ Execute a digital PTZ action.
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz-digital
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------------- | --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `action` | | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | | Must be `ptz-digital`. |
|
||||
| `target_id` | The currently selected camera or media | The target (camera or media) to execute a digital PTZ action on. Can be a camera ID, or another media ID (e.g. for Frigate, can specify a media/event ID). |
|
||||
@@ -358,7 +356,7 @@ frigate_card_action: ptz-digital
|
||||
Set exact digital PTZ pan and zoom parameters.
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `pan` | Control camera digital pan. See the `pan` parameter in [Camera layout configuration](../../cameras/README.md?id=layout-configuration). |
|
||||
| `zoom` | Control camera digital zoom. See the `zoom` parameter in [Camera layout configuration](../../cameras/README.md?id=layout-configuration). |
|
||||
|
||||
@@ -375,11 +373,11 @@ action), otherwise a digital PTZ action will be run (equivalent to using the
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz-multi
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `ptz-digital`. |
|
||||
| `ptz_action` | Optional action that is one of `left`, `right`, `up`, `down`, `zoom_in` or `zoom_out`. |
|
||||
@@ -425,7 +423,7 @@ frigate_card_action: sleep
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------------------- | ------------------------------------- |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `sleep`. |
|
||||
| `duration` | A duration object. See below. |
|
||||
@@ -435,7 +433,7 @@ frigate_card_action: sleep
|
||||
The `duration` block configures how long the `sleep` should last.
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------- | -------------------------- |
|
||||
| `h` | Hours to sleep for. |
|
||||
| `m` | Minutes to sleep for. |
|
||||
| `s` | Seconds to sleep for. |
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
* [Getting Started](../../../README.md)
|
||||
* [Configuration](../../README.md)
|
||||
* [`actions`](../README.md)
|
||||
* [Custom Actions](README.md)
|
||||
* [Stock Actions](../stock/README.md)
|
||||
* [`automations`](../../automations.md)
|
||||
* [`cameras`](../../cameras/README.md)
|
||||
* [`conditions`](../../conditions.md)
|
||||
* [`dimensions`](../../dimensions.md)
|
||||
* [`elements`](../../elements.md)
|
||||
* [`image`](../../image.md)
|
||||
* [`live`](../../live.md)
|
||||
* [`media_gallery`](../../media-gallery.md)
|
||||
* [`media_viewer`](../../media-viewer.md)
|
||||
* [`menu`](../../menu.md)
|
||||
* [`overrides`](../../overrides.md)
|
||||
* [`performance`](../../performance.md)
|
||||
* [`profiles`](../../profiles.md)
|
||||
* [`timeline`](../../timeline.md)
|
||||
* [`view`](../../view.md)
|
||||
* [Screenshots](../../../screenshots.md)
|
||||
* [Troubleshooting](../../../troubleshooting.md)
|
||||
* [Usage](../../../usage/README.md)
|
||||
- [Getting Started](../../../README.md)
|
||||
- [Configuration](../../README.md)
|
||||
- [`actions`](../README.md)
|
||||
- [Custom Actions](README.md)
|
||||
- [Stock Actions](../stock/README.md)
|
||||
- [`automations`](../../automations.md)
|
||||
- [`cameras`](../../cameras/README.md)
|
||||
- [`conditions`](../../conditions.md)
|
||||
- [`dimensions`](../../dimensions.md)
|
||||
- [`elements`](../../elements.md)
|
||||
- [`image`](../../image.md)
|
||||
- [`live`](../../live.md)
|
||||
- [`media_gallery`](../../media-gallery.md)
|
||||
- [`media_viewer`](../../media-viewer.md)
|
||||
- [`menu`](../../menu.md)
|
||||
- [`overrides`](../../overrides.md)
|
||||
- [`performance`](../../performance.md)
|
||||
- [`profiles`](../../profiles.md)
|
||||
- [`timeline`](../../timeline.md)
|
||||
- [`view`](../../view.md)
|
||||
- [Screenshots](../../../screenshots.md)
|
||||
- [Troubleshooting](../../../troubleshooting.md)
|
||||
- [Usage](../../../usage/README.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../../developing.md)
|
||||
- [Developing](../../../developing.md)
|
||||
|
||||
@@ -6,7 +6,7 @@ Call a service. See [Home Assistant actions documentation](https://www.home-assi
|
||||
|
||||
```yaml
|
||||
action: call-service
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `more-info`
|
||||
@@ -15,7 +15,7 @@ Open the "more-info" dialog for an entity. See [Home Assistant actions documenta
|
||||
|
||||
```yaml
|
||||
action: more-info
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `navigate`
|
||||
@@ -24,7 +24,7 @@ Navigate to a particular dashboard path. See [Home Assistant actions documentati
|
||||
|
||||
```yaml
|
||||
action: navigate
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `toggle`
|
||||
@@ -33,7 +33,7 @@ Toggle an entity. See [Home Assistant actions documentation](https://www.home-as
|
||||
|
||||
```yaml
|
||||
action: toggle
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `url`
|
||||
@@ -42,7 +42,7 @@ Navigate to an arbitrary URL. See [Home Assistant actions documentation](https:/
|
||||
|
||||
```yaml
|
||||
action: url
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
* [Getting Started](../../../README.md)
|
||||
* [Configuration](../../README.md)
|
||||
* [`actions`](../README.md)
|
||||
* [Custom Actions](../custom/README.md)
|
||||
* [Stock Actions](README.md)
|
||||
* [`automations`](../../automations.md)
|
||||
* [`cameras`](../../cameras/README.md)
|
||||
* [`conditions`](../../conditions.md)
|
||||
* [`dimensions`](../../dimensions.md)
|
||||
* [`elements`](../../elements.md)
|
||||
* [`image`](../../image.md)
|
||||
* [`live`](../../live.md)
|
||||
* [`media_gallery`](../../media-gallery.md)
|
||||
* [`media_viewer`](../../media-viewer.md)
|
||||
* [`menu`](../../menu.md)
|
||||
* [`overrides`](../../overrides.md)
|
||||
* [`performance`](../../performance.md)
|
||||
* [`profiles`](../../profiles.md)
|
||||
* [`timeline`](../../timeline.md)
|
||||
* [`view`](../../view.md)
|
||||
* [Screenshots](../../../screenshots.md)
|
||||
* [Troubleshooting](../../../troubleshooting.md)
|
||||
* [Usage](../../../usage/README.md)
|
||||
- [Getting Started](../../../README.md)
|
||||
- [Configuration](../../README.md)
|
||||
- [`actions`](../README.md)
|
||||
- [Custom Actions](../custom/README.md)
|
||||
- [Stock Actions](README.md)
|
||||
- [`automations`](../../automations.md)
|
||||
- [`cameras`](../../cameras/README.md)
|
||||
- [`conditions`](../../conditions.md)
|
||||
- [`dimensions`](../../dimensions.md)
|
||||
- [`elements`](../../elements.md)
|
||||
- [`image`](../../image.md)
|
||||
- [`live`](../../live.md)
|
||||
- [`media_gallery`](../../media-gallery.md)
|
||||
- [`media_viewer`](../../media-viewer.md)
|
||||
- [`menu`](../../menu.md)
|
||||
- [`overrides`](../../overrides.md)
|
||||
- [`performance`](../../performance.md)
|
||||
- [`profiles`](../../profiles.md)
|
||||
- [`timeline`](../../timeline.md)
|
||||
- [`view`](../../view.md)
|
||||
- [Screenshots](../../../screenshots.md)
|
||||
- [Troubleshooting](../../../troubleshooting.md)
|
||||
- [Usage](../../../usage/README.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../../developing.md)
|
||||
- [Developing](../../../developing.md)
|
||||
|
||||
@@ -15,7 +15,7 @@ automations:
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `conditions` | | A list of [conditions](conditions.md) that must evaluate to `true` in order to trigger the automation. |
|
||||
| `actions` | | An optional list of [actions](actions/README.md) that will be run when the [conditions](conditions.md) evaluate `true`. |
|
||||
| `actions_not` | | An optional list of [actions](actions/README.md) that will be run when the [conditions](conditions.md) evaluate `false`. |
|
||||
|
||||
@@ -13,11 +13,11 @@ The `cameras_global` block can be used to set defaults across multiple cameras.
|
||||
|
||||
```yaml
|
||||
cameras_global:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `camera_entity` | | The Home Assistant camera entity to use with the `frigate` live provider view. Also used to automatically detect the name of the underlying Frigate camera, and the title/icon of the camera. |
|
||||
| `capabilities` | | Allows selective disabling of camera capabilities. See below. |
|
||||
| `cast` | | Configuration that controls how this camera is "casted" / sent to media players. See below. |
|
||||
@@ -27,7 +27,7 @@ cameras_global:
|
||||
| `frigate` | | Options for Frigate cameras. See [Frigate camera engine configuration](engine.md?id=frigate). |
|
||||
| `icon` | Autodetected from `camera_entity` if that is specified. | The icon to use for this camera in the camera menu and in the next & previous controls when using the `icon` style. |
|
||||
| `id` | `camera_entity`, `webrtc_card.entity` or `frigate.camera_name` if set (in that preference order). | An optional identifier to use throughout the card configuration to refer unambiguously to this camera. This `id` may be used in [conditions](../conditions.md), dependencies or custom [actions](../actions/README.md) to refer to a given camera unambiguously. |
|
||||
| `live_provider` | `auto` | The choice of live stream provider. See [Live Provider](live-provider.md).|
|
||||
| `live_provider` | `auto` | The choice of live stream provider. See [Live Provider](live-provider.md). |
|
||||
| `title` | Autodetected from `camera_entity` if that is specified. | A friendly name for this camera to use in the card. |
|
||||
| `triggers` | | Define what should cause this camera to update/trigger. See below. |
|
||||
| `webrtc_card` | | The WebRTC entity/URL to use for this camera with the `webrtc-card` live provider. See below. |
|
||||
@@ -40,18 +40,18 @@ The `capabilities` block allows selected disabling of auto-detected camera capab
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
capabilities:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `disable` | | A list of camera capabilities to disable. By default all capabilities supported by the camera are enabled. |
|
||||
| `disable_except` | | A list of camera capabilities to leave enabled if supported. Everything else will be disabled. |
|
||||
|
||||
### Capabilities
|
||||
|
||||
| Capability | Purpose |
|
||||
| - | - |
|
||||
| --------------------- | -------------------------------------------------------- |
|
||||
| `clips` | Clips can be fetched from the camera. |
|
||||
| `favorite-events` | Events can be favorited. |
|
||||
| `favorite-recordings` | Recordings can be favorited. |
|
||||
@@ -71,11 +71,11 @@ The `cast` block configures how a camera is cast / sent to media players.
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
cast:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ----------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `dashboard` | | Configuration for the dashboard to cast. See below. |
|
||||
| `method` | `standard` | Whether to use `standard` media casting to send the live view to your media player, or to instead cast a `dashboard` you have manually setup. Casting a dashboard supports a much wider variety of video media, including low latency video providers (e.g. `go2rtc`). This setting has no effect on casting non-live media. |
|
||||
|
||||
@@ -88,11 +88,11 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
cast:
|
||||
dashboard:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `dashboard_path` | | A required field that specifies the name of the dashboard to cast. You can see this name in your HA URL when you visit the dashboard. |
|
||||
| `view_path` | | A required field that specifies view/"tab" on that dashboard to cast. This is the value you have specified in the `url` field of the view configuration on the dashboard. |
|
||||
|
||||
@@ -104,30 +104,29 @@ The `dependencies` block configures other cameras as dependents of this camera.
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
dependencies:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_cameras` | `false` | Shortcut to specify all other cameras as dependent cameras. |
|
||||
| `cameras` | | An optional list of other camera identifiers (see `id` parameter). If specified the card will fetch media for this camera and *also* recursively for the named cameras by default. Live views for the involved cameras will be available as 'substreams' of the main (depended upon) camera. All dependent cameras must themselves be a configured camera in the card. This can be useful to group events for cameras that are close together, to show multiple related live views, to always have clips/snapshots show fully merged events across all cameras or to show events for the `birdseye` camera that otherwise would not have events itself. |
|
||||
| `cameras` | | An optional list of other camera identifiers (see `id` parameter). If specified the card will fetch media for this camera and _also_ recursively for the named cameras by default. Live views for the involved cameras will be available as 'substreams' of the main (depended upon) camera. All dependent cameras must themselves be a configured camera in the card. This can be useful to group events for cameras that are close together, to show multiple related live views, to always have clips/snapshots show fully merged events across all cameras or to show events for the `birdseye` camera that otherwise would not have events itself. |
|
||||
|
||||
## `dimensions`
|
||||
|
||||
The `dimensions` block configures the dimensions and layout of media of a given camera (see [Card Dimensions](../dimensions.md) to set the dimensions of the whole card and not just a single camera).
|
||||
|
||||
|
||||
```yaml
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
dimensions:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| -------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `aspect_ratio` | | An optional aspect ratio for media from this camera which will be used in `live` or media viewer related views (e.g. `clip`, `snapshot` and `recording`). Format is the same as the parameter of the same name under the [dimensions block](../dimensions.md) (which controls dimensions for the whole card), e.g. `16 / 9`. |
|
||||
| `layout` | | How the media should be laid out *within* the camera dimensions. See below. |
|
||||
| `layout` | | How the media should be laid out _within_ the camera dimensions. See below. |
|
||||
|
||||
### Layout Configuration
|
||||
|
||||
@@ -138,15 +137,15 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
dimensions:
|
||||
layout:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `fit` | `contain` | If `contain`, the media is contained within the card and letterboxed if necessary. If `cover`, the media is expanded proportionally (i.e. maintaining the media aspect ratio) until the camera/card dimensions are fully covered. If `fill`, the media is stretched to fill the camera/card dimensions (i.e. ignoring the media aspect ratio). See [CSS object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) for technical details and a visualization. |
|
||||
| `pan` | | A dictionary that may contain an `x` and `y` percentage (`0` - `100`) to control the position of the media when "digitally zoomed in" (see `zoom` parameter). This can be effectively used to "pan"/cut the media shown. A value of `0` means maximally to the left or top of the media, a value of `100` means maximally to the right or bottom of the media. See visualizations below. |
|
||||
| `position` | | A dictionary that may contain an `x` and `y` percentage (`0` - `100`) to control the position of the media when the fit is `cover` (for other values of `fit` this option has no effect). This can be effectively used to "pan"/cut the media shown. At any given time, only one of `x` and `y` will have an effect, depending on whether media width is larger than the camera/card dimensions (in which case `x` controls the position) or the media height is larger than the camera/card dimensions (in which case `y` controls the position). A value of `0` means maximally to the left or top of the media, a value of `100` means maximally to the right or bottom of the media. See [CSS object-position](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) for technicals. See visualizations below. |
|
||||
| `view_box` | | A dictionary that may contain a `top`, `bottom`, `left` and `right` percentage (`0` - `100`) to precisely crop what part of the media to show by specifying a % inset value from each side. Browsers apply this cropping after `position` and `fit` have been applied. Unlike `zoom`, the user cannot dynamically zoom back out -- however the builtin media controls will work as normal. See visualizations below. Limited [browser support](https://caniuse.com/mdn-css_properties_object-view-box):    |
|
||||
| `view_box` | | A dictionary that may contain a `top`, `bottom`, `left` and `right` percentage (`0` - `100`) to precisely crop what part of the media to show by specifying a % inset value from each side. Browsers apply this cropping after `position` and `fit` have been applied. Unlike `zoom`, the user cannot dynamically zoom back out -- however the builtin media controls will work as normal. See visualizations below. Limited [browser support](https://caniuse.com/mdn-css_properties_object-view-box):    |
|
||||
| `zoom` | `1.0` | A value between `1.0` and `10.0` inclusive that defines how much additional "digital zoom" to apply to this camera by default. Unlike with `view_box` the user can easily "zoom back out". Often used in conjuction with `pan`. When zoomed in the [builtin browser media controls](../live.md?id=controls) will automatically be disabled (as otherwise they would be enlarged also). |
|
||||
|
||||
?> Layout operations are effectively applied in this order: `fit`, `position`, `view_box`, `zoom` then `pan`.
|
||||
@@ -157,24 +156,23 @@ See [media layout examples](../../examples.md?id=media-layout).
|
||||
|
||||
##### `fit`
|
||||
|
||||

|
||||

|
||||
|
||||
##### `position`: When media is shorter than dimensions height
|
||||
|
||||

|
||||

|
||||
|
||||
##### `position`: When media is thinner than dimensions width
|
||||
|
||||

|
||||

|
||||
|
||||
#### `view_box`: Precise media cropping
|
||||
|
||||

|
||||

|
||||
|
||||
#### `pan` and `zoom`: Predefined panning and zooming
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## `ptz`
|
||||
|
||||
@@ -184,15 +182,15 @@ Configure the PTZ actions taken for a camera (not to be confused with configurat
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
ptz:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
### Movement types
|
||||
|
||||
Generally PTZ cameras/integrations may support two kinds of PTZ actions:
|
||||
|
||||
* `relative`: Single relative steps, e.g. "Pan to the left one step".
|
||||
* `continuous`: Separate start and stop, e.g. "Start panning to the left", following by a later command "Stop panning".
|
||||
- `relative`: Single relative steps, e.g. "Pan to the left one step".
|
||||
- `continuous`: Separate start and stop, e.g. "Start panning to the left", following by a later command "Stop panning".
|
||||
|
||||
The card supports both, and with the help of the
|
||||
`r2c_delay_between_calls_seconds` and `c2r_delay_between_calls_seconds` can
|
||||
@@ -211,7 +209,7 @@ the integration currently offers.
|
||||
### Parameters
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions_left`, `actions_right`, `actions_up`, `actions_down`, `actions_zoom_in`, `actions_zoom_out`, `actions_home` | Set by camera [engine](./engine.md) of the selected camera | The [call-service](../actions/stock/README.md?id=call-service) action that will be called for each PTZ action for relative movements. |
|
||||
| `actions_left_start`, `actions_left_stop`, `actions_right_start`, `actions_right_stop`,`actions_up_start`, `actions_up_stop`,`actions_down_start`, `actions_down_stop`,`actions_zoom_in_start`, `actions_zoom_in_stop`,`actions_zoom_out_start`, `actions_zoom_out_stop` | Set by camera [engine](./engine.md) of the selected camera | The [call-service](../actions/stock/README.md?id=call-service) action that will be called for each PTZ action for continous movements. Both a `_start` and `_stop` variety must be provided for an action to be usable. |
|
||||
| `c2r_delay_between_calls_seconds` | `0.2` | When the camera is configured with continuous actions only (e.g. `left_start` and `left_stop`, but not `left`), if something requests a relative action (e.g. a manually configured [action](../actions/README.md)), then `start` will be called, followed by a delay of this number of seconds and finally `stop` will be called. Cameras / integrations that are slower to respond to continuous steps may need to increase this value to avoid the continuous motion being too small. Cameras / integrations that are rapid to respond may need to decrease this value to avoid the "relative step" being too large. |
|
||||
@@ -231,7 +229,7 @@ cameras:
|
||||
ptz:
|
||||
presets:
|
||||
[preset_name]:
|
||||
[action]:
|
||||
? [action]
|
||||
```
|
||||
|
||||
`[action]` is any [call-service](../actions/stock/README.md?id=call-service) action.
|
||||
@@ -247,14 +245,14 @@ camera is triggered.
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
triggers:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `entities` | | Whether to not to trigger the camera when the state of any Home Assistant entity becomes active (i.e. state becomes `on` or `open`). This works for Frigate or non-Frigate cameras.|
|
||||
| ----------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `entities` | | Whether to not to trigger the camera when the state of any Home Assistant entity becomes active (i.e. state becomes `on` or `open`). This works for Frigate or non-Frigate cameras. |
|
||||
| `events` | `[events, clips, snapshots]` | Whether to trigger the camera when `events` occur (whether or not media is available) or whenever updated `clips` or `snapshots` are detected. Detection support varies by camera [engine](engine.md). |
|
||||
| `motion` | `false` | Whether to not to trigger the camera by automatically detecting and using the motion `binary_sensor` for this camera. This autodetection only works for Frigate cameras, and only when the motion `binary_sensor` entity has been enabled in Home Assistant.|
|
||||
| `motion` | `false` | Whether to not to trigger the camera by automatically detecting and using the motion `binary_sensor` for this camera. This autodetection only works for Frigate cameras, and only when the motion `binary_sensor` entity has been enabled in Home Assistant. |
|
||||
| `occupancy` | `false` | Whether to not to trigger the camera by automatically detecting and using the occupancy `binary_sensor` for this camera and its configured zones and labels. This autodetection only works for Frigate cameras, and only when the occupancy `binary_sensor` entity has been enabled in Home Assistant. If this camera has configured zones, only occupancy sensors for those zones are used -- if the overall _camera_ occupancy sensor is also required, it can be manually added to `entities`. If this camera has configured labels, only occupancy sensors for those labels are used. |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
* [Getting Started](../../README.md)
|
||||
* [Configuration](../README.md)
|
||||
* [`actions`](../actions/README.md)
|
||||
* [`automations`](../automations.md)
|
||||
* [`cameras`](README.md)
|
||||
* [`live_provider`](live-provider.md)
|
||||
* [`engine`](engine.md)
|
||||
* [`conditions`](../conditions.md)
|
||||
* [`dimensions`](../dimensions.md)
|
||||
* [`elements`](../elements.md)
|
||||
* [`image`](../image.md)
|
||||
* [`live`](../live.md)
|
||||
* [`media_gallery`](../media-gallery.md)
|
||||
* [`media_viewer`](../media-viewer.md)
|
||||
* [`menu`](../menu.md)
|
||||
* [`overrides`](../overrides.md)
|
||||
* [`performance`](../performance.md)
|
||||
* [`profiles`](../profiles.md)
|
||||
* [`timeline`](../timeline.md)
|
||||
* [`view`](../view.md)
|
||||
* [Screenshots](../../screenshots.md)
|
||||
* [Troubleshooting](../../troubleshooting.md)
|
||||
* [Usage](../../usage/README.md)
|
||||
- [Getting Started](../../README.md)
|
||||
- [Configuration](../README.md)
|
||||
- [`actions`](../actions/README.md)
|
||||
- [`automations`](../automations.md)
|
||||
- [`cameras`](README.md)
|
||||
- [`live_provider`](live-provider.md)
|
||||
- [`engine`](engine.md)
|
||||
- [`conditions`](../conditions.md)
|
||||
- [`dimensions`](../dimensions.md)
|
||||
- [`elements`](../elements.md)
|
||||
- [`image`](../image.md)
|
||||
- [`live`](../live.md)
|
||||
- [`media_gallery`](../media-gallery.md)
|
||||
- [`media_viewer`](../media-viewer.md)
|
||||
- [`menu`](../menu.md)
|
||||
- [`overrides`](../overrides.md)
|
||||
- [`performance`](../performance.md)
|
||||
- [`profiles`](../profiles.md)
|
||||
- [`timeline`](../timeline.md)
|
||||
- [`view`](../view.md)
|
||||
- [Screenshots](../../screenshots.md)
|
||||
- [Troubleshooting](../../troubleshooting.md)
|
||||
- [Usage](../../usage/README.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../developing.md)
|
||||
- [Developing](../../developing.md)
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
A "Camera Engine" defines what "type" of camera is being configured (e.g. `frigate`), each engine offers different capabilities:
|
||||
|
||||
|Engine|Live|Supports clips|Supports Snapshots|Supports Recordings|Supports Timeline|Supports PTZ out of the box|Supports manually configured PTZ|Favorite events|Favorite recordings|Detect new events|Detect new snapshots|Detect new clips|
|
||||
| - | - | - | - | - | - | - | - | - | - | - | - | - |
|
||||
|`frigate`| :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
|`generic`| :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
|
||||
|`motioneye`| :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
|
||||
| Engine | Live | Supports clips | Supports Snapshots | Supports Recordings | Supports Timeline | Supports PTZ out of the box | Supports manually configured PTZ | Favorite events | Favorite recordings | Detect new events | Detect new snapshots | Detect new clips |
|
||||
| ----------- | ------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | --------------------------- | -------------------------------- | ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ |
|
||||
| `frigate` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| `generic` | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
|
||||
| `motioneye` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
|
||||
|
||||
#### Live providers supported per Engine
|
||||
|
||||
|Engine / Live Provider|`ha`|`image`|`jsmpeg`|`go2rtc`|`webrtc-card`|
|
||||
| - | - | - | - | - | - |
|
||||
|`frigate`| :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
|`generic`| :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: |
|
||||
|`motioneye`| :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: |
|
||||
| Engine / Live Provider | `ha` | `image` | `jsmpeg` | `go2rtc` | `webrtc-card` |
|
||||
| ---------------------- | ------------------ | ------------------ | ------------------------ | ------------------ | ------------------------ |
|
||||
| `frigate` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||
| `generic` | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: |
|
||||
| `motioneye` | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: |
|
||||
|
||||
See [Live Provider Configuration](live-provider.md) for more details on live providers.
|
||||
|
||||
@@ -28,16 +28,16 @@ The `frigate` block configures options for a Frigate camera.
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
frigate:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `camera_name` | Autodetected from `camera_entity` if that is specified. | The Frigate camera name to use when communicating with the Frigate server, e.g. for viewing clips/snapshots or the JSMPEG live view.|
|
||||
| `client_id` | `frigate` | The Frigate client id to use. If this Home Assistant server has multiple Frigate server backends configured, this selects which server should be used. It should be set to the MQTT client id configured for this server, see [Frigate Integration Multiple Instance Support](https://docs.frigate.video/integrations/home-assistant/#multiple-instance-support).|
|
||||
| `labels` | | A list of Frigate labels used to filter events (clips & snapshots), e.g. [`person`, `car`].|
|
||||
| ------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `camera_name` | Autodetected from `camera_entity` if that is specified. | The Frigate camera name to use when communicating with the Frigate server, e.g. for viewing clips/snapshots or the JSMPEG live view. |
|
||||
| `client_id` | `frigate` | The Frigate client id to use. If this Home Assistant server has multiple Frigate server backends configured, this selects which server should be used. It should be set to the MQTT client id configured for this server, see [Frigate Integration Multiple Instance Support](https://docs.frigate.video/integrations/home-assistant/#multiple-instance-support). |
|
||||
| `labels` | | A list of Frigate labels used to filter events (clips & snapshots), e.g. [`person`, `car`]. |
|
||||
| `url` | | The URL of the frigate server. If set, this value will be (exclusively) used for a `Camera UI` menu button. All other communication with Frigate goes via Home Assistant. |
|
||||
| `zones` | | A list of Frigates zones used to filter events (clips & snapshots), e.g. [`front_door`, `front_steps`].|
|
||||
| `zones` | | A list of Frigates zones used to filter events (clips & snapshots), e.g. [`front_door`, `front_steps`]. |
|
||||
|
||||
## `motioneye`
|
||||
|
||||
@@ -47,11 +47,11 @@ The `motioneye` block configures options for a MotionEye camera.
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
motioneye:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| -------- | ------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `images` | | Configure how MotionEye images are consumed. See below. |
|
||||
| `movies` | | Configure how MotionEye movies are consumed. See below. |
|
||||
| `url` | | The URL of the MotionEye server. If set, this value will be (exclusively) used for a `Camera UI` menu button. |
|
||||
@@ -65,7 +65,7 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
motioneye:
|
||||
images:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
```yaml
|
||||
@@ -73,10 +73,10 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
motioneye:
|
||||
movies:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `directory_pattern` | `%Y-%m-%d` | The directory that motionEye is configured to store media into. May contain multiple sub-directories separated by `/`. Path must encode the date of the media using MotionEye patterns such as `%Y`, `%m`, `%d`, `%H`, `%M`, `%S` (at least one pattern is required). Consult MotionEye help text for information on these substitutions. |
|
||||
| `file_pattern` | `%H-%M-%S` | Within a directory (as matched by `directory_pattern`) the media items must exist and match this pattern. `file_pattern` must encode the time of the media using MotionEye patterns such as `%Y`, `%m`, `%d`, `%H`, `%M`, `%S` (at least one pattern is required). Consult MotionEye help text for information on these substitutions. |
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
The `live_provider` parameter determines what provides the live stream for a camera. Each provider offers different capabilities:
|
||||
|
||||
|Live Provider|Latency|Frame Rate|Loading Time|Installation|Description|
|
||||
| -- | -- | -- | -- | -- | -- |
|
||||
|`go2rtc`|Best|High|Better|Builtin|Uses [go2rtc](https://github.com/AlexxIT/go2rtc) to stream live feeds. This is supported by Frigate >= `0.12`. |
|
||||
|`ha` (default HA configuration)|Poor|High|Better|Builtin|Use the built-in Home Assistant camera stream. The camera doesn't even need to be a Frigate camera! |
|
||||
|`ha` (Native WebRTC)|Best|High|Better|Builtin|Use the built-in Home Assistant camera streams -- can be configured to use [native WebRTC](https://www.home-assistant.io/integrations/rtsp_to_webrtc/) offering a very low-latency feed direct to your browser. |
|
||||
|`ha` (when configured with LL-HLS)|Better|High|Better|Builtin|Use the built-in Home Assistant camera streams -- can be configured to use an [LL-HLS](https://www.home-assistant.io/integrations/stream/#ll-hls) feed for lower latency. |
|
||||
|`image`|Poor|Poor|Best|Builtin|Use refreshing snapshots of the built-in Home Assistant camera streams.|
|
||||
|`jsmpeg`|Better|Low|Poor|Builtin|Use a the JSMPEG stream. |
|
||||
|`webrtc-card`|Best|High|Better|Separate installation required|Embed's [AlexxIT's WebRTC Card](https://github.com/AlexxIT/WebRTC) to stream live feed, requires manual extra setup. See below. Not to be confused with native Home Assistant WebRTC (use the `ha` provider). |
|
||||
| Live Provider | Latency | Frame Rate | Loading Time | Installation | Description |
|
||||
| ---------------------------------- | ------- | ---------- | ------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `go2rtc` | Best | High | Better | Builtin | Uses [go2rtc](https://github.com/AlexxIT/go2rtc) to stream live feeds. This is supported by Frigate >= `0.12`. |
|
||||
| `ha` (default HA configuration) | Poor | High | Better | Builtin | Use the built-in Home Assistant camera stream. The camera doesn't even need to be a Frigate camera! |
|
||||
| `ha` (Native WebRTC) | Best | High | Better | Builtin | Use the built-in Home Assistant camera streams -- can be configured to use [native WebRTC](https://www.home-assistant.io/integrations/rtsp_to_webrtc/) offering a very low-latency feed direct to your browser. |
|
||||
| `ha` (when configured with LL-HLS) | Better | High | Better | Builtin | Use the built-in Home Assistant camera streams -- can be configured to use an [LL-HLS](https://www.home-assistant.io/integrations/stream/#ll-hls) feed for lower latency. |
|
||||
| `image` | Poor | Poor | Best | Builtin | Use refreshing snapshots of the built-in Home Assistant camera streams. |
|
||||
| `jsmpeg` | Better | Low | Poor | Builtin | Use a the JSMPEG stream. |
|
||||
| `webrtc-card` | Best | High | Better | Separate installation required | Embed's [AlexxIT's WebRTC Card](https://github.com/AlexxIT/WebRTC) to stream live feed, requires manual extra setup. See below. Not to be confused with native Home Assistant WebRTC (use the `ha` provider). |
|
||||
|
||||
## `go2rtc`
|
||||
|
||||
@@ -23,11 +23,11 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
live_provider: go2rtc
|
||||
go2rtc:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `modes` | `[webrtc, mse, mp4, mjpeg]` | An ordered list of `go2rtc` modes to use. Valid values are `webrtc`, `mse`, `mp4` or `mjpeg` values. |
|
||||
| `stream` | Determined by camera engine (e.g. `frigate` camera name). | A valid `go2rtc` stream name. |
|
||||
| `url` | Determined by camera engine (e.g. the `frigate` engine will automatically generate a URL for the go2rtc backend that runs in the Frigate container). | The root `go2rtc` URL the card should stream the video from. This is only needed for non-Frigate usecases, or advanced Frigate usecases. Example: `http://my-custom-go2rtc:1984` |
|
||||
@@ -41,11 +41,11 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
live_provider: image
|
||||
image:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `refresh_seconds` | 1 | The image will be refreshed at least every `refresh_seconds`. `0` implies no refreshing. |
|
||||
| `url` | | **Advanced**: A static image URL to be fetched in lieu of the Home Assistant image for the given camera. This may be useful for advanced configurations where the camera image is being provided by some non-Home Assistant system. This will also set the temporary loading image used when `show_image_during_load` is set to true under the `live` configuration. |
|
||||
|
||||
@@ -58,12 +58,12 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
live_provider: jsmpeg
|
||||
jsmpeg:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `options` | | **Advanced users only**: Control the underlying [JSMPEG library options](https://github.com/phoboslab/jsmpeg#usage). Supports setting these JSMPEG options `{audio, video, pauseWhenHidden, disableGl, disableWebAssembly, preserveDrawingBuffer, progressive, throttled, chunkSize, maxAudioLag, videoBufferSize, audioBufferSize}`. This is not necessary for the vast majority of users: only set these flags if you know what you're doing, as you may entirely break video rendering in the card.|
|
||||
| --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `options` | | **Advanced users only**: Control the underlying [JSMPEG library options](https://github.com/phoboslab/jsmpeg#usage). Supports setting these JSMPEG options `{audio, video, pauseWhenHidden, disableGl, disableWebAssembly, preserveDrawingBuffer, progressive, throttled, chunkSize, maxAudioLag, videoBufferSize, audioBufferSize}`. This is not necessary for the vast majority of users: only set these flags if you know what you're doing, as you may entirely break video rendering in the card. |
|
||||
|
||||
## `webrtc_card`
|
||||
|
||||
@@ -76,11 +76,11 @@ cameras:
|
||||
- camera_entity: camera.office
|
||||
live_provider: webrtc-card
|
||||
webrtc_card:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `entity` | | The RTSP camera entity to pass to the WebRTC Card for this camera. |
|
||||
| `url` | Depends on the camera engine (e.g. Frigate cameras will automatically use the camera name since this is the [recommended setup](https://deploy-preview-4055--frigate-docs.netlify.app/guides/configuring_go2rtc/)). | The RTSP url to pass to the WebRTC Card, e.g. `rtsp://USERNAME:PASSWORD@CAMERA:554/RTSP_PATH` |
|
||||
| `*`| | Any options specified in the `webrtc_card:` YAML dictionary are silently passed through to the AlexxIT's WebRTC Card. See [WebRTC Configuration](https://github.com/AlexxIT/WebRTC#configuration) for full details this external card provides, e.g. `ui: true` will enable the WebRTC Card UI. |
|
||||
| `*` | | Any options specified in the `webrtc_card:` YAML dictionary are silently passed through to the AlexxIT's WebRTC Card. See [WebRTC Configuration](https://github.com/AlexxIT/WebRTC#configuration) for full details this external card provides, e.g. `ui: true` will enable the WebRTC Card UI. |
|
||||
|
||||
@@ -19,11 +19,11 @@ certain configurations (in `overrides`) or to display "picture elements" (in
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: camera
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ----------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `condition` | Must be `camera`. |
|
||||
| `cameras` | A list of camera IDs in which this condition is satisfied. See the camera [id](cameras/README.md) parameter. |
|
||||
|
||||
@@ -32,11 +32,11 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: expand
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `expand`. |
|
||||
| `expand` | If `true` the condition is satisfied if the card is in expanded mode (in a dialog/popup). If `false` the condition is satisfied if the card is **NOT** in expanded mode (in a dialog/popup). |
|
||||
|
||||
@@ -45,11 +45,11 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: fullscreen
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `fullscreen`. |
|
||||
| `fullscreen` | If `true` the condition is satisfied if the card is in fullscreen mode. If `false` the condition is satisfied if the card is **NOT** in fullscreen mode. |
|
||||
|
||||
@@ -58,11 +58,11 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: interaction
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `interaction`. |
|
||||
| `interaction` | If `true` the condition is satisfied if the card has had human interaction within `view.interaction_seconds` elapsed seconds. If `false` the condition is satisfied if the card has **NOT** had human interaction in that time. |
|
||||
|
||||
@@ -71,11 +71,11 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: key
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| - | - | - |
|
||||
| ----------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | - | Must be `key`. |
|
||||
| `alt` | `false` | An optional value to match whether the `alt` key is being held. |
|
||||
| `ctrl` | `false` | An optional value to match whether the `ctrl` key is being held. |
|
||||
@@ -89,11 +89,11 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: media_loaded
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `media_loaded`. |
|
||||
| `media_loaded` | If `true` the condition is satisfied if there is media load**ED** (not load**ING**) in the card (e.g. a clip, snapshot or live view). This may be used to hide controls during media loading or when a message (not media) is being displayed. |
|
||||
|
||||
@@ -102,11 +102,11 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: microphone
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ----------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `microphone`. |
|
||||
| `connected` | Optional: If `true` or `false` the condition is satisfied if the microphone is connected or disconnected respectively. |
|
||||
| `muted` | Optional: If `true` or `false` the condition is satisfied if the microphone is muted or unmuted respectively. |
|
||||
@@ -116,7 +116,7 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
This stock Home Assistant condition works out of the box. See [Home Assistant conditions documentation](https://www.home-assistant.io/dashboards/conditional/#numeric-state).
|
||||
@@ -126,11 +126,11 @@ This stock Home Assistant condition works out of the box. See [Home Assistant co
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: screen
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `condition` | Must be `screen`. |
|
||||
| `media_query` | Any valid [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) string. Media queries must start and end with parentheses. This may be used to alter card configuration based on device/media properties (e.g. viewport width, orientation). Please note that `width` and `height` refer to the entire viewport not just the card. |
|
||||
|
||||
@@ -141,7 +141,7 @@ See the [screen conditions examples](../examples.md?id=screen-conditions).
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: state
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
This stock Home Assistant condition works out of the box. See [Home Assistant conditions documentation](https://www.home-assistant.io/dashboards/conditional/#state).
|
||||
@@ -151,11 +151,11 @@ This stock Home Assistant condition works out of the box. See [Home Assistant co
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: triggered
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ----------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `triggered`. |
|
||||
| `triggered` | A list of camera IDs which, if [triggered](cameras/README.md?id=triggers), satisfy the condition. |
|
||||
|
||||
@@ -164,7 +164,7 @@ conditions:
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: user
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
This stock Home Assistant condition works out of the box. See [Home Assistant conditions documentation](https://www.home-assistant.io/dashboards/conditional/#user).
|
||||
@@ -174,11 +174,11 @@ This stock Home Assistant condition works out of the box. See [Home Assistant co
|
||||
```yaml
|
||||
conditions:
|
||||
- condition: view
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ----------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `condition` | Must be `view`. |
|
||||
| `views` | A list of [views](view.md?id=supported-views) in which this condition is satified (e.g. `clips`). |
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ the amount of content shown.
|
||||
|
||||
```yaml
|
||||
dimensions:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `aspect_ratio_mode` | `dynamic` | The aspect ratio mode to use. Acceptable values: `dynamic`, `static`, `unconstrained`. See below. |
|
||||
| `aspect_ratio` | `16:9` | The aspect ratio to use. Acceptable values: `[W]:[H]` or `[W]/[H]`. See below. |
|
||||
| `max_height` | `100vh` | The maximum allowable height for the card. Specified in [CSS units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units). Generally users should not need to change this setting unless they have set an `unconstrained` aspect ratio. |
|
||||
@@ -23,16 +23,16 @@ dimensions:
|
||||
### `aspect_ratio_mode`
|
||||
|
||||
| Option | Description |
|
||||
| - | - |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `dynamic` | The aspect-ratio of the entire card will match the aspect-ratio of the last selected media item. |
|
||||
| `static` | A fixed aspect-ratio (as defined by `aspect_ratio`) will be applied to the card. |
|
||||
| `unconstrained` | No aspect ratio is enforced in any view, the card will expand with the content. This may be especially useful for a panel-mode dashboard, or in views that have no intrinsic aspect-ratio (e.g. the media gallery). |
|
||||
|
||||
### `aspect_ratio`
|
||||
|
||||
* `16 / 9` or `16:9`: Default widescreen ratio.
|
||||
* `4 / 3` or `4:3`: Default fullscreen ratio.
|
||||
* `[W]/[H]` or `[W]:[H]`: Any arbitrary aspect-ratio.
|
||||
- `16 / 9` or `16:9`: Default widescreen ratio.
|
||||
- `4 / 3` or `4:3`: Default fullscreen ratio.
|
||||
- `[W]/[H]` or `[W]:[H]`: Any arbitrary aspect-ratio.
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ This element will let you show its sub-elements based on entity states. See [Hom
|
||||
```yaml
|
||||
elements:
|
||||
- type: conditional
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `custom`
|
||||
@@ -31,7 +31,7 @@ Custom elements provided by a card. See [Home Assistant elements documentation](
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `custom:frigate-card-menu-icon`
|
||||
@@ -41,7 +41,7 @@ Add an arbitrary icon to the Frigate Card menu. Configuration is ~identical to t
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-icon
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `custom:frigate-card-menu-state-icon`
|
||||
@@ -51,7 +51,7 @@ Add a state icon to the Frigate Card menu that represents the state of a Home As
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-icon
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `custom:frigate-card-menu-submenu`
|
||||
@@ -61,20 +61,20 @@ Add a configurable submenu dropdown.
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-submenu
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
Parameters for this element are identical to the parameters of the [stock Home Assistant Icon Element](https://www.home-assistant.io/lovelace/picture-elements/#icon-element) with the exception of these parameters which differ:
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------- | ------------------------------------------- |
|
||||
| `type` | Must be `custom:frigate-card-menu-submenu`. |
|
||||
| `items` | A list of menu items, as described below. |
|
||||
|
||||
### Submenu items
|
||||
|
||||
| Parameter | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------------------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `enabled` | `true` | Whether or not to show this item as enabled / selectable. |
|
||||
| `entity` | | An optional Home Assistant entity from which title, icon and style can be automatically computed. |
|
||||
| `icon` | | An optional item icon to display, e.g. `mdi:car` |
|
||||
@@ -86,18 +86,18 @@ Parameters for this element are identical to the parameters of the [stock Home A
|
||||
|
||||
## `custom:frigate-card-menu-submenu-select`
|
||||
|
||||
Add a submenu based on a `select` or `input_select`. This element allows you to convert a [Home Assistant Select Entity](https://www.home-assistant.io/integrations/select/) or [Home Assistant Input Select Entity](https://www.home-assistant.io/integrations/input_select/) (an entity either starting with `select` or `input_select`) into an overridable submenu. This *could* be done by hand using a regular submenu (above) -- this element is a convenience.
|
||||
Add a submenu based on a `select` or `input_select`. This element allows you to convert a [Home Assistant Select Entity](https://www.home-assistant.io/integrations/select/) or [Home Assistant Input Select Entity](https://www.home-assistant.io/integrations/input_select/) (an entity either starting with `select` or `input_select`) into an overridable submenu. This _could_ be done by hand using a regular submenu (above) -- this element is a convenience.
|
||||
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-submenu-select
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
Parameters for the `custom:frigate-card-menu-submenu-select` element are identical to the parameters of the [stock Home Assistant State Icon Element](https://www.home-assistant.io/dashboards/picture-elements/#state-icon) with the exception of these parameters which differ:
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | Must be `custom:frigate-card-menu-submenu-select`. |
|
||||
| `options` | An optional dictionary of overrides keyed by the option name that the given select entity supports. These options can be used to set or override submenu item parameters on a per-option basis. The format is as described in [Submenu Items](elements.md?id=submenu-items) above. |
|
||||
|
||||
@@ -110,13 +110,13 @@ Restrict a set of elements to only render when the card is matches a set of [con
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-conditional
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
Parameters for the `custom:frigate-card-conditional` element:
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| ------------ | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `type` | Must be `custom:frigate-card-conditional`. |
|
||||
| `conditions` | A list of [conditions](conditions.md) that must evaluate to true in order for the elements to be rendered. |
|
||||
| `elements` | The elements to render. Can be any supported element. |
|
||||
@@ -130,7 +130,7 @@ This element creates a static icon that is not linked to the state of an entity.
|
||||
```yaml
|
||||
elements:
|
||||
- type: icon
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `image`
|
||||
@@ -140,7 +140,7 @@ This creates an image element that overlays the background image. See [Home Assi
|
||||
```yaml
|
||||
elements:
|
||||
- type: image
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `service-button`
|
||||
@@ -150,7 +150,7 @@ This entity creates a button (with arbitrary text) that can be used to call a se
|
||||
```yaml
|
||||
elements:
|
||||
- type: service-button
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `state-badge`
|
||||
@@ -160,7 +160,7 @@ This element creates a badge representing the state of an entity. See [Home Assi
|
||||
```yaml
|
||||
elements:
|
||||
- type: state-badge
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `state-icon`
|
||||
@@ -170,7 +170,7 @@ This element represents an entity state using an icon. See [Home Assistant eleme
|
||||
```yaml
|
||||
elements:
|
||||
- type: state-icon
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## `state-label`
|
||||
@@ -180,7 +180,7 @@ This element represents an entity’s state via text. See [Home Assistant elemen
|
||||
```yaml
|
||||
elements:
|
||||
- type: state-label
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
## Fully expanded reference
|
||||
@@ -200,7 +200,7 @@ elements:
|
||||
style:
|
||||
left: 100px
|
||||
top: 50px
|
||||
title: "Temperature"
|
||||
title: 'Temperature'
|
||||
- type: state-icon
|
||||
entity: light.office_main_lights
|
||||
icon: mdi:lamp
|
||||
@@ -243,11 +243,11 @@ elements:
|
||||
entity: light.office_main_lights
|
||||
title: Image
|
||||
state_image:
|
||||
on: "https://picsum.photos/id/1003/1181/1772"
|
||||
off: "https://picsum.photos/id/102/4320/3240"
|
||||
on: 'https://picsum.photos/id/1003/1181/1772'
|
||||
off: 'https://picsum.photos/id/102/4320/3240'
|
||||
state_filter:
|
||||
"on": brightness(110%) saturate(1.2)
|
||||
"off": brightness(50%) hue-rotate(45deg)
|
||||
'on': brightness(110%) saturate(1.2)
|
||||
'off': brightness(50%) hue-rotate(45deg)
|
||||
style:
|
||||
left: 100px
|
||||
top: 350px
|
||||
|
||||
@@ -4,12 +4,12 @@ Configure the `image` view.
|
||||
|
||||
```yaml
|
||||
image:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions` | | [Actions](actions/README.md) to use for the `image` view.|
|
||||
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions` | | [Actions](actions/README.md) to use for the `image` view. |
|
||||
| `mode` | `url` | Mode of the the `image` view. Value must be one of `url` (to fetch an arbitrary image URL), `camera` (to show a still of the currently selected camera using either `camera_entity` or `webrtc_card.entity` in that order of precedence), or `screensaver` (to show an [embedded stock Frigate card logo](https://github.com/dermotduffy/frigate-hass-card/blob/main/src/images/frigate-bird-in-sky.jpg)). In either `url` or `camera` mode, the `screensaver` content is used as a fallback if a URL is not specified or cannot be derived. |
|
||||
| `refresh_seconds` | 0 | The image will be refreshed at least every `refresh_seconds` (it may refresh more frequently, e.g. whenever Home Assistant updates its camera security token). `0` implies no refreshing. |
|
||||
| `url` | | A static image URL to be used when the `mode` is set to `url` or when a temporary image is required (e.g. may appear momentarily prior to load of a camera snapshot in the `camera` mode). Note that a `_t=[timestsamp]` query parameter will be automatically added to all URLs such that the image will not be cached by the browser. |
|
||||
|
||||
+40
-40
@@ -2,23 +2,23 @@
|
||||
|
||||
Configures the behavior of the `live` view.
|
||||
|
||||
```yaml
|
||||
```yaml
|
||||
live:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------------ | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions` | | [Actions](actions/README.md) to use for the `live` view. |
|
||||
| `auto_mute` | `[unselected, hidden, microphone]` | A list of conditions in which live camera feeds are muted. `unselected` will automatically mute when a camera is unselected in the carousel, `hidden` will automatically mute when the browser/tab becomes hidden or `microphone` will automatically mute after the microphone is muted as long as the camera stays selected (see the `live.microphone.mute_after_microphone_mute_seconds` to control how long after). Use an empty list (`[]`) to never automatically mute. Note that if `auto_play` is enabled, the stream may mute itself automatically in order to honor the `auto_play` setting, as some browsers will not auto play media that is unmuted -- that is to say, where necessary, the `auto_play` parameter will take priority over the `auto_mute` parameter.|
|
||||
| `auto_pause` | `[]` | A list of conditions in which live camera feeds are automatically paused. `unselected` will automatically pause when a camera is unselected in the carousel and `hidden` will automatically pause when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically pause. **Caution**: Some live providers (e.g. `jsmpeg`) may not offer human-accessible means to resume play if it is paused, unless the `auto_play` option is used.|
|
||||
| `auto_play` | `[selected, visible]` | A list of conditions in which live camera feeds are automatically played.`selected` will automatically play when a camera is selected in the carousel and `visible` will automatically play when the browser/tab becomes visible. Use an empty list (`[]`) to never automatically play. Some live providers (e.g. `webrtc-card`, `jsmpeg`) do not support the prevention of automatic play on initial load, but should still respect the value of this flag on play-after-pause.|
|
||||
| `auto_unmute` | `[microphone]` | A list of conditions in which live camera feeds are unmuted. `selected` will automatically unmute when a camera is unselected in the carousel, `visible` will automatically unmute when the browser/tab becomes visible or `microphone` will automatically unmute after the microphone is unmuted. Use an empty list (`[]`) to never automatically unmute.|
|
||||
| `auto_mute` | `[unselected, hidden, microphone]` | A list of conditions in which live camera feeds are muted. `unselected` will automatically mute when a camera is unselected in the carousel, `hidden` will automatically mute when the browser/tab becomes hidden or `microphone` will automatically mute after the microphone is muted as long as the camera stays selected (see the `live.microphone.mute_after_microphone_mute_seconds` to control how long after). Use an empty list (`[]`) to never automatically mute. Note that if `auto_play` is enabled, the stream may mute itself automatically in order to honor the `auto_play` setting, as some browsers will not auto play media that is unmuted -- that is to say, where necessary, the `auto_play` parameter will take priority over the `auto_mute` parameter. |
|
||||
| `auto_pause` | `[]` | A list of conditions in which live camera feeds are automatically paused. `unselected` will automatically pause when a camera is unselected in the carousel and `hidden` will automatically pause when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically pause. **Caution**: Some live providers (e.g. `jsmpeg`) may not offer human-accessible means to resume play if it is paused, unless the `auto_play` option is used. |
|
||||
| `auto_play` | `[selected, visible]` | A list of conditions in which live camera feeds are automatically played.`selected` will automatically play when a camera is selected in the carousel and `visible` will automatically play when the browser/tab becomes visible. Use an empty list (`[]`) to never automatically play. Some live providers (e.g. `webrtc-card`, `jsmpeg`) do not support the prevention of automatic play on initial load, but should still respect the value of this flag on play-after-pause. |
|
||||
| `auto_unmute` | `[microphone]` | A list of conditions in which live camera feeds are unmuted. `selected` will automatically unmute when a camera is unselected in the carousel, `visible` will automatically unmute when the browser/tab becomes visible or `microphone` will automatically unmute after the microphone is unmuted. Use an empty list (`[]`) to never automatically unmute. |
|
||||
| `controls` | | Configuration for the `live` view controls. See below. |
|
||||
| `display` | | Controls whether to show a single or grid `live` view. See below. |
|
||||
| `draggable` | `true` | Whether or not the live carousel can be dragged left or right, via touch/swipe and mouse dragging. |
|
||||
| `lazy_load` | `true` | Whether or not to lazily load cameras in the camera carousel. Setting this will `false` will cause all cameras to load simultaneously when the `live` carousel is opened (or cause all cameras to load continually if both `lazy_load` and `preload` are `true`). This will result in a smoother carousel experience at a cost of (potentially) a substantial amount of continually streamed data. |
|
||||
| `lazy_unload` | `[]` | A list of conditions in which live camera feeds are unloaded. `unselected` will lazy-unload a camera when it is unselected in the carousel and `hidden` will lazy-unload all cameras when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically unload. This will cause a reloading delay on revisiting that camera in the carousel but will save the streaming network resources that are otherwise consumed. This option has no effect if `lazy_load` is false. Some live providers (e.g. `webrtc-card`) implement their own lazy unloading independently which may occur regardless of the value of this setting.|
|
||||
| `lazy_unload` | `[]` | A list of conditions in which live camera feeds are unloaded. `unselected` will lazy-unload a camera when it is unselected in the carousel and `hidden` will lazy-unload all cameras when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically unload. This will cause a reloading delay on revisiting that camera in the carousel but will save the streaming network resources that are otherwise consumed. This option has no effect if `lazy_load` is false. Some live providers (e.g. `webrtc-card`) implement their own lazy unloading independently which may occur regardless of the value of this setting. |
|
||||
| `microphone` | | See below. |
|
||||
| `preload` | `false` | Whether or not to preload the live view. Preloading causes the live view to render in the background regardless of what view is actually shown, so it's instantly available when requested. This consumes additional network/CPU resources continually. |
|
||||
| `show_image_during_load` | `true` | If `true`, during the initial stream load, the `image` live provider will be shown instead of the loading video stream. This still image will auto-refresh and is replaced with the live stream once loaded. |
|
||||
@@ -32,11 +32,11 @@ Configure the controls for the `live` view.
|
||||
```yaml
|
||||
live:
|
||||
controls:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------- | ------- | -------------------------------------------------------------------------------------- |
|
||||
| `builtin` | `true` | Whether to show the built in (browser) video controls on live video. |
|
||||
| `next_previous` | | Configures how the "Next & Previous" controls are shown on the `live` view. See below. |
|
||||
| `thumbnails` | | Configures how thumbnails are shown on the `live` view. See below. |
|
||||
@@ -51,11 +51,11 @@ Configures how the "Next & Previous" controls are shown on the live view.
|
||||
live:
|
||||
controls:
|
||||
next_previous:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `size` | `48` | The size of the next/previous controls in pixels. Must be >= `20`. |
|
||||
| `style` | `chevrons` | When viewing live cameras, what kind of controls to show to move to the previous/next camera. Acceptable values: `chevrons`, `icons`, `none` . |
|
||||
|
||||
@@ -67,11 +67,11 @@ Configures the PTZ (Pan Tilt Zoom) controls.
|
||||
live:
|
||||
controls:
|
||||
ptz:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `hide_home` | `false` | When `true` the Home button of the control is hidden |
|
||||
| `hide_pan_tilt` | `false` | When `true` the Pan & Tilt buttons of the control is hidden |
|
||||
| `hide_zoom` | `false` | When `true` the Zoom button of the control is hidden |
|
||||
@@ -90,18 +90,18 @@ Configures how thumbnails are shown on the live view.
|
||||
live:
|
||||
controls:
|
||||
thumbnails:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `events_media_type` | `all` | Whether to show `clips`, `snapshots` or `all` in the thumbnail carousel in the `live` view. This setting is only relevant when the `media_type` parameter is set to `events`.|
|
||||
| `media_type` | `events` | Whether to load `events` or `recordings` media.|
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`).|
|
||||
| `show_details` | `false` | Whether to show event details (e.g. duration, start time, object detected, etc) alongside the thumbnail.|
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail.|
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail.|
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail.|
|
||||
| ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `events_media_type` | `all` | Whether to show `clips`, `snapshots` or `all` in the thumbnail carousel in the `live` view. This setting is only relevant when the `media_type` parameter is set to `events`. |
|
||||
| `media_type` | `events` | Whether to load `events` or `recordings` media. |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`). |
|
||||
| `show_details` | `false` | Whether to show event details (e.g. duration, start time, object detected, etc) alongside the thumbnail. |
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `175`. |
|
||||
|
||||
### `timeline`
|
||||
@@ -112,16 +112,16 @@ Configures how the mini-timeline is shown on the live view.
|
||||
live:
|
||||
controls:
|
||||
timeline:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `clustering_threshold` | `3` | The minimum number of overlapping events to allow prior to clustering/grouping them. Higher numbers cause clustering to happen less frequently. Depending on the timescale/zoom of the timeline, the underlying timeline library may still allow overlaps for low values of this parameter -- for a fully "flat" timeline use the `ribbon` style. `0` disables clustering entirely. Only used in the `stack` style of timeline. |
|
||||
| `events_media_type` | `all` | Whether to show only events with `clips`, events with `snapshots` or `all` events. When `all` is used, `clips` are favored for events that have both a clip and a snapshot.|
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`).|
|
||||
| `pan_mode` | `pan`| See [timeline pan mode](timeline-pan-mode.md). |
|
||||
| `show_recordings` | `true` | Whether to show recordings on the timeline (specifically: which hours have any recorded content).|
|
||||
| `events_media_type` | `all` | Whether to show only events with `clips`, events with `snapshots` or `all` events. When `all` is used, `clips` are favored for events that have both a clip and a snapshot. |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`). |
|
||||
| `pan_mode` | `pan` | See [timeline pan mode](timeline-pan-mode.md). |
|
||||
| `show_recordings` | `true` | Whether to show recordings on the timeline (specifically: which hours have any recorded content). |
|
||||
| `style` | `ribbon` | Whether the timeline should show events as a single flat `ribbon` or a `stack` of events that are clustered using the `clustering_threshold`. |
|
||||
| `window_seconds` | `3600` | The length of the default timeline in seconds. By default, 1 hour (`3600` seconds) is shown in the timeline. |
|
||||
|
||||
@@ -135,12 +135,12 @@ Configures how the camera title is shown on the live view.
|
||||
live:
|
||||
controls:
|
||||
title:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `duration_seconds` | `2` | The number of seconds to display the title popup. `0` implies forever.|
|
||||
| ------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `duration_seconds` | `2` | The number of seconds to display the title popup. `0` implies forever. |
|
||||
| `mode` | `popup-bottom-right` | How to display the live camera title. Acceptable values: `none`, `popup-top-left`, `popup-top-right`, `popup-bottom-left`, `popup-bottom-right` . |
|
||||
|
||||
## `display`
|
||||
@@ -150,15 +150,15 @@ Controls whether to show a single or grid `live` view.
|
||||
```yaml
|
||||
live:
|
||||
display:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `grid_columns` | | If specified the grid will always have exactly this number of columns.|
|
||||
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `grid_columns` | | If specified the grid will always have exactly this number of columns. |
|
||||
| `grid_max_columns` | `4` | If specified, and `grid_columns` is not specified, the grid will not render more than this number of columns. The precise number will be calculated based on the [grid layout algorithm](grid-layout-algorithm.md). |
|
||||
| `grid_selected_width_factor` | `2` | How much to scale up the selected media item in a grid. A value of `1` will not scale the selected item at all, the default value of `2` will scale the media item width to twice what it would otherwise be, etc. |
|
||||
| `mode` | `single` | Whether to display a `single` live camera in a carousel, or all cameras in a `grid` configuration.|
|
||||
| `mode` | `single` | Whether to display a `single` live camera in a carousel, or all cameras in a `grid` configuration. |
|
||||
|
||||
## `microphone`
|
||||
|
||||
@@ -170,10 +170,10 @@ live:
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `always_connected` | `false` | Whether or not to keep the microphone stream continually connected while the card is running, or only when microphone is used (default). In the latter case there'll be a connection reset when the microphone is first used -- using this option can avoid that reset.|
|
||||
| `disconnect_seconds` | `90` | The number of seconds after microphone usage to disconnect the microphone from the stream. `0` implies never. Not relevant if `always_connected` is `true`.|
|
||||
| `mute_after_microphone_mute_seconds` | `60` | The number of seconds after the microphone mutes to automatically mute the inbound audio when `live.auto_mute` includes `microphone`.|
|
||||
| ------------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `always_connected` | `false` | Whether or not to keep the microphone stream continually connected while the card is running, or only when microphone is used (default). In the latter case there'll be a connection reset when the microphone is first used -- using this option can avoid that reset. |
|
||||
| `disconnect_seconds` | `90` | The number of seconds after microphone usage to disconnect the microphone from the stream. `0` implies never. Not relevant if `always_connected` is `true`. |
|
||||
| `mute_after_microphone_mute_seconds` | `60` | The number of seconds after the microphone mutes to automatically mute the inbound audio when `live.auto_mute` includes `microphone`. |
|
||||
|
||||
See [Using 2-way audio](../usage/2-way-audio.md) for more information about the very particular requirements that must be followed for 2-way audio to work.
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ The `media_gallery` is used for providing an overview of all `clips`, `snapshots
|
||||
|
||||
```yaml
|
||||
media_gallery:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions` | | [Actions](actions/README.md) to use for all views that use the `media_gallery` (e.g. `clips`, `snapshots`, `recordings`). |
|
||||
| `controls` | | Configuration for the Media viewer controls. See below. |
|
||||
|
||||
@@ -22,11 +22,11 @@ Configure the media gallery filter.
|
||||
media_gallery:
|
||||
controls:
|
||||
filter:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------ | ------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `mode` | `right` | Whether to show the gallery media filter to the `left`, to the `right` or `none` for no media filter. |
|
||||
|
||||
### `thumbnails`
|
||||
@@ -37,16 +37,16 @@ Configure the media gallery thumbnails.
|
||||
media_gallery:
|
||||
controls:
|
||||
thumbnails:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `show_details` | `false` | Whether to show media details (e.g. duration, start time, object detected, etc) alongside the thumbnail.|
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail.|
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail.|
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail.|
|
||||
| `size` | `100` | The size of the thumbnails in the gallery. Must be >= `75` and <= `175`.|
|
||||
| ----------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `show_details` | `false` | Whether to show media details (e.g. duration, start time, object detected, etc) alongside the thumbnail. |
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the gallery. Must be >= `75` and <= `175`. |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@ The `media_player` section configures viewing all `clip`, `snapshot` or `recordi
|
||||
|
||||
```yaml
|
||||
media_viewer:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions` | | [Actions](actions/README.md) to use for all views that use the `media_viewer` (e.g. `clip`, `snapshot`). |
|
||||
| `auto_mute` | `[unselected, hidden]` | A list of conditions in which media items are muted. `unselected` will automatically mute when a media item is unselected in the carousel and `hidden` will automatically mute when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically mute.|
|
||||
| `auto_pause` | `[unselected, hidden]` | A list of conditions in which media items are automatically paused. `unselected` will automatically pause when a media item is unselected in the carousel and `hidden` will automatically pause when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically pause.|
|
||||
| `auto_play` | `[selected, visible]` | A list of conditions in which media items are automatically played.`selected` will automatically play when a media item is selected in the carousel and `visible` will automatically play when the browser/tab becomes visible. Use an empty list (`[]`) to never automatically play.|
|
||||
| `auto_unmute` | `[]` | A list of conditions in which media items are unmuted. `selected` will automatically unmute when a media item is unselected in the carousel and `visible` will automatically unmute when the browser/tab becomes visible. Use an empty list (`[]`) to never automatically unmute. Note that some browsers will not allow automated unmute until the user has interacted with the page in some way -- if the user has not then the browser may pause the media instead.|
|
||||
| `auto_mute` | `[unselected, hidden]` | A list of conditions in which media items are muted. `unselected` will automatically mute when a media item is unselected in the carousel and `hidden` will automatically mute when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically mute. |
|
||||
| `auto_pause` | `[unselected, hidden]` | A list of conditions in which media items are automatically paused. `unselected` will automatically pause when a media item is unselected in the carousel and `hidden` will automatically pause when the browser/tab becomes hidden. Use an empty list (`[]`) to never automatically pause. |
|
||||
| `auto_play` | `[selected, visible]` | A list of conditions in which media items are automatically played.`selected` will automatically play when a media item is selected in the carousel and `visible` will automatically play when the browser/tab becomes visible. Use an empty list (`[]`) to never automatically play. |
|
||||
| `auto_unmute` | `[]` | A list of conditions in which media items are unmuted. `selected` will automatically unmute when a media item is unselected in the carousel and `visible` will automatically unmute when the browser/tab becomes visible. Use an empty list (`[]`) to never automatically unmute. Note that some browsers will not allow automated unmute until the user has interacted with the page in some way -- if the user has not then the browser may pause the media instead. |
|
||||
| `controls` | | Configuration for the Media viewer controls. See below. |
|
||||
| `draggable` | `true` | Whether or not the Media viewer carousel can be dragged left or right, via touch/swipe and mouse dragging. |
|
||||
| `lazy_load` | `true` | Whether or not to lazily load media in the Media viewer carousel. Setting this will false will fetch all media immediately which may make the carousel experience smoother at a cost of (potentially) a substantial number of simultaneous media fetches on load. |
|
||||
@@ -28,11 +28,11 @@ Configure the controls for the media player views.
|
||||
```yaml
|
||||
media_viewer:
|
||||
controls:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------- | ------- | --------------------------------------------------------------------------------------- |
|
||||
| `builtin` | `true` | Whether to show the built in (browser) video controls on media viewer videos. |
|
||||
| `next_previous` | | Configures how the "Next & Previous" controls are shown on the media viewer. See below. |
|
||||
| `thumbnails` | | Configures how thumbnails are shown on the media viewer. See below. |
|
||||
@@ -47,12 +47,12 @@ Configures how the "Next & Previous" controls are shown on the media viewer.
|
||||
media_viewer:
|
||||
controls:
|
||||
next_previous:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `size` | `48` | The size of the next/previous controls in pixels. Must be >= `20`.|
|
||||
| ------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `size` | `48` | The size of the next/previous controls in pixels. Must be >= `20`. |
|
||||
| `style` | `thumbnails` | When viewing media, what kind of controls to show to move to the previous/next media item. Acceptable values: `thumbnails`, `chevrons`, `none` . |
|
||||
|
||||
### `ptz`
|
||||
@@ -65,11 +65,11 @@ real) panning and zooming.
|
||||
media_viewer:
|
||||
controls:
|
||||
ptz:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `hide_home` | `false` | When `true` the Home button of the control is hidden |
|
||||
| `hide_pan_tilt` | `false` | When `true` the Pan & Tilt buttons of the control is hidden |
|
||||
| `hide_zoom` | `false` | When `true` the Zoom button of the control is hidden |
|
||||
@@ -86,17 +86,17 @@ Configures how thumbnails are shown on the media viewer.
|
||||
media_viewer:
|
||||
controls:
|
||||
thumbnails:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`).|
|
||||
| `show_details` | `false` | Whether to show event details (e.g. duration, start time, object detected, etc) alongside the thumbnail.|
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail.|
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail.|
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail.|
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel pixels. Must be >= `75` and <= `175`.|
|
||||
| ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`). |
|
||||
| `show_details` | `false` | Whether to show event details (e.g. duration, start time, object detected, etc) alongside the thumbnail. |
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel pixels. Must be >= `75` and <= `175`. |
|
||||
|
||||
### `timeline`
|
||||
|
||||
@@ -106,16 +106,16 @@ Configures how the mini-timeline is shown on the media viewer.
|
||||
media_viewer:
|
||||
controls:
|
||||
timeline:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `clustering_threshold` | `3` | The minimum number of overlapping events to allow prior to clustering/grouping them. Higher numbers cause clustering to happen less frequently. Depending on the timescale/zoom of the timeline, the underlying timeline library may still allow overlaps for low values of this parameter -- for a fully "flat" timeline use the `ribbon` style. `0` disables clustering entirely. Only used in the `stack` style of timeline. |
|
||||
| `events_media_type` | `all` | Whether to show only events with `clips`, events with `snapshots` or `all` events. When `all` is used, `clips` are favored for events that have both a clip and a snapshot. |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`).|
|
||||
| `pan_mode` | `pan`| See [timeline pan mode](timeline-pan-mode.md). |
|
||||
| `show_recordings` | `true` | Whether to show recordings on the timeline (specifically: which hours have any recorded content).|
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`). |
|
||||
| `pan_mode` | `pan` | See [timeline pan mode](timeline-pan-mode.md). |
|
||||
| `show_recordings` | `true` | Whether to show recordings on the timeline (specifically: which hours have any recorded content). |
|
||||
| `style` | `ribbon` | Whether the timeline should show events as a single flat `ribbon` or a `stack` of events that are clustered using the `clustering_threshold`. |
|
||||
| `window_seconds` | `3600` | The length of the default timeline in seconds. By default, 1 hour (`3600` seconds) is shown in the timeline. |
|
||||
|
||||
@@ -129,12 +129,12 @@ Configures how the media title is shown on the media viewer.
|
||||
media_viewer:
|
||||
controls:
|
||||
title:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `duration_seconds` | `2` | The number of seconds to display the title popup. `0` implies forever.|
|
||||
| ------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `duration_seconds` | `2` | The number of seconds to display the title popup. `0` implies forever. |
|
||||
| `mode` | `popup-bottom-right` | How to display the Media viewer media title. Acceptable values: `none`, `popup-top-left`, `popup-top-right`, `popup-bottom-left`, `popup-bottom-right` . |
|
||||
|
||||
## `display`
|
||||
@@ -144,15 +144,15 @@ Controls whether to show a single media item or grid in the media viewer.
|
||||
```yaml
|
||||
media_viewer:
|
||||
display:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `grid_columns` | | If specified the grid will always have exactly this number of columns.|
|
||||
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `grid_columns` | | If specified the grid will always have exactly this number of columns. |
|
||||
| `grid_max_columns` | `4` | If specified, and `grid_columns` is not specified, the grid will not render more than this number of columns. The precise number will be calculated based on the [grid layout algorithm](grid-layout-algorithm.md). |
|
||||
| `grid_selected_width_factor` | `2` | How much to scale up the selected media item in a grid. A value of `1` will not scale the selected item at all, the default value of `2` will scale the media item width to twice what it would otherwise be, etc. |
|
||||
| `mode` | `single` | Whether to display a `single` media item at a time, or a media item for all cameras in a `grid` configuration.|
|
||||
| `mode` | `single` | Whether to display a `single` media item at a time, or a media item for all cameras in a `grid` configuration. |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
+19
-19
@@ -2,17 +2,17 @@
|
||||
|
||||
Configures how the card menu behaves.
|
||||
|
||||
```yaml
|
||||
```yaml
|
||||
menu:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `alignment` | `left` | Whether to align the menu buttons to the `left`, `right`, `top` or `bottom` of the menu. Some selections may have no effect depending on the value of `position` (e.g. it doesn't make sense to `left` align icons on a menu with `position` to the `left`).|
|
||||
| `button_size` | `40` | The size of the menu buttons in pixels. Must be >= `20`.|
|
||||
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `alignment` | `left` | Whether to align the menu buttons to the `left`, `right`, `top` or `bottom` of the menu. Some selections may have no effect depending on the value of `position` (e.g. it doesn't make sense to `left` align icons on a menu with `position` to the `left`). |
|
||||
| `button_size` | `40` | The size of the menu buttons in pixels. Must be >= `20`. |
|
||||
| `buttons` | | Whether to show or hide built-in buttons. See below. |
|
||||
| `position` | `top` | Whether to show the menu on the `left`, `right`, `top` or `bottom` side of the card. Note that for the `outside` style only the `top` and `bottom` positions have an effect.|
|
||||
| `position` | `top` | Whether to show the menu on the `left`, `right`, `top` or `bottom` side of the card. Note that for the `outside` style only the `top` and `bottom` positions have an effect. |
|
||||
| `style` | `hidden` | The menu style to show by default, one of `none`, `hidden`, `hover`, `hover-card`, `overlay`, or `outside`. See below. |
|
||||
|
||||
## `buttons`
|
||||
@@ -23,18 +23,18 @@ All configuration is under:
|
||||
menu:
|
||||
buttons:
|
||||
[button]:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
### Available Buttons
|
||||
|
||||
| Button name | Description |
|
||||
| - | - |
|
||||
| `camera_ui` | The `camera_ui` menu button: brings the user to a context-appropriate page on the UI of their camera engine (e.g. the Frigate camera homepage). Will only appear if the camera engine supports a camera UI (e.g. if `frigate.url` option is set for `frigate` engine users).|
|
||||
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `camera_ui` | The `camera_ui` menu button: brings the user to a context-appropriate page on the UI of their camera engine (e.g. the Frigate camera homepage). Will only appear if the camera engine supports a camera UI (e.g. if `frigate.url` option is set for `frigate` engine users). |
|
||||
| `cameras` | The camera selection submenu. Will only appear if multiple cameras are configured. |
|
||||
| `clips` | The `clips` view menu button: brings the user to the `clips` view on tap and the most-recent `clip` view on hold. |
|
||||
| `display_mode` | The `display_mode` button allows changing between single and grid views. |
|
||||
| `download` | The `download` menu button: allow direct download of the media being displayed.|
|
||||
| `download` | The `download` menu button: allow direct download of the media being displayed. |
|
||||
| `expand` | The `expand` menu button: expand the card into a popup/dialog. |
|
||||
| `frigate` | The `Frigate` menu button: brings the user to the default configured view (`view.default`), or collapses/expands the menu if the `menu.style` is `hidden` . |
|
||||
| `fullscreen` | The `fullscreen` menu button: expand the card to consume the fullscreen. |
|
||||
@@ -52,24 +52,24 @@ menu:
|
||||
### Options for each button
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `alignment` | `matching` | Whether this button should have an alignment that is `matching` the menu alignment or `opposing` the menu. Can be used to create two separate groups of buttons on the menu. `priority` orders buttons within a given `alignment`. |
|
||||
| `enabled` | `true` for `frigate`, `cameras`, `substreams`, `live`, `clips`, `snapshots`, `timeline`, `download`, `camera_ui`, `fullscreen`, `media_player`, `display_mode` and `ptz_home`. `false` for `image`, `expand`, `microphone`, `mute`, `play`, `recordings`, `screenshot`, `ptz_controls` | Whether or not to show the button. |
|
||||
| `icon` | | An icon to overriding the default for that button, e.g. `mdi:camera-front`. |
|
||||
| `priority` | `50` | The button priority. Higher priority buttons are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`, when the menu alignment is `left`). Minimum `0`, maximum `100`.|
|
||||
| `priority` | `50` | The button priority. Higher priority buttons are ordered closer to the start of the menu alignment (i.e. a button with priority `70` will order further to the left than a button with priority `60`, when the menu alignment is `left`). Minimum `0`, maximum `100`. |
|
||||
|
||||
## `style`
|
||||
|
||||
This card supports several menu styles.
|
||||
|
||||
| Key | Description | Screenshot |
|
||||
| - | - | - |
|
||||
|`hidden`| Hide the menu by default, expandable upon clicking the Frigate button. |  |
|
||||
|`hover-card`| Overlay the menu over the card contents when the mouse is over the **card**, otherwise it is not shown. The Frigate button shows the default view. |  |
|
||||
|`hover`| Overlay the menu over the card contents when the mouse is over the **menu**, otherwise it is not shown. The Frigate button shows the default view. |  |
|
||||
|`none`| No menu is shown. |  |
|
||||
|`outside`| Render the menu outside the card (i.e. above it if `position` is `top`, or below it if `position` is `bottom`). The Frigate button shows the default view. |  |
|
||||
|`overlay`| Overlay the menu over the card contents. The Frigate button shows the default view. |  |
|
||||
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `hidden` | Hide the menu by default, expandable upon clicking the Frigate button. |  |
|
||||
| `hover-card` | Overlay the menu over the card contents when the mouse is over the **card**, otherwise it is not shown. The Frigate button shows the default view. |  |
|
||||
| `hover` | Overlay the menu over the card contents when the mouse is over the **menu**, otherwise it is not shown. The Frigate button shows the default view. |  |
|
||||
| `none` | No menu is shown. |  |
|
||||
| `outside` | Render the menu outside the card (i.e. above it if `position` is `top`, or below it if `position` is `bottom`). The Frigate button shows the default view. |  |
|
||||
| `overlay` | Overlay the menu over the card contents. The Frigate button shows the default view. |  |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ hide the menu in fullscreen mode).
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
[...]
|
||||
- [condition]
|
||||
# [...]
|
||||
```
|
||||
|
||||
!> Whilst all configuration parameters are theoretically overridable, in some instances a configuration variable may only be consulted on startup or changing its value may negatively impact behavior -- override results may vary!
|
||||
@@ -16,7 +16,7 @@ The top-level `overrides` configuration block expects a list, with each list
|
||||
item containing `conditions` and at least one of `merge`, `delete` or `set` specified.
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `conditions` | | A list of [conditions](conditions.md) that must evaluate to `true` in order for the overrides to be applied. |
|
||||
| `delete` | | An array of configuration paths to delete. See below. |
|
||||
| `merge` | | A dictionary of configuration paths to merge. See below. |
|
||||
@@ -43,7 +43,7 @@ An array of configuration paths to delete.
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
delete:
|
||||
- [path_1]
|
||||
- [path_2]
|
||||
@@ -56,9 +56,9 @@ Delete the 2nd camera:
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
delete:
|
||||
'cameras[2]'
|
||||
- 'cameras[2]'
|
||||
```
|
||||
|
||||
Delete the menu style parameter, thus falling back to the default:
|
||||
@@ -66,9 +66,9 @@ Delete the menu style parameter, thus falling back to the default:
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
delete:
|
||||
'menu.style'
|
||||
- 'menu.style'
|
||||
```
|
||||
|
||||
## `merge`
|
||||
@@ -76,7 +76,7 @@ overrides:
|
||||
Specifies an object to recursively merge into existing configuration.
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| -------------------- | ------- | -------------------------------------------------------------------------------------- |
|
||||
| [configuration path] | | Arbitrary configuration object to merge. Must be an object (i.e. not a literal value). |
|
||||
|
||||
### Examples
|
||||
@@ -86,11 +86,9 @@ Hide the menu when a given condition is met:
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
merge:
|
||||
menu: {
|
||||
style: 'hidden'
|
||||
}
|
||||
menu: { style: 'hidden' }
|
||||
```
|
||||
|
||||
Enable thumbnails below the `live` feed:
|
||||
@@ -98,11 +96,9 @@ Enable thumbnails below the `live` feed:
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
merge:
|
||||
'live.controls.thumbnails': {
|
||||
mode: 'below'
|
||||
}
|
||||
'live.controls.thumbnails': { mode: 'below' }
|
||||
```
|
||||
|
||||
Also enables thumbnails below the `live` feed, but without using the dot-separated notation:
|
||||
@@ -110,15 +106,9 @@ Also enables thumbnails below the `live` feed, but without using the dot-separat
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
merge:
|
||||
live: {
|
||||
controls: {
|
||||
thumbnails: {
|
||||
mode: 'below'
|
||||
}
|
||||
}
|
||||
}
|
||||
live: { controls: { thumbnails: { mode: 'below' } } }
|
||||
```
|
||||
|
||||
## `set`
|
||||
@@ -126,7 +116,7 @@ overrides:
|
||||
Specifies a value to set in the configuration. This differs from `merge` in that the existing value is entirely replaced.
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| -------------------- | ------- | ----------------------------------------------------- |
|
||||
| [configuration path] | | Arbitrary configuration value / object / list to set. |
|
||||
|
||||
### Examples
|
||||
@@ -136,11 +126,9 @@ Set the entire menu configuration to defaults with the exception of the `style`
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
set:
|
||||
menu: {
|
||||
style: 'overlay'
|
||||
}
|
||||
menu: { style: 'overlay' }
|
||||
```
|
||||
|
||||
Set the menu style but without touching the other `menu` parameters:
|
||||
@@ -148,7 +136,7 @@ Set the menu style but without touching the other `menu` parameters:
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
set:
|
||||
'menu.style': 'overlay'
|
||||
```
|
||||
@@ -158,9 +146,7 @@ That is equivalent to merging the following:
|
||||
```yaml
|
||||
overrides:
|
||||
- conditions:
|
||||
[condition]
|
||||
- [condition]
|
||||
merge:
|
||||
menu: {
|
||||
style: 'overlay'
|
||||
}
|
||||
menu: { style: 'overlay' }
|
||||
```
|
||||
@@ -4,11 +4,11 @@ Configure the card performance settings to enable the card to run (more) smoothl
|
||||
|
||||
```yaml
|
||||
performance:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------- | ------- | --------------------------------------------------- |
|
||||
| `features` | | Configure feature settings that impact performance. |
|
||||
| `style` | | Configure style settings that impact performance. |
|
||||
|
||||
@@ -19,13 +19,13 @@ Controls card-wide functionality that may impact performance.
|
||||
```yaml
|
||||
performance:
|
||||
features:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `animated_progress_indicator` | `true` | Will show the animated progress indicator 'spinner' when `true` or a simple loading icon when `false`.|
|
||||
| `media_chunk_size` | `50` | How many media items to fetch and render at a time (e.g. thumbnails under a live view, or number of snapshots to load in the media viewer). This may only make partial sense in some contexts (e.g. the 'infinite gallery' is still infinite, it just loads thumbnails this many items at a time) or not at all (e.g. the timeline will show the number of events dictated by the time span the user navigates to).|
|
||||
| ----------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `animated_progress_indicator` | `true` | Will show the animated progress indicator 'spinner' when `true` or a simple loading icon when `false`. |
|
||||
| `media_chunk_size` | `50` | How many media items to fetch and render at a time (e.g. thumbnails under a live view, or number of snapshots to load in the media viewer). This may only make partial sense in some contexts (e.g. the 'infinite gallery' is still infinite, it just loads thumbnails this many items at a time) or not at all (e.g. the timeline will show the number of events dictated by the time span the user navigates to). |
|
||||
|
||||
### `style`
|
||||
|
||||
@@ -38,13 +38,13 @@ shadows on timeline items, or curves in the media gallery items).
|
||||
```yaml
|
||||
performance:
|
||||
style:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `border_radius` | `true` | If `false` minimizes the usage of rounded corners.|
|
||||
| `box_shadow` | `true` | If `false` minimizes the usage of shadows.|
|
||||
| --------------- | ------- | -------------------------------------------------- |
|
||||
| `border_radius` | `true` | If `false` minimizes the usage of rounded corners. |
|
||||
| `box_shadow` | `true` | If `false` minimizes the usage of shadows. |
|
||||
|
||||
### The `low-performance` profile
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ the user.
|
||||
?> Profiles are applied top to bottom. If multiple profiles change a configuration default, then the last one "wins"
|
||||
|
||||
| Profile name | Purpose |
|
||||
| - | - |
|
||||
| ----------------- | -------------------------- |
|
||||
| `low-performance` | Increase card performance. |
|
||||
| `scrubbing` | Allow media "scrubbing". |
|
||||
|
||||
@@ -25,8 +25,8 @@ For low end devices, the `low-performance` profile will adjust card defaults to
|
||||
|
||||
Principles used in the selection of options set by `low-profile` profile mode:
|
||||
|
||||
* Get 'out of the box' performance similar to the basic "Home Assistant Picture Glance" card.
|
||||
* Do not break the visual aesthetic of the card.
|
||||
- Get 'out of the box' performance similar to the basic "Home Assistant Picture Glance" card.
|
||||
- Do not break the visual aesthetic of the card.
|
||||
|
||||
See the [source code](https://github.com/dermotduffy/frigate-hass-card/blob/dev/src/config/profiles/low-performance.ts) for an exhaustive list of options set by this profile.
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
The behavior of the timeline during seeking/dragging can be controlled by means of the icon on the bottom-right of the timeline, or by using the `pan_mode` configuration variable for the relevant timeline controls (e.g. `live.controls.timeline.pan_mode`).
|
||||
|
||||
| Configuration name | UI Icon | Behavior |
|
||||
| - | - | - |
|
||||
| `pan`| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>pan-horizontal</title><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg> | Dragging the timeline will pan only without selected or seeking any media. |
|
||||
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `pan` | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>pan-horizontal</title><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg> | Dragging the timeline will pan only without selected or seeking any media. |
|
||||
| `seek-in-camera` | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>camera-lock</title><path d="M4 4H7L9 2H15L17 4H20C21.11 4 22 4.89 22 6V12C21.16 11.37 20.13 11 19 11C18.21 11 17.46 11.18 16.79 11.5C16.18 9.22 14.27 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C12.42 17 12.84 16.95 13.23 16.85C13.08 17.2 13 17.59 13 18V20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.9 4 4 4M12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12C9 10.34 10.34 9 12 9M23 18.3V21.8C23 22.4 22.4 23 21.7 23H16.2C15.6 23 15 22.4 15 21.7V18.2C15 17.6 15.6 17 16.2 17V15.5C16.2 14.1 17.6 13 19 13C20.4 13 21.8 14.1 21.8 15.5V17C22.4 17 23 17.6 23 18.3M20.5 15.5C20.5 14.7 19.8 14.2 19 14.2C18.2 14.2 17.5 14.7 17.5 15.5V17H20.5V15.5Z" /></svg> | Dragging the timeline will seek / select across all available media from the selected camera only, selecting the media item with the longest duration. |
|
||||
| `seek-in-media` | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>play-box-lock</title><path d="M23 17.3V20.8C23 21.4 22.4 22 21.7 22H16.2C15.6 22 15 21.4 15 20.7V17.2C15 16.6 15.6 16 16.2 16V14.5C16.2 13.1 17.6 12 19 12C20.4 12 21.8 13.1 21.8 14.5V16C22.4 16 23 16.6 23 17.3M13 19V21H4C2.89 21 2 20.1 2 19V5C2 3.89 2.89 3 4 3H18C19.1 3 20 3.89 20 5V10.1L19 10L18 10.1C15.79 10.55 14.12 12.45 14 14.76C13.39 15.31 13 16.11 13 17V19M20.5 14.5C20.5 13.7 19.8 13.2 19 13.2C18.2 13.2 17.5 13.7 17.5 14.5V16H20.5V14.5M9 8V16L14 12L9 8Z" /></svg> | Dragging the timeline will seek within the selected media item only. |
|
||||
| `seek` | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>filmstrip-box-multiple</title><path d="M4,6H2V20A2,2 0 0,0 4,22H18V20H4V6M20,2H8A2,2 0 0,0 6,4V16A2,2 0 0,0 8,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M10,15H8V13H10V15M10,11H8V9H10V11M10,7H8V5H10V7M20,15H18V13H20V15M20,11H18V9H20V11M20,7H18V5H20V7Z" /></svg> | Dragging the timeline will seek / select across all available media from all cameras, selecting the media item with the longest duration whilst favoring (but not limited to) the currently selected camera. |
|
||||
|
||||
@@ -5,21 +5,21 @@ recordings across multiple cameras.
|
||||
|
||||
```yaml
|
||||
timeline:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
You can interact with the timeline in a number of ways:
|
||||
|
||||
* Clicking on an event will take you to the media viewer for that event.
|
||||
* Clicking on the "background", or a camera title, will take you to the recordings for that camera (seeking to the clicked time).
|
||||
* Clicking on the time axis will take you to recordings for all cameras (seeking to the clicked time).
|
||||
- Clicking on an event will take you to the media viewer for that event.
|
||||
- Clicking on the "background", or a camera title, will take you to the recordings for that camera (seeking to the clicked time).
|
||||
- Clicking on the time axis will take you to recordings for all cameras (seeking to the clicked time).
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `clustering_threshold` | `3` | The minimum number of overlapping events to allow prior to clustering/grouping them. Higher numbers cause clustering to happen less frequently. Depending on the timescale/zoom of the timeline, the underlying timeline library may still allow overlaps for low values of this parameter -- for a fully "flat" timeline use the `ribbon` style. `0` disables clustering entirely. Only used in the `stack` style of timeline. |
|
||||
| `controls` | | Configuration for the timeline controls. See below. |
|
||||
| `events_media_type` | `all` | Whether to show only events with `clips`, events with `snapshots` or `all` events. When `all` is used, `clips` are favored for events that have both a clip and a snapshot.|
|
||||
| `show_recordings` | `true` | Whether to show recordings on the timeline (specifically: which hours have any recorded content).|
|
||||
| `events_media_type` | `all` | Whether to show only events with `clips`, events with `snapshots` or `all` events. When `all` is used, `clips` are favored for events that have both a clip and a snapshot. |
|
||||
| `show_recordings` | `true` | Whether to show recordings on the timeline (specifically: which hours have any recorded content). |
|
||||
| `style` | `stack` | Whether the timeline should show events as a single flat `ribbon` or a `stack` of events that are clustered using the `clustering_threshold`. |
|
||||
| `window_seconds` | `3600` | The length of the default timeline in seconds. By default, 1 hour (`3600` seconds) is shown in the timeline. |
|
||||
|
||||
@@ -30,11 +30,11 @@ Configure the controls for the `timeline` view.
|
||||
```yaml
|
||||
timeline:
|
||||
controls:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------ | ------- | ---------------------------------------------------------------------- |
|
||||
| `thumbnails` | | Configures how thumbnails are shown on the `timeline` view. See below. |
|
||||
|
||||
### `thumbnails`
|
||||
@@ -45,17 +45,17 @@ Configures how thumbnails are shown on the timeline.
|
||||
timeline:
|
||||
controls:
|
||||
thumbnails:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`).|
|
||||
| `show_details` | `false` | Whether to show event details (e.g. duration, start time, object detected, etc) alongside the thumbnail.|
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail.|
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail.|
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail.|
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `175`.|
|
||||
| ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `mode` | `none` | Whether to show the thumbnail carousel `below` the media, `above` the media, in a drawer to the `left` or `right` of the media or to hide it entirely (`none`). |
|
||||
| `show_details` | `false` | Whether to show event details (e.g. duration, start time, object detected, etc) alongside the thumbnail. |
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `175`. |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
+23
-23
@@ -2,16 +2,16 @@
|
||||
|
||||
The `view` configuration options control how the default view of the card behaves.
|
||||
|
||||
```yaml
|
||||
```yaml
|
||||
view:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions` | | [Actions](actions/README.md) to use for all views, individual actions may be overriden by view-specific actions. |
|
||||
| `camera_select` | `current` | The [view](view.md?id=supported-views) to show when a new camera is selected (e.g. in the camera menu). If `current` the view is unchanged when a new camera is selected. |
|
||||
| `dark_mode` | `off` | Whether or not to turn dark mode `on`, `off` or `auto` to automatically turn on if the card `interaction_seconds` has expired (i.e. card has been left unattended for that period of time) or if dark mode is enabled in the HA profile theme setting. Dark mode dims the brightness by `25%`.|
|
||||
| `dark_mode` | `off` | Whether or not to turn dark mode `on`, `off` or `auto` to automatically turn on if the card `interaction_seconds` has expired (i.e. card has been left unattended for that period of time) or if dark mode is enabled in the HA profile theme setting. Dark mode dims the brightness by `25%`. |
|
||||
| `default` | `live` | The view to show in the card by default. The default camera is the first one listed. See [Supported Views](view.md?id=supported-views) below. |
|
||||
| `interaction_seconds` | `300` | After a mouse/touch interaction with the card, it will be considered "interacted with" until this number of seconds elapses without further interaction. May be used as part of an [interaction condition](conditions.md?id=interaction) or with `reset_after_interaction` to reset the view after the interaction is complete. `0` means no interactions are reported / acted upon. |
|
||||
| `keyboard_shortcuts` | See [usage](../usage/keyboard-shortcuts.md) for defaults. | Configure keyboard shortcuts. See below. |
|
||||
@@ -21,21 +21,21 @@ view:
|
||||
| `update_cycle_camera` | `false` | When set to `true` the selected camera is cycled on each default view change. |
|
||||
| `update_entities` | | **YAML only**: A card-wide list of entities that should cause the view to reset to the default (if the entity only pertains to a particular camera use [`triggers`](cameras/README.md?id=triggers) for the selected camera instead. |
|
||||
| `update_force` | `false` | Whether automated card updates should ignore user interaction. |
|
||||
| `update_seconds` | `0` | A number of seconds after which to automatically update/refresh the default view. If the default view occurs sooner (e.g. manually) the timer will start over. `0` disables this functionality.|
|
||||
| `update_seconds` | `0` | A number of seconds after which to automatically update/refresh the default view. If the default view occurs sooner (e.g. manually) the timer will start over. `0` disables this functionality. |
|
||||
|
||||
## `keyboard_shortcuts`
|
||||
|
||||
Configure the key-bindings for the builtin keyboard shortcuts. See [usage](../usage/keyboard-shortcuts.md) information for defaults on keyboard shortcuts.
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| `enabled` | `true` | If `true`, keyboard shortcuts are enabled. If `false`, they are disabled. |
|
||||
| `ptz_left`, `ptz_right`, `ptz_up`, `ptz_down`, `ptz_zoom_in`, `ptz_zoom_out`, `ptz_home` | See [usage](../usage/keyboard-shortcuts.md) for defaults. | An object that configures the key binding for a given pre-configured action. See below. |
|
||||
|
||||
### Keyboard Shortcut Configuration
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------ | ------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| key | | Any [keyboard key value](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values), e.g. `ArrowLeft` |
|
||||
| ctrl | `false` | If `true` requires the `ctrl` key to be held. |
|
||||
| shift | `false` | If `true` requires the `shift` key to be held. |
|
||||
@@ -51,7 +51,7 @@ All configuration is under:
|
||||
```yaml
|
||||
view:
|
||||
triggers:
|
||||
[...]
|
||||
# [...]
|
||||
```
|
||||
|
||||
When a camera untriggers (e.g. an entity state returning to something other than
|
||||
@@ -60,22 +60,22 @@ to wait prior to the acting (see `untrigger_seconds`). By default, triggering is
|
||||
only allowed when there is no ongoing human interaction with the card. This
|
||||
behavior can be controlled by the `interaction_mode` parameter.
|
||||
|
||||
Triggers based on Home Assistant entities require state *changes* -- when the
|
||||
Triggers based on Home Assistant entities require state _changes_ -- when the
|
||||
card is first started, it takes an active change in state to trigger (i.e. an
|
||||
already occupied room will not trigger, but a newly occupied room will).
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `actions` | | The actions to take when a camera is triggered. See below. |
|
||||
| `filter_selected_camera` | `false` | If set to `true` will only trigger on the currently selected camera.|
|
||||
| `filter_selected_camera` | `false` | If set to `true` will only trigger on the currently selected camera. |
|
||||
| `show_trigger_status` | `false` | Whether or not the `live` view should show a visual indication that it is triggered (a pulsing border around the camera edge). |
|
||||
| `untrigger_seconds` | `0` | The number of seconds to wait after a camera untriggers before considering the card untriggered and taking the `untrigger` action. |
|
||||
|
||||
### Trigger action configuration
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `interaction_mode` | `inactive` | Whether actions should be taken when the card is being interacted with. If `all`, actions will always left be taken regardless. If `inactive` actions will only be taken if the card has *not* had human interaction recently (as defined by `view.interaction_seconds`). If `active` actions will only be taken if the card *has* had human interaction recently. This does not stop triggering itself (i.e. border will still pulse if `show_trigger_status` is true) but rather just prevents the actions being performed. |
|
||||
| ------------------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `interaction_mode` | `inactive` | Whether actions should be taken when the card is being interacted with. If `all`, actions will always left be taken regardless. If `inactive` actions will only be taken if the card has _not_ had human interaction recently (as defined by `view.interaction_seconds`). If `active` actions will only be taken if the card _has_ had human interaction recently. This does not stop triggering itself (i.e. border will still pulse if `show_trigger_status` is true) but rather just prevents the actions being performed. |
|
||||
| `trigger` | `default` | If set to `default` the default view of the card will be reloaded. If set to `live` the triggered camera will be selected in `live` view. If set to `media` the appropriate media view (e.g. `clip` or `snapshot`) will be chosen to match a newly available media item (please note that only some [camera engines](cameras/engine.md) support new media detection, e.g. `frigate`). If set to `none` no action is taken. |
|
||||
| `untrigger` | `none` | If set to `default` the the default view of the card will be reloaded. If set to `none` no action will be taken. |
|
||||
|
||||
@@ -84,16 +84,16 @@ already occupied room will not trigger, but a newly occupied room will).
|
||||
This card supports several different views.
|
||||
|
||||
| Key | Description |
|
||||
| - | - |
|
||||
|`clip`|Shows a viewer for the most recent clip for this camera. Can also be accessed by holding down the `clips` menu icon.|
|
||||
|`clips`|Shows a gallery of clips for this camera.|
|
||||
|`image`|Shows a static image specified by the `image` parameter, can be used as a discrete default view or a screensaver (via `view.interaction_seconds`).|
|
||||
|`live`| Shows the live camera view with the configured [live provider]().|
|
||||
|`recording`|Shows a viewer for the most recent recording for this camera. Can also be accessed by holding down the `recordings` menu icon.|
|
||||
|`recordings`|Shows a gallery of recent (last day) recordings for this camera and its dependents.|
|
||||
|`snapshot`|Shows a viewer for the most recent snapshot for this camera. Can also be accessed by holding down the `snapshots` menu icon.|
|
||||
|`snapshots`|Shows a gallery of snapshots for this camera.|
|
||||
|`timeline`|Shows an event timeline.|
|
||||
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `clip` | Shows a viewer for the most recent clip for this camera. Can also be accessed by holding down the `clips` menu icon. |
|
||||
| `clips` | Shows a gallery of clips for this camera. |
|
||||
| `image` | Shows a static image specified by the `image` parameter, can be used as a discrete default view or a screensaver (via `view.interaction_seconds`). |
|
||||
| `live` | Shows the live camera view with the configured [live provider](). |
|
||||
| `recording` | Shows a viewer for the most recent recording for this camera. Can also be accessed by holding down the `recordings` menu icon. |
|
||||
| `recordings` | Shows a gallery of recent (last day) recordings for this camera and its dependents. |
|
||||
| `snapshot` | Shows a viewer for the most recent snapshot for this camera. Can also be accessed by holding down the `snapshots` menu icon. |
|
||||
| `snapshots` | Shows a gallery of snapshots for this camera. |
|
||||
| `timeline` | Shows an event timeline. |
|
||||
|
||||
The default view is `live`, but can be configured by the `view.default` parameter.
|
||||
|
||||
|
||||
+2471
-1
File diff suppressed because one or more lines are too long
+2373
-1
File diff suppressed because one or more lines are too long
+7
-6
@@ -33,6 +33,7 @@ instructions](advanced-installation.md?id=manual-installation).
|
||||
1. Hit 'Publish release'.
|
||||
|
||||
## Translations
|
||||
|
||||
[](https://fink.inlang.com/github.com/dermotduffy/frigate-hass-card?ref=badge)
|
||||
|
||||
To add translations, you can manually edit the JSON translation files in
|
||||
@@ -53,18 +54,18 @@ speed up the development environment creation. Simply:
|
||||
Everything should just work without any additional configuration. Under the
|
||||
hood, the dev container setup takes care of bringing up:
|
||||
|
||||
* Home Assistant (port `8123` or the next available one)
|
||||
* Frigate (ports `5000` or the next available one)
|
||||
* MQTT (port `1883` or the next available one)
|
||||
- Home Assistant (port `8123` or the next available one)
|
||||
- Frigate (ports `5000` or the next available one)
|
||||
- MQTT (port `1883` or the next available one)
|
||||
|
||||
As docker-compose containers.
|
||||
|
||||
* The Frigate Home Assistant Integration is registered as a `git submodule` at `.devcontainer/frigate-hass-integration`, and VS Code will initialize/clone it for you before opening the dev container.
|
||||
- The Frigate Home Assistant Integration is registered as a `git submodule` at `.devcontainer/frigate-hass-integration`, and VS Code will initialize/clone it for you before opening the dev container.
|
||||
|
||||
Some environment variables are supported in a `.env` file:
|
||||
|
||||
* `FRIGATE_VERSION`: The version of Frigate to use. Defaults to the latest stable version.
|
||||
* `HA_VERSION`: The version of Home Assistant to use. Defaults to the latest stable version.
|
||||
- `FRIGATE_VERSION`: The version of Frigate to use. Defaults to the latest stable version.
|
||||
- `HA_VERSION`: The version of Home Assistant to use. Defaults to the latest stable version.
|
||||
|
||||
?> When not specifying any version, it's recommended that you `docker-compose pull` the stack from time to time to ensure you have the latest versions of the images.
|
||||
|
||||
|
||||
+7
-8
@@ -287,7 +287,7 @@ cameras:
|
||||
|
||||
### Using dependent cameras with birdseye for all cameras
|
||||
|
||||
This example shows events for *all* other cameras when `birdseye` is selected.
|
||||
This example shows events for _all_ other cameras when `birdseye` is selected.
|
||||
This is just a shortcut for naming all other cameras.
|
||||
|
||||
```yaml
|
||||
@@ -877,17 +877,17 @@ automation to trigger a popup. Thanks to
|
||||
alias: >-
|
||||
Doorbell Pressed OR Human Detected - Firefox browser full screen video feed
|
||||
for 15 seconds
|
||||
description: ""
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
from: "off"
|
||||
to: "on"
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
entity_id:
|
||||
- binary_sensor.frontdoor_person_occupancy
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.front_door_dahua_button_pressed
|
||||
to: "on"
|
||||
to: 'on'
|
||||
condition: []
|
||||
action:
|
||||
- service: browser_mod.popup
|
||||
@@ -988,7 +988,7 @@ https://ha.mydomain.org/lovelace-test/0?frigate-card-action.main.clips
|
||||
|
||||
### Choosing the camera from a separate picture elements card
|
||||
|
||||
In this example, the card will select a given camera when the user navigates from a *separate* Picture Elements card:
|
||||
In this example, the card will select a given camera when the user navigates from a _separate_ Picture Elements card:
|
||||
|
||||
Frigate Card configuration:
|
||||
|
||||
@@ -1023,8 +1023,7 @@ elements:
|
||||
navigation_path: /lovelace-test/0?frigate-card-action.camera_select=camera.kitchen
|
||||
```
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Selecting a camera in expanded mode via query string
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
favicon.ico
|
||||
--
|
||||
- https://pictogrammers.com/library/mdi/icon/camera-iris/
|
||||
- $ convert camera-iris.png -define icon:auto-resize="256,128,96,64,48,32,16" favicon.ico
|
||||
|
||||
|
||||
## favicon.ico
|
||||
|
||||
- https://pictogrammers.com/library/mdi/icon/camera-iris/
|
||||
- $ convert camera-iris.png -define icon:auto-resize="256,128,96,64,48,32,16" favicon.ico
|
||||
|
||||
+5
-2
@@ -1,11 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Frigate Card</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Frigate Card Documentation" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover">
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no, viewport-fit=cover"
|
||||
/>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="images/favicon.ico" />
|
||||
|
||||
+32
-32
@@ -2,45 +2,45 @@
|
||||
|
||||
## 2-way audio
|
||||
|
||||

|
||||

|
||||
|
||||
## Cast media from card
|
||||
|
||||

|
||||

|
||||
|
||||
## Cast whole card
|
||||
|
||||
A dashboard with the card can be cast onto a suitable device (such as the Nest Hub shown below).
|
||||
|
||||

|
||||

|
||||
|
||||
## Dark mode
|
||||
|
||||

|
||||

|
||||
|
||||
## Editing
|
||||
|
||||

|
||||

|
||||
|
||||
## Events
|
||||
|
||||

|
||||

|
||||
|
||||
## Expanded mode
|
||||
|
||||

|
||||

|
||||
|
||||
## Favoriting events
|
||||
|
||||

|
||||

|
||||
|
||||
## Filtering
|
||||
|
||||

|
||||

|
||||
|
||||
## Grid
|
||||
|
||||

|
||||

|
||||
|
||||
## Media layout
|
||||
|
||||
@@ -48,95 +48,95 @@ Pan around a large camera view to only show part of the video feed in the card a
|
||||
|
||||
### Before
|
||||
|
||||

|
||||

|
||||
|
||||
### After
|
||||
|
||||

|
||||

|
||||
|
||||
## Menu hovering
|
||||
|
||||

|
||||

|
||||
|
||||
## Menu media control
|
||||
|
||||

|
||||

|
||||
|
||||
## Mixed engines
|
||||
|
||||

|
||||

|
||||
|
||||
## Multiple cameras
|
||||
|
||||
Scroll through your live cameras, or choose from a menu. Seamlessly supports
|
||||
cameras of different dimensions, and custom submenus per camera.
|
||||
|
||||

|
||||

|
||||
|
||||
## PTZ
|
||||
|
||||

|
||||

|
||||
|
||||
## Recordings
|
||||
|
||||
### Recordings single
|
||||
|
||||

|
||||

|
||||
|
||||
### Recordings multiple
|
||||
|
||||

|
||||

|
||||
|
||||
## Scrubbing
|
||||
|
||||

|
||||

|
||||
|
||||
## Submenus
|
||||
|
||||

|
||||

|
||||
|
||||
## Submenus with `select` entities
|
||||
|
||||

|
||||

|
||||
|
||||
## Substreams
|
||||
|
||||

|
||||

|
||||
|
||||
## Thumbnail drawers
|
||||
|
||||

|
||||

|
||||
|
||||
## Thumbnails in live
|
||||
|
||||

|
||||

|
||||
|
||||
## Thumbnails in media viewer
|
||||
|
||||

|
||||

|
||||
|
||||
## Timeline
|
||||
|
||||

|
||||

|
||||
|
||||
## Timeline date picking
|
||||
|
||||

|
||||

|
||||
|
||||
## Timeline `ribbon`
|
||||
|
||||

|
||||

|
||||
|
||||
## Triggering
|
||||
|
||||
Automatically choose the camera with the action!
|
||||
|
||||

|
||||

|
||||
|
||||
## URL actions
|
||||
|
||||

|
||||

|
||||
|
||||
## Zoom
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -77,8 +77,8 @@ hardware). In this latter case, you are out of luck.
|
||||
The Android video player swallows `double_tap` interactions in order to
|
||||
rewind or fast-forward. Workarounds:
|
||||
|
||||
* Use `hold` instead of `double_tap` for your card-wide action.
|
||||
* Use a [Frigate Card Element](configuration/elements.md) or menu icon to trigger
|
||||
- Use `hold` instead of `double_tap` for your card-wide action.
|
||||
- Use a [Frigate Card Element](configuration/elements.md) or menu icon to trigger
|
||||
the action instead.
|
||||
|
||||
### Dragging in carousels broken in Firefox
|
||||
@@ -118,11 +118,11 @@ between clicking the download button and the download starting.
|
||||
|
||||
### `Forbidden media source identifier`
|
||||
|
||||
* If you are using a custom `client_id` setting in your `frigate.yml` file (the
|
||||
- If you are using a custom `client_id` setting in your `frigate.yml` file (the
|
||||
configuration file for the Frigate backend itself), you must tell the card
|
||||
about it. See [Frigate engine
|
||||
configuration](configuration/cameras/engine.md?id=frigate).
|
||||
* You must have the `Enable the media browser` option enabled for the Frigate
|
||||
- You must have the `Enable the media browser` option enabled for the Frigate
|
||||
integration, in order for media fetches to work for the card. Media fetches
|
||||
are used to fetch events / clips / snapshots, etc. If you just wish to use
|
||||
live streams without media fetches, you can use the following configuration:
|
||||
@@ -144,7 +144,7 @@ for the iPhone is not currently possible.
|
||||
|
||||
Try resetting the app frontend cache:
|
||||
|
||||
* `Configuration -> Companion App -> Debugging -> Reset frontend cache`
|
||||
- `Configuration -> Companion App -> Debugging -> Reset frontend cache`
|
||||
|
||||
### Javascript console errors
|
||||
|
||||
@@ -168,7 +168,7 @@ must be followed.
|
||||
When upgrading the card it's recommended to reset the frontend cache. Sometimes
|
||||
clearing site data in Chrome settings isn't enough.
|
||||
|
||||
* Press F12 to display `Dev Console` in Chrome then right click on the refresh
|
||||
- Press F12 to display `Dev Console` in Chrome then right click on the refresh
|
||||
icon and select `Empty Cache and Hard Reload`
|
||||
|
||||
### Static image URL with credentials doesn't load
|
||||
|
||||
+12
-12
@@ -9,16 +9,16 @@ challenging.
|
||||
|
||||
### Environmental requirements
|
||||
|
||||
* Must have a camera that supports audio out (otherwise what's the point!)
|
||||
* Camera must be supported by `go2rtc` for 2-way audio (see [supported cameras](https://github.com/AlexxIT/go2rtc#two-way-audio)).
|
||||
* Must be accessing your Home Assistant instance over `https`. The browser will enforce this.
|
||||
- Must have a camera that supports audio out (otherwise what's the point!)
|
||||
- Camera must be supported by `go2rtc` for 2-way audio (see [supported cameras](https://github.com/AlexxIT/go2rtc#two-way-audio)).
|
||||
- Must be accessing your Home Assistant instance over `https`. The browser will enforce this.
|
||||
|
||||
### Card requirements
|
||||
|
||||
* Only Frigate cameras are supported.
|
||||
* Only the `go2rtc` live provider is supported.
|
||||
* Only the `webrtc` mode supports 2-way audio:
|
||||
* Must have microphone menu button enabled:
|
||||
- Only Frigate cameras are supported.
|
||||
- Only the `go2rtc` live provider is supported.
|
||||
- Only the `webrtc` mode supports 2-way audio:
|
||||
- Must have microphone menu button enabled:
|
||||
|
||||
## Example configuration
|
||||
|
||||
@@ -38,16 +38,16 @@ menu:
|
||||
|
||||
## Usage
|
||||
|
||||
* The camera will always load *without* the microphone connected, unless the
|
||||
- The camera will always load _without_ the microphone connected, unless the
|
||||
[`always_connected`](../configuration/live.md?id=microphone) microphone option is
|
||||
set to `true`.
|
||||
* To speak, hold-down the microphone menu button.
|
||||
* On first press, this will reset the `webrtc` connection to include 2-way
|
||||
- To speak, hold-down the microphone menu button.
|
||||
- On first press, this will reset the `webrtc` connection to include 2-way
|
||||
audio unless [`always_connected`](../configuration/live.md?id=microphone) has
|
||||
been used.
|
||||
* Thereafter hold the microphone button down to unmute/speak, let go to
|
||||
- Thereafter hold the microphone button down to unmute/speak, let go to
|
||||
mute.
|
||||
* The video will automatically reset to remove the microphone after the number
|
||||
- The video will automatically reset to remove the microphone after the number
|
||||
of seconds specified by
|
||||
[`disconnect_seconds`](../configuration/live.md?id=microphone) configuration have
|
||||
elapsed since the last mute/unmute press.
|
||||
|
||||
+11
-11
@@ -1,14 +1,14 @@
|
||||
* [Getting Started](../README.md)
|
||||
* [Configuration](../configuration/README.md)
|
||||
* [Examples](../examples.md)
|
||||
* [Screenshots](../screenshots.md)
|
||||
* [Troubleshooting](../troubleshooting.md)
|
||||
* [Usage](README.md)
|
||||
* [2-way audio](2-way-audio.md)
|
||||
* [Casting](casting.md)
|
||||
* [Keyboard Shortcuts](keyboard-shortcuts.md)
|
||||
* [URL Actions](url-actions.md)
|
||||
- [Getting Started](../README.md)
|
||||
- [Configuration](../configuration/README.md)
|
||||
- [Examples](../examples.md)
|
||||
- [Screenshots](../screenshots.md)
|
||||
- [Troubleshooting](../troubleshooting.md)
|
||||
- [Usage](README.md)
|
||||
- [2-way audio](2-way-audio.md)
|
||||
- [Casting](casting.md)
|
||||
- [Keyboard Shortcuts](keyboard-shortcuts.md)
|
||||
- [URL Actions](url-actions.md)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../developing.md)
|
||||
- [Developing](../developing.md)
|
||||
|
||||
@@ -6,21 +6,21 @@ Hub](https://store.google.com/us/product/nest_hub_2nd_gen)) through the use of
|
||||
|
||||
## Instructions
|
||||
|
||||
* Visit [Home Assistant Cast](https://cast.home-assistant.io/) and click `Start Casting`
|
||||
* Enter your Home Assistant URL, and authorize your account.
|
||||
* Click `Start Casting` and choose the device to cast to from the browser menu.
|
||||
* Choose which view/dashboard to display.
|
||||
* If successful, the view will be cast to the device.
|
||||
- Visit [Home Assistant Cast](https://cast.home-assistant.io/) and click `Start Casting`
|
||||
- Enter your Home Assistant URL, and authorize your account.
|
||||
- Click `Start Casting` and choose the device to cast to from the browser menu.
|
||||
- Choose which view/dashboard to display.
|
||||
- If successful, the view will be cast to the device.
|
||||
|
||||
## Limitations
|
||||
|
||||
Casting Home Assistant dashboards comes with a number of caveats:
|
||||
|
||||
* Home Assistant Casting does not support the HA `streaming` component
|
||||
- Home Assistant Casting does not support the HA `streaming` component
|
||||
([source](https://cast.home-assistant.io/faq.html)). This means clips playing
|
||||
and the `ha` live provider can not work. Other live providers such as `jsmpeg`
|
||||
and `webrtc-card` function correctly.
|
||||
* The Javascript fullscreen API does not work (so the fullscreen button does not
|
||||
- The Javascript fullscreen API does not work (so the fullscreen button does not
|
||||
work, but see below for an equivalent).
|
||||
|
||||
## Recommended configuration for Nest Hub
|
||||
@@ -42,4 +42,4 @@ dimensions:
|
||||
|
||||
### Result
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
There are two ways to have the card respond to key input:
|
||||
|
||||
* As a convenience, the card supports a small number of built in shortcuts with pre-defined default bindings. See below for these built in shortcuts. Use the [`keyboard_shortcuts`](../configuration/view.md?id=keyboard_shortcuts) configuration to change their bindings.
|
||||
* More generally, _any_ [action](../configuration/actions/README.md) can be configured to run in response to keyboard input as part of an [automation](../configuration/automations.md), even if that action does not have a pre-defined shortcut. See [keyboard automation example](../examples.md?id=responding-to-key-input) to show how to execute any arbitrary action(s) in response to keyboard activity.
|
||||
- As a convenience, the card supports a small number of built in shortcuts with pre-defined default bindings. See below for these built in shortcuts. Use the [`keyboard_shortcuts`](../configuration/view.md?id=keyboard_shortcuts) configuration to change their bindings.
|
||||
- More generally, _any_ [action](../configuration/actions/README.md) can be configured to run in response to keyboard input as part of an [automation](../configuration/automations.md), even if that action does not have a pre-defined shortcut. See [keyboard automation example](../examples.md?id=responding-to-key-input) to show how to execute any arbitrary action(s) in response to keyboard activity.
|
||||
|
||||
## Built-in shortcuts
|
||||
|
||||
| Name | Default key binding | Action | Description |
|
||||
| - | - | - | - |
|
||||
| -------------- | ------------------- | --------------------------------------------------------------------- | ------------------- |
|
||||
| `ptz_down` | `ArrowDown` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move down. |
|
||||
| `ptz_home` | `h` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ home / default. |
|
||||
| `ptz_left` | `ArrowLeft` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move left. |
|
||||
|
||||
+12
-12
@@ -8,16 +8,16 @@ camera, open the live view in expanded mode, etc).
|
||||
|
||||
The Frigate card will execute these actions in the following circumstances:
|
||||
|
||||
* On initial card load.
|
||||
* On 'tab' change in a dashboard.
|
||||
* When a `navigate` [action](https://www.home-assistant.io/dashboards/actions/)
|
||||
- On initial card load.
|
||||
- On 'tab' change in a dashboard.
|
||||
- When a `navigate` [action](https://www.home-assistant.io/dashboards/actions/)
|
||||
is called on the dashboard (e.g. a button click requests navigation).
|
||||
* When the user uses the `back` / `forward` browser buttons whilst viewing a
|
||||
- When the user uses the `back` / `forward` browser buttons whilst viewing a
|
||||
dashboard.
|
||||
|
||||
## Instructions
|
||||
|
||||
To send an action to *all* Frigate Cards on a dashboard:
|
||||
To send an action to _all_ Frigate Cards on a dashboard:
|
||||
|
||||
```
|
||||
[PATH_TO_YOUR_HA_DASHBOARD]?frigate-card-action.[ACTION]=[VALUE]
|
||||
@@ -30,7 +30,7 @@ To send an action to a specific named Frigate Card:
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| --------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `ACTION` | One of the supported Frigate Card custom actions. See below. |
|
||||
| `CARD_ID` | When specified only cards that have a [`card_id`](../configuration/README.md) parameter will act. |
|
||||
| `VALUE` | An optional value to use with the `camera_select` and `live_substream_select` actions. |
|
||||
@@ -47,27 +47,27 @@ unless the action is targeted with a `CARD_ID` as shown above.
|
||||
Only a subset of all [actions](../configuration/actions/README.md) are supported in URL form.
|
||||
|
||||
| Action | Supported in URL | Explanation |
|
||||
| - | - | - |
|
||||
| -------------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| `camera_select` | :white_check_mark: | |
|
||||
| `camera_ui`| :white_check_mark: | |
|
||||
| `camera_ui` | :white_check_mark: | |
|
||||
| `clip` | :white_check_mark: | |
|
||||
| `clips` | :white_check_mark: | |
|
||||
| `default` | :white_check_mark: | |
|
||||
| `download`| :heavy_multiplication_x: | Latest media information is not available on initial render. |
|
||||
| `download` | :heavy_multiplication_x: | Latest media information is not available on initial render. |
|
||||
| `expand` | :white_check_mark: | |
|
||||
| `fullscreen` | :heavy_multiplication_x: | Javascript does not support activating fullscreen without direct human interaction. Use `expand` as an alternative. |
|
||||
| `image` | :white_check_mark: | |
|
||||
| `live_substream_select` | :white_check_mark: | |
|
||||
| `live` | :white_check_mark: | |
|
||||
| `media_player`| :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
|
||||
| `media_player` | :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
|
||||
| `menu_toggle` | :white_check_mark: | |
|
||||
| `microphone_mute`, `microphone_unmute`| :heavy_multiplication_x: | |
|
||||
| `microphone_mute`, `microphone_unmute` | :heavy_multiplication_x: | |
|
||||
| `mute`, `unmute` | :heavy_multiplication_x: | |
|
||||
| `play`, `pause` | :heavy_multiplication_x: | |
|
||||
| `ptz` | :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
|
||||
| `recording` | :white_check_mark: | |
|
||||
| `recordings` | :white_check_mark: | |
|
||||
| `screenshot`| :heavy_multiplication_x: | Latest media information is not available on initial render. |
|
||||
| `screenshot` | :heavy_multiplication_x: | Latest media information is not available on initial render. |
|
||||
| `ptz_controls` | :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
|
||||
| `snapshot` | :white_check_mark: | |
|
||||
| `snapshots` | :white_check_mark: | |
|
||||
|
||||
+4
-3
@@ -67,12 +67,11 @@
|
||||
"docsify-cli": "^4.4.4",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"jsdom": "^21.1.1",
|
||||
"markdown-link-check": "^3.12.1",
|
||||
"prettier": "^2.6.0",
|
||||
"prettier": "^3.3.1",
|
||||
"rollup": "^2.79.0",
|
||||
"rollup-plugin-git-info": "^1.0.0",
|
||||
"rollup-plugin-serve": "^2.0.1",
|
||||
@@ -94,6 +93,8 @@
|
||||
"docs-update-images": "./scripts/docs-update-images.sh",
|
||||
"docs-update-dependencies": "./scripts/docs-update-dependencies.sh",
|
||||
"lint": "eslint 'src/**/*.ts'",
|
||||
"format": "prettier --write .",
|
||||
"format-check": "prettier --check .",
|
||||
"rollup": "rollup -c",
|
||||
"prune": "ts-prune",
|
||||
"test": "vitest run",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @see https://prettier.io/docs/en/configuration.html
|
||||
* @type {import('prettier').Options}
|
||||
* */
|
||||
const config = {
|
||||
semi: true,
|
||||
trailingComma: 'all',
|
||||
singleQuote: true,
|
||||
printWidth: 89,
|
||||
tabWidth: 2,
|
||||
embeddedLanguageFormatting: 'auto',
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema":"https://inlang.com/schema/project-settings",
|
||||
"$schema": "https://inlang.com/schema/project-settings",
|
||||
"sourceLanguageTag": "en",
|
||||
"languageTags": ["en", "it", "pt-BR", "pt-PT"],
|
||||
"modules": [
|
||||
@@ -11,9 +11,6 @@
|
||||
],
|
||||
"plugin.inlang.json": {
|
||||
"pathPattern": "./src/localize/languages/{languageTag}.json",
|
||||
"variableReferencePattern": [
|
||||
"{",
|
||||
"}"
|
||||
]
|
||||
"variableReferencePattern": ["{", "}"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,7 @@ export class PTZAction extends FrigateCardAction<PTZActionConfig> {
|
||||
?.targetID ??
|
||||
null;
|
||||
const ptzCapabilities = ptzCameraID
|
||||
? api
|
||||
.getCameraManager()
|
||||
.getCameraCapabilities(ptzCameraID)
|
||||
?.getPTZCapabilities()
|
||||
? api.getCameraManager().getCameraCapabilities(ptzCameraID)?.getPTZCapabilities()
|
||||
: null;
|
||||
const ptzConfiguration = ptzCameraID
|
||||
? api.getCameraManager().getStore().getCameraConfig(ptzCameraID)?.ptz
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionType } from "../../config/types";
|
||||
import { CardActionsAPI } from "../types";
|
||||
import { ActionType } from '../../config/types';
|
||||
import { CardActionsAPI } from '../types';
|
||||
|
||||
export interface AuxillaryActionConfig {
|
||||
camera_image?: string;
|
||||
|
||||
@@ -15,8 +15,7 @@ export class AutoUpdateManager {
|
||||
*/
|
||||
public startDefaultViewTimer(): void {
|
||||
this._timer.stop();
|
||||
const updateSeconds = this._api.getConfigManager().getConfig()
|
||||
?.view.update_seconds;
|
||||
const updateSeconds = this._api.getConfigManager().getConfig()?.view.update_seconds;
|
||||
if (updateSeconds) {
|
||||
this._timer.start(updateSeconds, () => {
|
||||
if (this._isAutomatedUpdateAllowed()) {
|
||||
|
||||
@@ -9,7 +9,10 @@ import { ActionExecutionRequestEventTarget } from './actions/utils/execution-req
|
||||
export type ScrollCallback = () => void;
|
||||
export type MenuToggleCallback = () => void;
|
||||
|
||||
export type CardHTMLElement = LitElement & ReactiveControllerHost & ActionEventTarget & ActionExecutionRequestEventTarget;
|
||||
export type CardHTMLElement = LitElement &
|
||||
ReactiveControllerHost &
|
||||
ActionEventTarget &
|
||||
ActionExecutionRequestEventTarget;
|
||||
|
||||
export class CardElementManager {
|
||||
protected _api: CardElementAPI;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { FrigateCardError, MESSAGE_TYPE_PRIORITIES, Message, MessageType } from '../types';
|
||||
import {
|
||||
FrigateCardError,
|
||||
MESSAGE_TYPE_PRIORITIES,
|
||||
Message,
|
||||
MessageType,
|
||||
} from '../types';
|
||||
import { errorToConsole } from '../utils/basic';
|
||||
import { CardMessageAPI } from './types';
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ export interface KeysState {
|
||||
shift: boolean;
|
||||
alt: boolean;
|
||||
meta: boolean;
|
||||
}
|
||||
};
|
||||
}
|
||||
interface TaggedAutomation extends Automation {
|
||||
tag?: unknown;
|
||||
|
||||
+10
-4
@@ -258,7 +258,8 @@ class FrigateCard extends LitElement {
|
||||
|
||||
// Caution: Keep the main div and the menu next to one another in order to
|
||||
// ensure the hover menu styling continues to work.
|
||||
return this._renderInDialogIfNecessary(html` <ha-card
|
||||
return this._renderInDialogIfNecessary(
|
||||
html` <ha-card
|
||||
id="ha-card"
|
||||
.actionHandler=${actionHandler({
|
||||
hasHold: frigateCardHasAction(actions.hold_action),
|
||||
@@ -305,7 +306,9 @@ class FrigateCard extends LitElement {
|
||||
.getConfigManager()
|
||||
.getNonOverriddenConfig()}
|
||||
.overriddenConfig=${this._controller.getConfigManager().getConfig()}
|
||||
.cardWideConfig=${this._controller.getConfigManager().getCardWideConfig()}
|
||||
.cardWideConfig=${this._controller
|
||||
.getConfigManager()
|
||||
.getCardWideConfig()}
|
||||
.rawConfig=${this._controller.getConfigManager().getRawConfig()}
|
||||
.configManager=${this._controller.getConfigManager()}
|
||||
.conditionsManagerEpoch=${this._controller
|
||||
@@ -342,7 +345,9 @@ class FrigateCard extends LitElement {
|
||||
this._menuButtonController.removeDynamicMenuButton(ev.detail);
|
||||
this.requestUpdate();
|
||||
}}
|
||||
@frigate-card:conditions:evaluate=${(ev: ConditionsEvaluateRequestEvent) => {
|
||||
@frigate-card:conditions:evaluate=${(
|
||||
ev: ConditionsEvaluateRequestEvent,
|
||||
) => {
|
||||
ev.evaluation = this._controller
|
||||
.getConditionsManager()
|
||||
?.evaluateConditions(ev.conditions);
|
||||
@@ -350,7 +355,8 @@ class FrigateCard extends LitElement {
|
||||
>
|
||||
</frigate-card-elements>`
|
||||
: ``}
|
||||
</ha-card>`);
|
||||
</ha-card>`,
|
||||
);
|
||||
}
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
|
||||
@@ -97,7 +97,9 @@ export class PTZController {
|
||||
? this._forceVisibility
|
||||
: this._config?.mode === 'auto'
|
||||
? !!this._cameraID &&
|
||||
!!this._cameraManager?.getCameraCapabilities(this._cameraID)?.hasPTZCapability()
|
||||
!!this._cameraManager
|
||||
?.getCameraCapabilities(this._cameraID)
|
||||
?.hasPTZCapability()
|
||||
: this._config?.mode === 'on';
|
||||
}
|
||||
|
||||
|
||||
@@ -204,10 +204,7 @@ export function dispatchFrigateCardErrorEvent(
|
||||
export interface FrigateCardMessageEventTarget extends EventTarget {
|
||||
addEventListener(
|
||||
event: 'frigate-card:message',
|
||||
listener: (
|
||||
this: FrigateCardMessageEventTarget,
|
||||
ev: CustomEvent<Message>,
|
||||
) => void,
|
||||
listener: (this: FrigateCardMessageEventTarget, ev: CustomEvent<Message>) => void,
|
||||
options?: AddEventListenerOptions | boolean,
|
||||
): void;
|
||||
addEventListener(
|
||||
@@ -217,10 +214,7 @@ export interface FrigateCardMessageEventTarget extends EventTarget {
|
||||
): void;
|
||||
removeEventListener(
|
||||
event: 'frigate-card:message',
|
||||
listener: (
|
||||
this: FrigateCardMessageEventTarget,
|
||||
ev: CustomEvent<Message>,
|
||||
) => void,
|
||||
listener: (this: FrigateCardMessageEventTarget, ev: CustomEvent<Message>) => void,
|
||||
options?: boolean | EventListenerOptions,
|
||||
): void;
|
||||
removeEventListener(
|
||||
|
||||
@@ -92,7 +92,8 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
||||
'slide-selected': selectedIndex === index,
|
||||
};
|
||||
|
||||
slides.push(html` <frigate-card-thumbnail
|
||||
slides.push(
|
||||
html` <frigate-card-thumbnail
|
||||
class="${classMap(classes)}"
|
||||
.cameraManager=${this.cameraManager}
|
||||
.hass=${this.hass}
|
||||
@@ -116,7 +117,8 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
||||
stopEventFromActivatingCardWideActions(ev);
|
||||
}}
|
||||
>
|
||||
</frigate-card-thumbnail>`);
|
||||
</frigate-card-thumbnail>`,
|
||||
);
|
||||
}
|
||||
return slides;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ export const keyboardShortcutsSchema = z.object({
|
||||
});
|
||||
export type KeyboardShortcuts = z.infer<typeof keyboardShortcutsSchema>;
|
||||
|
||||
|
||||
const KEYBOARD_SHORTCUT_PTZ_NAMES = [
|
||||
'ptz_down',
|
||||
'ptz_home',
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { getConfigValue, setConfigValue } from '../management.js';
|
||||
import {
|
||||
ProfileType,
|
||||
RawFrigateCardConfig,
|
||||
frigateCardConfigSchema,
|
||||
} from '../types.js';
|
||||
import { ProfileType, RawFrigateCardConfig, frigateCardConfigSchema } from '../types.js';
|
||||
import { deepRemoveDefaults } from '../../utils/zod.js';
|
||||
import { LOW_PERFORMANCE_PROFILE } from './low-performance.js';
|
||||
import { SCRUBBING_PROFILE } from './scrubbing.js';
|
||||
|
||||
const PROFILES = {
|
||||
'low-performance': LOW_PERFORMANCE_PROFILE,
|
||||
'scrubbing': SCRUBBING_PROFILE,
|
||||
scrubbing: SCRUBBING_PROFILE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+7
-9
@@ -737,9 +737,7 @@ const ptzCameraConfigDefaults = {
|
||||
// service data as actions for each PTZ action, and it will be preprocessed
|
||||
// into the full form. This also provides compatability with the AlexIT/WebRTC
|
||||
// PTZ configuration.
|
||||
const dataPTZFormatToFullFormat = function (
|
||||
suffix: string,
|
||||
): (data: unknown) => unknown {
|
||||
const dataPTZFormatToFullFormat = function (suffix: string): (data: unknown) => unknown {
|
||||
return (data) => {
|
||||
if (!data || typeof data !== 'object' || !data['service']) {
|
||||
return data;
|
||||
@@ -1545,9 +1543,7 @@ export const menuConfigSchema = z
|
||||
camera_ui: visibleButtonSchema.default(menuConfigDefault.buttons.camera_ui),
|
||||
cameras: visibleButtonSchema.default(menuConfigDefault.buttons.cameras),
|
||||
clips: visibleButtonSchema.default(menuConfigDefault.buttons.clips),
|
||||
ptz_home: hiddenButtonSchema.default(
|
||||
menuConfigDefault.buttons.ptz_home,
|
||||
),
|
||||
ptz_home: hiddenButtonSchema.default(menuConfigDefault.buttons.ptz_home),
|
||||
display_mode: visibleButtonSchema.default(
|
||||
menuConfigDefault.buttons.display_mode,
|
||||
),
|
||||
@@ -1608,7 +1604,7 @@ const viewerConfigDefault = {
|
||||
ptz: {
|
||||
...ptzControlsDefaults,
|
||||
mode: 'off' as const,
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1658,10 +1654,12 @@ const viewerConfigSchema = z
|
||||
next_previous: viewerNextPreviousControlConfigSchema.default(
|
||||
viewerConfigDefault.controls.next_previous,
|
||||
),
|
||||
ptz: ptzControlsConfigSchema.extend({
|
||||
ptz: ptzControlsConfigSchema
|
||||
.extend({
|
||||
// The media_viewer ptz has no 'auto' mode.
|
||||
mode: z.enum(['off', 'on']).default(viewerConfigDefault.controls.ptz.mode),
|
||||
}).default(viewerConfigDefault.controls.ptz),
|
||||
})
|
||||
.default(viewerConfigDefault.controls.ptz),
|
||||
thumbnails: thumbnailsControlSchema.default(
|
||||
viewerConfigDefault.controls.thumbnails,
|
||||
),
|
||||
|
||||
+7
-2
@@ -1123,10 +1123,15 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
|
||||
);
|
||||
}
|
||||
|
||||
protected _renderKeyAssigner(configPath: string, defaultValue: KeyboardShortcut): TemplateResult {
|
||||
protected _renderKeyAssigner(
|
||||
configPath: string,
|
||||
defaultValue: KeyboardShortcut,
|
||||
): TemplateResult {
|
||||
return html` <frigate-card-key-assigner
|
||||
.label=${localize(`config.${configPath}`)}
|
||||
.value=${this._config ? getConfigValue(this._config, configPath, defaultValue) : null}
|
||||
.value=${this._config
|
||||
? getConfigValue(this._config, configPath, defaultValue)
|
||||
: null}
|
||||
@value-changed=${(ev) => this._valueChangedHandler(configPath, ev)}
|
||||
></frigate-card-key-assigner>`;
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
**Image Formatting Process**:
|
||||
|
||||
* Horizontal mirror (to face the opposite direction)
|
||||
* Cropped for 16:9
|
||||
* Scaled down to 492x277
|
||||
* Quality @ 85%
|
||||
- Horizontal mirror (to face the opposite direction)
|
||||
- Cropped for 16:9
|
||||
- Scaled down to 492x277
|
||||
- Quality @ 85%
|
||||
|
||||
```sh
|
||||
$ convert -extent 2048x1152 -flop -gravity center 47543120431_b285c45ac8_k.jpg frigate-bird-in-sky.jpg
|
||||
|
||||
@@ -21,10 +21,12 @@ import {
|
||||
dispatchMediaLoadedEvent,
|
||||
dispatchMediaPauseEvent,
|
||||
dispatchMediaPlayEvent,
|
||||
dispatchMediaVolumeChangeEvent
|
||||
dispatchMediaVolumeChangeEvent,
|
||||
} from '../utils/media-info.js';
|
||||
import {
|
||||
hideMediaControlsTemporarily, MEDIA_LOAD_CONTROLS_HIDE_SECONDS, setControlsOnVideo
|
||||
hideMediaControlsTemporarily,
|
||||
MEDIA_LOAD_CONTROLS_HIDE_SECONDS,
|
||||
setControlsOnVideo,
|
||||
} from '../utils/media.js';
|
||||
import { screenshotMedia } from '../utils/screenshot.js';
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ import {
|
||||
dispatchMediaLoadedEvent,
|
||||
dispatchMediaPauseEvent,
|
||||
dispatchMediaPlayEvent,
|
||||
dispatchMediaVolumeChangeEvent
|
||||
dispatchMediaVolumeChangeEvent,
|
||||
} from '../utils/media-info.js';
|
||||
import {
|
||||
hideMediaControlsTemporarily,
|
||||
MEDIA_LOAD_CONTROLS_HIDE_SECONDS,
|
||||
setControlsOnVideo
|
||||
setControlsOnVideo,
|
||||
} from '../utils/media.js';
|
||||
|
||||
customElements.whenDefined('ha-web-rtc-player').then(() => {
|
||||
|
||||
+37
-37
@@ -27,71 +27,71 @@ ha-icon-button.button {
|
||||
}
|
||||
|
||||
@mixin state-icon($element) {
|
||||
#{$element}[data-domain="alert"][data-state="on"],
|
||||
#{$element}[data-domain="automation"][data-state="on"],
|
||||
#{$element}[data-domain="binary_sensor"][data-state="on"],
|
||||
#{$element}[data-domain="calendar"][data-state="on"],
|
||||
#{$element}[data-domain="camera"][data-state="streaming"],
|
||||
#{$element}[data-domain="cover"][data-state="open"],
|
||||
#{$element}[data-domain="fan"][data-state="on"],
|
||||
#{$element}[data-domain="humidifier"][data-state="on"],
|
||||
#{$element}[data-domain="light"][data-state="on"],
|
||||
#{$element}[data-domain="input_boolean"][data-state="on"],
|
||||
#{$element}[data-domain="lock"][data-state="unlocked"],
|
||||
#{$element}[data-domain="media_player"][data-state="on"],
|
||||
#{$element}[data-domain="media_player"][data-state="paused"],
|
||||
#{$element}[data-domain="media_player"][data-state="playing"],
|
||||
#{$element}[data-domain="script"][data-state="on"],
|
||||
#{$element}[data-domain="sun"][data-state="above_horizon"],
|
||||
#{$element}[data-domain="switch"][data-state="on"],
|
||||
#{$element}[data-domain="timer"][data-state="active"],
|
||||
#{$element}[data-domain="vacuum"][data-state="cleaning"],
|
||||
#{$element}[data-domain="group"][data-state="on"],
|
||||
#{$element}[data-domain="group"][data-state="home"],
|
||||
#{$element}[data-domain="group"][data-state="open"],
|
||||
#{$element}[data-domain="group"][data-state="locked"],
|
||||
#{$element}[data-domain="group"][data-state="problem"] {
|
||||
#{$element}[data-domain='alert'][data-state='on'],
|
||||
#{$element}[data-domain='automation'][data-state='on'],
|
||||
#{$element}[data-domain='binary_sensor'][data-state='on'],
|
||||
#{$element}[data-domain='calendar'][data-state='on'],
|
||||
#{$element}[data-domain='camera'][data-state='streaming'],
|
||||
#{$element}[data-domain='cover'][data-state='open'],
|
||||
#{$element}[data-domain='fan'][data-state='on'],
|
||||
#{$element}[data-domain='humidifier'][data-state='on'],
|
||||
#{$element}[data-domain='light'][data-state='on'],
|
||||
#{$element}[data-domain='input_boolean'][data-state='on'],
|
||||
#{$element}[data-domain='lock'][data-state='unlocked'],
|
||||
#{$element}[data-domain='media_player'][data-state='on'],
|
||||
#{$element}[data-domain='media_player'][data-state='paused'],
|
||||
#{$element}[data-domain='media_player'][data-state='playing'],
|
||||
#{$element}[data-domain='script'][data-state='on'],
|
||||
#{$element}[data-domain='sun'][data-state='above_horizon'],
|
||||
#{$element}[data-domain='switch'][data-state='on'],
|
||||
#{$element}[data-domain='timer'][data-state='active'],
|
||||
#{$element}[data-domain='vacuum'][data-state='cleaning'],
|
||||
#{$element}[data-domain='group'][data-state='on'],
|
||||
#{$element}[data-domain='group'][data-state='home'],
|
||||
#{$element}[data-domain='group'][data-state='open'],
|
||||
#{$element}[data-domain='group'][data-state='locked'],
|
||||
#{$element}[data-domain='group'][data-state='problem'] {
|
||||
color: var(--paper-item-icon-active-color, #fdd835);
|
||||
}
|
||||
|
||||
#{$element}[data-domain="climate"][data-state="cooling"] {
|
||||
#{$element}[data-domain='climate'][data-state='cooling'] {
|
||||
color: var(--cool-color, var(--state-climate-cool-color));
|
||||
}
|
||||
|
||||
#{$element}[data-domain="climate"][data-state="heating"] {
|
||||
#{$element}[data-domain='climate'][data-state='heating'] {
|
||||
color: var(--heat-color, var(--state-climate-heat-color));
|
||||
}
|
||||
|
||||
#{$element}[data-domain="climate"][data-state="drying"] {
|
||||
#{$element}[data-domain='climate'][data-state='drying'] {
|
||||
color: var(--dry-color, var(--state-climate-dry-color));
|
||||
}
|
||||
|
||||
#{$element}[data-domain="alarm_control_panel"] {
|
||||
#{$element}[data-domain='alarm_control_panel'] {
|
||||
color: var(--alarm-color-armed, var(--label-badge-red));
|
||||
}
|
||||
#{$element}[data-domain="alarm_control_panel"][data-state="disarmed"] {
|
||||
#{$element}[data-domain='alarm_control_panel'][data-state='disarmed'] {
|
||||
color: var(--alarm-color-disarmed, var(--label-badge-green));
|
||||
}
|
||||
#{$element}[data-domain="alarm_control_panel"][data-state="pending"],
|
||||
#{$element}[data-domain="alarm_control_panel"][data-state="arming"] {
|
||||
#{$element}[data-domain='alarm_control_panel'][data-state='pending'],
|
||||
#{$element}[data-domain='alarm_control_panel'][data-state='arming'] {
|
||||
color: var(--alarm-color-pending, var(--label-badge-yellow));
|
||||
animation: pulse 1s infinite;
|
||||
}
|
||||
#{$element}[data-domain="alarm_control_panel"][data-state="triggered"] {
|
||||
#{$element}[data-domain='alarm_control_panel'][data-state='triggered'] {
|
||||
color: var(--alarm-color-triggered, var(--label-badge-red));
|
||||
animation: pulse 1s infinite;
|
||||
}
|
||||
|
||||
#{$element}[data-domain="plant"][data-state="problem"],
|
||||
#{$element}[data-domain="zwave"][data-state="dead"] {
|
||||
#{$element}[data-domain='plant'][data-state='problem'],
|
||||
#{$element}[data-domain='zwave'][data-state='dead'] {
|
||||
color: var(--state-icon-error-color);
|
||||
}
|
||||
|
||||
/* Color the icon if unavailable */
|
||||
#{$element}[data-state="unavailable"] {
|
||||
#{$element}[data-state='unavailable'] {
|
||||
color: var(--state-unavailable-color);
|
||||
}
|
||||
}
|
||||
|
||||
@include state-icon("ha-icon");
|
||||
@include state-icon("ha-icon-button");
|
||||
@include state-icon('ha-icon');
|
||||
@include state-icon('ha-icon-button');
|
||||
|
||||
@@ -27,10 +27,12 @@ div.control-surround {
|
||||
}
|
||||
right: 100%;
|
||||
}
|
||||
:host([empty]), :host([empty]) > * {
|
||||
:host([empty]),
|
||||
:host([empty]) > * {
|
||||
visibility: hidden;
|
||||
}
|
||||
:host(:not([empty])), :host(:not([empty])) > * {
|
||||
:host(:not([empty])),
|
||||
:host(:not([empty])) > * {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@@ -47,7 +49,8 @@ ha-icon.control {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
:host([open]) ha-icon.control, ha-icon.control:hover {
|
||||
:host([open]) ha-icon.control,
|
||||
ha-icon.control:hover {
|
||||
// When the drawer is open or hovered make the button to close it more
|
||||
// prominent.
|
||||
opacity: 1;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
@use 'media-layout.scss';
|
||||
|
||||
img, video {
|
||||
img,
|
||||
video {
|
||||
@include media-layout.media-layout();
|
||||
}
|
||||
+1
-1
@@ -154,7 +154,7 @@ div.opposing {
|
||||
********************************************/
|
||||
|
||||
:host([data-style='overlay']),
|
||||
:host([data-style*=hover]),
|
||||
:host([data-style*='hover']),
|
||||
:host([data-style='hidden']) {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -22,7 +22,10 @@ ha-icon {
|
||||
vertical-align: top;
|
||||
margin: 0;
|
||||
|
||||
border-radius: var(--frigate-card-css-border-radius, var(--ha-card-border-radius, 4px));
|
||||
border-radius: var(
|
||||
--frigate-card-css-border-radius,
|
||||
var(--ha-card-border-radius, 4px)
|
||||
);
|
||||
|
||||
max-width: var(--frigate-card-thumbnail-size);
|
||||
max-height: 100%;
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
|
||||
border: 1px solid var(--secondary-color);
|
||||
background-color: var(--secondary-background-color);
|
||||
border-radius: var(--frigate-card-css-border-radius, var(--ha-card-border-radius, 4px));
|
||||
border-radius: var(
|
||||
--frigate-card-css-border-radius,
|
||||
var(--ha-card-border-radius, 4px)
|
||||
);
|
||||
box-sizing: border-box;
|
||||
|
||||
color: var(--primary-text-color);
|
||||
|
||||
+10
-4
@@ -16,7 +16,10 @@
|
||||
|
||||
:host([details]) {
|
||||
border: 1px solid var(--primary-color);
|
||||
border-radius: var(--frigate-card-css-border-radius, var(--ha-card-border-radius, 4px));
|
||||
border-radius: var(
|
||||
--frigate-card-css-border-radius,
|
||||
var(--ha-card-border-radius, 4px)
|
||||
);
|
||||
padding: 2px;
|
||||
|
||||
// When details are enabled, use a background color so that the details have
|
||||
@@ -36,10 +39,12 @@ ha-icon {
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;
|
||||
transition:
|
||||
opacity 0.2s ease-in-out,
|
||||
color 0.2s ease-in-out;
|
||||
}
|
||||
ha-icon:hover {
|
||||
opacity: 1.0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
ha-icon.star {
|
||||
@@ -60,6 +65,7 @@ ha-icon.download {
|
||||
bottom: 3px;
|
||||
}
|
||||
|
||||
frigate-card-thumbnail-details-event, frigate-card-thumbnail-details-recording {
|
||||
frigate-card-thumbnail-details-event,
|
||||
frigate-card-thumbnail-details-recording {
|
||||
flex: 1;
|
||||
}
|
||||
@@ -59,7 +59,9 @@ div.timeline {
|
||||
color: var(--primary-text-color);
|
||||
background-color: var(--primary-color);
|
||||
|
||||
transition: background-color ease-in-out 1s, border-color ease-in-out 1s,
|
||||
transition:
|
||||
background-color ease-in-out 1s,
|
||||
border-color ease-in-out 1s,
|
||||
box-shadow ease-in-out 1s;
|
||||
}
|
||||
.vis-item.vis-selected {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { HomeAssistant } from "@dermotduffy/custom-card-helpers";
|
||||
import { HassEntity } from "home-assistant-js-websocket";
|
||||
import { CameraConfig } from "../config/types.js";
|
||||
import { dispatchErrorMessageEvent } from "../components/message.js";
|
||||
import { localize } from "../localize/localize.js";
|
||||
import { HomeAssistant } from '@dermotduffy/custom-card-helpers';
|
||||
import { HassEntity } from 'home-assistant-js-websocket';
|
||||
import { CameraConfig } from '../config/types.js';
|
||||
import { dispatchErrorMessageEvent } from '../components/message.js';
|
||||
import { localize } from '../localize/localize.js';
|
||||
|
||||
/**
|
||||
* Get the state object or dispatch an error. Used in `ha` and `image` live
|
||||
|
||||
@@ -6,7 +6,7 @@ const deviceSchema = z.object({
|
||||
model: z.string().nullable(),
|
||||
config_entries: z.string().array(),
|
||||
manufacturer: z.string().nullable(),
|
||||
})
|
||||
});
|
||||
const deviceListSchema = deviceSchema.array();
|
||||
export type DeviceList = z.infer<typeof deviceListSchema>;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
HassEntity,
|
||||
HassEntityAttributeBase,
|
||||
HassEntityBase
|
||||
HassEntityBase,
|
||||
} from 'home-assistant-js-websocket';
|
||||
|
||||
const UPDATE_SUPPORT_PROGRESS = 4;
|
||||
|
||||
@@ -52,7 +52,12 @@ const FIXED_DOMAIN_ICONS = {
|
||||
zone: 'mdi:map-marker-radius',
|
||||
};
|
||||
|
||||
export function domainIcon(domain: string, entity?: HassEntity, state?: string, defaultIcon?: string): string {
|
||||
export function domainIcon(
|
||||
domain: string,
|
||||
entity?: HassEntity,
|
||||
state?: string,
|
||||
defaultIcon?: string,
|
||||
): string {
|
||||
switch (domain) {
|
||||
case 'alarm_control_panel':
|
||||
return alarmPanelIcon(state);
|
||||
|
||||
@@ -70,10 +70,7 @@ const batteryStateIcon = (
|
||||
return batteryIcon(battery, batteryCharging);
|
||||
};
|
||||
|
||||
const batteryIcon = (
|
||||
batteryState: number | string,
|
||||
batteryCharging?: boolean,
|
||||
) => {
|
||||
const batteryIcon = (batteryState: number | string, batteryCharging?: boolean) => {
|
||||
const batteryValue = Number(batteryState);
|
||||
if (isNaN(batteryValue)) {
|
||||
if (batteryState === 'off') {
|
||||
|
||||
@@ -62,7 +62,7 @@ export const changeViewToRecentEventsForCameraAndDependents = async (
|
||||
targetView: options?.targetView,
|
||||
select: options?.select,
|
||||
useCache: options?.useCache,
|
||||
viewContext: options?.viewContext
|
||||
viewContext: options?.viewContext,
|
||||
},
|
||||
)
|
||||
)?.dispatchChangeEvent(element);
|
||||
@@ -201,7 +201,7 @@ export const executeMediaQueryForView = async (
|
||||
camera: cameraID,
|
||||
})
|
||||
.mergeInContext(options?.viewContext)
|
||||
.mergeInContext(viewerContext)
|
||||
.mergeInContext(viewerContext);
|
||||
};
|
||||
|
||||
export const executeMediaQueryForViewWithErrorDispatching = async (
|
||||
|
||||
@@ -1125,7 +1125,7 @@ describe('CameraManager', async () => {
|
||||
const action = {
|
||||
action: 'call-service' as const,
|
||||
service: 'service',
|
||||
}
|
||||
};
|
||||
const manager = createCameraManager(api, engine, [
|
||||
{
|
||||
config: createCameraConfig({
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('getConfiguredPTZAction', () => {
|
||||
createCameraConfig({
|
||||
ptz: {
|
||||
presets: {
|
||||
window: action
|
||||
window: action,
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -145,7 +145,7 @@ describe('ActionsManager', () => {
|
||||
createConfig({
|
||||
view: {
|
||||
actions: {
|
||||
tap_action: createLogAction("Hello, world!"),
|
||||
tap_action: createLogAction('Hello, world!'),
|
||||
},
|
||||
},
|
||||
}),
|
||||
@@ -174,7 +174,7 @@ describe('ActionsManager', () => {
|
||||
createConfig({
|
||||
view: {
|
||||
actions: {
|
||||
tap_action: createLogAction("Hello, world!"),
|
||||
tap_action: createLogAction('Hello, world!'),
|
||||
},
|
||||
},
|
||||
}),
|
||||
@@ -202,7 +202,7 @@ describe('ActionsManager', () => {
|
||||
});
|
||||
|
||||
it('should handle event', () => {
|
||||
const action = createLogAction("Hello, world!");
|
||||
const action = createLogAction('Hello, world!');
|
||||
const event = new CustomEvent('ll-custom', {
|
||||
detail: action,
|
||||
});
|
||||
@@ -232,7 +232,7 @@ describe('ActionsManager', () => {
|
||||
const consoleSpy = vi.spyOn(global.console, 'info').mockReturnValue(undefined);
|
||||
await manager.handleActionExecutionRequestEvent(
|
||||
new CustomEvent('frigate-card:action:execution-request', {
|
||||
detail: { action: createLogAction("Hello, world!") },
|
||||
detail: { action: createLogAction('Hello, world!') },
|
||||
}),
|
||||
);
|
||||
expect(consoleSpy).toBeCalled();
|
||||
@@ -245,7 +245,7 @@ describe('ActionsManager', () => {
|
||||
const manager = new ActionsManager(api);
|
||||
|
||||
const consoleSpy = vi.spyOn(global.console, 'info').mockReturnValue(undefined);
|
||||
await manager.executeActions(createLogAction("Hello, world!"));
|
||||
await manager.executeActions(createLogAction('Hello, world!'));
|
||||
expect(consoleSpy).toBeCalled();
|
||||
});
|
||||
});
|
||||
@@ -271,7 +271,7 @@ describe('ActionsManager', () => {
|
||||
m: 1,
|
||||
},
|
||||
})!,
|
||||
createLogAction("Hello, world!"),
|
||||
createLogAction('Hello, world!'),
|
||||
]);
|
||||
|
||||
// Stop inflight actions.
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
import { expect, it } from "vitest";
|
||||
import { DefaultAction } from "../../../../src/card-controller/actions/actions/default";
|
||||
import { createCardAPI } from "../../../test-utils";
|
||||
import { expect, it } from 'vitest';
|
||||
import { DefaultAction } from '../../../../src/card-controller/actions/actions/default';
|
||||
import { createCardAPI } from '../../../test-utils';
|
||||
|
||||
it('should handle default action', async () => {
|
||||
const api = createCardAPI();
|
||||
const action = new DefaultAction({}, {
|
||||
const action = new DefaultAction(
|
||||
{},
|
||||
{
|
||||
action: 'fire-dom-event',
|
||||
frigate_card_action: 'default',
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
await action.execute(api);
|
||||
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
import { expect, it } from "vitest";
|
||||
import { DisplayModeSelectAction } from "../../../../src/card-controller/actions/actions/display-mode-select";
|
||||
import { createCardAPI } from "../../../test-utils";
|
||||
import { expect, it } from 'vitest';
|
||||
import { DisplayModeSelectAction } from '../../../../src/card-controller/actions/actions/display-mode-select';
|
||||
import { createCardAPI } from '../../../test-utils';
|
||||
|
||||
it('should handle default action', async () => {
|
||||
const api = createCardAPI();
|
||||
const action = new DisplayModeSelectAction({}, {
|
||||
const action = new DisplayModeSelectAction(
|
||||
{},
|
||||
{
|
||||
action: 'fire-dom-event',
|
||||
frigate_card_action: 'display_mode_select',
|
||||
display_mode: 'grid',
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
await action.execute(api);
|
||||
|
||||
|
||||
@@ -430,15 +430,12 @@ describe('should handle ptz action', () => {
|
||||
);
|
||||
|
||||
const context = {};
|
||||
const startAction = new PTZAction(
|
||||
context,
|
||||
{
|
||||
const startAction = new PTZAction(context, {
|
||||
action: 'fire-dom-event',
|
||||
frigate_card_action: 'ptz',
|
||||
ptz_action: 'left',
|
||||
ptz_phase: 'start',
|
||||
},
|
||||
);
|
||||
});
|
||||
await startAction.execute(api);
|
||||
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledWith(
|
||||
@@ -450,25 +447,22 @@ describe('should handle ptz action', () => {
|
||||
);
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(1);
|
||||
|
||||
await vi.runOnlyPendingTimersAsync()
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(2);
|
||||
|
||||
await vi.runOnlyPendingTimersAsync()
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(3);
|
||||
|
||||
const stopAction = new PTZAction(
|
||||
context,
|
||||
{
|
||||
const stopAction = new PTZAction(context, {
|
||||
action: 'fire-dom-event',
|
||||
frigate_card_action: 'ptz',
|
||||
ptz_action: 'left',
|
||||
ptz_phase: 'stop',
|
||||
},
|
||||
);
|
||||
});
|
||||
await stopAction.execute(api);
|
||||
|
||||
// There should be no additional calls.
|
||||
await vi.runOnlyPendingTimersAsync()
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(3);
|
||||
});
|
||||
|
||||
@@ -500,11 +494,11 @@ describe('should handle ptz action', () => {
|
||||
await action.execute(api);
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(1);
|
||||
|
||||
await vi.runOnlyPendingTimersAsync()
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(2);
|
||||
|
||||
action.stop();
|
||||
await vi.runOnlyPendingTimersAsync()
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
|
||||
// There should be no additional calls.
|
||||
expect(api.getCameraManager().executePTZAction).toBeCalledTimes(2);
|
||||
|
||||
@@ -18,7 +18,7 @@ it('should handle sleep action', async () => {
|
||||
frigate_card_action: 'sleep',
|
||||
duration: {
|
||||
s: 5,
|
||||
ms: 200
|
||||
ms: 200,
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { CameraEndpoint } from '../../src/camera-manager/types';
|
||||
import { CameraURLManager } from '../../src/card-controller/camera-url-manager';
|
||||
import {
|
||||
CardCameraURLAPI
|
||||
} from '../../src/card-controller/types';
|
||||
import { CardCameraURLAPI } from '../../src/card-controller/types';
|
||||
import { createCardAPI, createViewWithMedia } from '../test-utils';
|
||||
|
||||
const createAPIWithMedia = (): CardCameraURLAPI => {
|
||||
const api = createCardAPI();
|
||||
vi.mocked(api.getViewManager().getView).mockReturnValue(
|
||||
createViewWithMedia()
|
||||
)
|
||||
vi.mocked(api.getViewManager().getView).mockReturnValue(createViewWithMedia());
|
||||
return api;
|
||||
};
|
||||
|
||||
|
||||
@@ -53,11 +53,9 @@ describe('FullscreenManager', () => {
|
||||
|
||||
it('should toggle fullscreen', () => {
|
||||
const toggle = vi.mocked(screenfull.toggle);
|
||||
const element = document.createElement('div')
|
||||
const element = document.createElement('div');
|
||||
const api = createCardAPI();
|
||||
vi.mocked(api.getCardElementManager().getElement).mockReturnValue(
|
||||
element,
|
||||
);
|
||||
vi.mocked(api.getCardElementManager().getElement).mockReturnValue(element);
|
||||
const manager = new FullscreenManager(api);
|
||||
|
||||
manager.toggleFullscreen();
|
||||
|
||||
@@ -3098,7 +3098,6 @@ describe('should handle version specific upgrades', () => {
|
||||
);
|
||||
postUpgradeChecks(config);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@ export const callResizeHandler = (
|
||||
height: entry.height,
|
||||
width: entry.width,
|
||||
},
|
||||
} as unknown as ResizeObserverEntry),
|
||||
}) as unknown as ResizeObserverEntry,
|
||||
),
|
||||
observer,
|
||||
);
|
||||
@@ -109,10 +109,6 @@ export const createEmblaApiInstance = (options?: {
|
||||
return emblaApi;
|
||||
};
|
||||
|
||||
export const createTestSlideNodes = (options?: {
|
||||
n?: number;
|
||||
}): HTMLElement[] => {
|
||||
return [...Array(options?.n ?? 10).keys()].map((_) =>
|
||||
document.createElement('div'),
|
||||
);
|
||||
export const createTestSlideNodes = (options?: { n?: number }): HTMLElement[] => {
|
||||
return [...Array(options?.n ?? 10).keys()].map((_) => document.createElement('div'));
|
||||
};
|
||||
|
||||
@@ -43,7 +43,10 @@ describe('hasSubstream/getStreamCameraID', () => {
|
||||
camera: 'camera',
|
||||
context: {
|
||||
live: {
|
||||
overrides: new Map([['camera', 'camera2'], ['camera3', 'camera4']]),
|
||||
overrides: new Map([
|
||||
['camera', 'camera2'],
|
||||
['camera3', 'camera4'],
|
||||
]),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('ViewMedia', () => {
|
||||
const fakeNow = new Date('2023-08-08T17:15:00');
|
||||
vi.setSystemTime(fakeNow);
|
||||
|
||||
expect(media.getUsableEndTime()).toEqual(fakeNow)
|
||||
expect(media.getUsableEndTime()).toEqual(fakeNow);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -3365,14 +3365,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-config-prettier@npm:^8.5.0":
|
||||
version: 8.10.0
|
||||
resolution: "eslint-config-prettier@npm:8.10.0"
|
||||
"eslint-config-prettier@npm:^9.1.0":
|
||||
version: 9.1.0
|
||||
resolution: "eslint-config-prettier@npm:9.1.0"
|
||||
peerDependencies:
|
||||
eslint: ">=7.0.0"
|
||||
bin:
|
||||
eslint-config-prettier: bin/cli.js
|
||||
checksum: 10c0/19f8c497d9bdc111a17a61b25ded97217be3755bbc4714477dfe535ed539dddcaf42ef5cf8bb97908b058260cf89a3d7c565cb0be31096cbcd39f4c2fa5fe43c
|
||||
checksum: 10c0/6d332694b36bc9ac6fdb18d3ca2f6ac42afa2ad61f0493e89226950a7091e38981b66bac2b47ba39d15b73fff2cd32c78b850a9cf9eed9ca9a96bfb2f3a2f10d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3426,21 +3426,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-plugin-prettier@npm:^4.2.1":
|
||||
version: 4.2.1
|
||||
resolution: "eslint-plugin-prettier@npm:4.2.1"
|
||||
dependencies:
|
||||
prettier-linter-helpers: "npm:^1.0.0"
|
||||
peerDependencies:
|
||||
eslint: ">=7.28.0"
|
||||
prettier: ">=2.0.0"
|
||||
peerDependenciesMeta:
|
||||
eslint-config-prettier:
|
||||
optional: true
|
||||
checksum: 10c0/c5e7316baeab9d96ac39c279f16686e837277e5c67a8006c6588bcff317edffdc1532fb580441eb598bc6770f6444006756b68a6575dff1cd85ebe227252d0b7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-scope@npm:^7.2.2":
|
||||
version: 7.2.2
|
||||
resolution: "eslint-scope@npm:7.2.2"
|
||||
@@ -3641,13 +3626,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-diff@npm:^1.1.2":
|
||||
version: 1.3.0
|
||||
resolution: "fast-diff@npm:1.3.0"
|
||||
checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9":
|
||||
version: 3.3.2
|
||||
resolution: "fast-glob@npm:3.3.2"
|
||||
@@ -3853,9 +3831,8 @@ __metadata:
|
||||
embla-carousel-wheel-gestures: "npm:8.0.0-rc04"
|
||||
eslint: "npm:^8.57.0"
|
||||
eslint-config-airbnb-base: "npm:^15.0.0"
|
||||
eslint-config-prettier: "npm:^8.5.0"
|
||||
eslint-config-prettier: "npm:^9.1.0"
|
||||
eslint-plugin-import: "npm:^2.25.4"
|
||||
eslint-plugin-prettier: "npm:^4.2.1"
|
||||
home-assistant-js-websocket: "npm:^8.0.0"
|
||||
jsdom: "npm:^21.1.1"
|
||||
keycharm: "npm:^0.4.0"
|
||||
@@ -3865,7 +3842,7 @@ __metadata:
|
||||
masonry-layout: "npm:^4.2.2"
|
||||
moment: "npm:^2.29.4"
|
||||
p-queue: "npm:^8.0.1"
|
||||
prettier: "npm:^2.6.0"
|
||||
prettier: "npm:^3.3.1"
|
||||
propagating-hammerjs: "npm:^2.0.1"
|
||||
quick-lru: "npm:^6.1.0"
|
||||
rollup: "npm:^2.79.0"
|
||||
@@ -6836,21 +6813,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prettier-linter-helpers@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "prettier-linter-helpers@npm:1.0.0"
|
||||
dependencies:
|
||||
fast-diff: "npm:^1.1.2"
|
||||
checksum: 10c0/81e0027d731b7b3697ccd2129470ed9913ecb111e4ec175a12f0fcfab0096516373bf0af2fef132af50cafb0a905b74ff57996d615f59512bb9ac7378fcc64ab
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prettier@npm:^2.6.0":
|
||||
version: 2.8.8
|
||||
resolution: "prettier@npm:2.8.8"
|
||||
"prettier@npm:^3.3.1":
|
||||
version: 3.3.1
|
||||
resolution: "prettier@npm:3.3.1"
|
||||
bin:
|
||||
prettier: bin-prettier.js
|
||||
checksum: 10c0/463ea8f9a0946cd5b828d8cf27bd8b567345cf02f56562d5ecde198b91f47a76b7ac9eae0facd247ace70e927143af6135e8cf411986b8cb8478784a4d6d724a
|
||||
prettier: bin/prettier.cjs
|
||||
checksum: 10c0/c25a709c9f0be670dc6bcb190b622347e1dbeb6c3e7df8b0711724cb64d8647c60b839937a4df4df18e9cfb556c2b08ca9d24d9645eb5488a7fc032a2c4d5cb3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user