Add initial keyboard shortcut support.
This commit is contained in:
@@ -39,5 +39,5 @@ Only the `cameras` option is required, all other parameters are optional.
|
||||
|
||||
| Option | Description |
|
||||
| - | - |
|
||||
| [`actions`](actions.md) | Configure actions. |
|
||||
| [`actions`](actions/README.md) | Configure actions. |
|
||||
| [`conditions`](conditions.md) | Configure conditions. |
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
* [Getting Started](../README.md)
|
||||
* [Configuration](README.md)
|
||||
* [`actions`](actions.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)
|
||||
* [`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)
|
||||
|
||||
@@ -1,553 +0,0 @@
|
||||
# `actions`
|
||||
|
||||
## Introduction to actions
|
||||
|
||||
`actions` is not a top-level configuration block, but can be used as part of
|
||||
multiple other blocks.
|
||||
|
||||
Actions are pre-configured activities that can be triggered in response to a
|
||||
variety of circumstances (e.g. tapping on a menu icon, double tapping on an
|
||||
[element](./elements.md) or holding the mouse/tap down on a particular
|
||||
[view](./view.md?id=supported-views)).
|
||||
|
||||
### Differences in actions between Frigate Card and Home Assistant
|
||||
|
||||
Both the Home Assistant frontend and the Frigate card cooperate to provide
|
||||
action functionality. In general, the Frigate Card functionality is a superset
|
||||
of that offered by stock Home Assistant.
|
||||
|
||||
Stock action functionality is used for Stock [Home Assistant picture
|
||||
elements](https://www.home-assistant.io/lovelace/picture-elements/). Extended
|
||||
Frigate card behavior covers all other interactions on the Frigate card (e.g.
|
||||
menu icon elements, submenus and actions on the card or views).
|
||||
|
||||
#### Custom action types: `start_tap` and `end_tap`
|
||||
|
||||
The card has partial support for two special action types `start_tap` and
|
||||
`end_tap` which occur when a tap is started (e.g. mouse is pressed down /
|
||||
touch begins), and ended (e.g. mouse released / touch ends) respectively. This
|
||||
might be useful for PTZ cameras cameras to start/stop movement on touch. Network
|
||||
latency may introduce unavoidable imprecision between `end_tap` and action
|
||||
actually occurring.
|
||||
|
||||
#### Multiple actions
|
||||
|
||||
Extended Frigate card behavior supports a list of actions instead of a single
|
||||
action, all of which will be handled. See [an example of multiple
|
||||
actions](../examples.md?id=multiple-actions).
|
||||
|
||||
## Card and view actions
|
||||
|
||||
Actions may be attached to the card itself, to trigger action when the card
|
||||
experiences a `tap`, `double_tap`, `hold`, `start_tap` or `end_tap` event.
|
||||
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` |
|
||||
| `media_viewer.actions` | `clip`, `snapshot`, `recording` |
|
||||
| `view.actions` | All |
|
||||
|
||||
If an action is configured for both the whole card (`view.actions`) and a more
|
||||
specific view (e.g. `live.actions`) then the actions are merged, with the more
|
||||
specific overriding the less specific.
|
||||
|
||||
!> The card itself relies on user interactions to function (e.g. `tap` on
|
||||
the menu should activate that button). Card or View actions are prevented from
|
||||
being activated through standard interaction with menu buttons, next/previous
|
||||
controls, thumbnails, etc, but in some cases this prevention is not possible
|
||||
(e.g. embedded WebRTC card controls) -- in these cases duplicate actions may
|
||||
occur with certain configurations (e.g. `tap`).
|
||||
|
||||
!> Card-wide actions are not supported on timelines nor when a info/error message
|
||||
is being displayed.
|
||||
|
||||
## `call-service`
|
||||
|
||||
Call a service. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: call-service
|
||||
[...]
|
||||
```
|
||||
|
||||
## `custom:frigate-card-action`
|
||||
|
||||
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. |
|
||||
|
||||
### `camera_select`
|
||||
|
||||
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. |
|
||||
| `triggered` | If `true` instead of `camera` being specified then a triggered camera (if any) is selected instead. |
|
||||
|
||||
This action will respect the value of the `view.camera_select` to choose the appropriate view on the new camera. See [`view` configuration](view.md).
|
||||
|
||||
### `camera_ui`
|
||||
|
||||
Download the displayed media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_ui
|
||||
```
|
||||
|
||||
Open the UI for the selected camera engine (e.g. the Frigate UI).
|
||||
|
||||
### `change_zoom`
|
||||
|
||||
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. |
|
||||
| `zoom` | Optional parameter that controls how much to zoom-in. See the [camera zoom parameter](cameras/README.md?id=layout-configuration). |
|
||||
| `pan` | Optional parameter that controls how much to pan-x/y. See the [camera pan parameter](cameras/README.md?id=layout-configuration). |
|
||||
|
||||
?> If neither `zoom` nor `pan` are specified the camera will return to its default zoom and pan settings.
|
||||
|
||||
See [example of automatically zoom/panning based on state](../examples.md?id=automatically-zoom-based-on-state).
|
||||
|
||||
### `clip`, `clips`, `image`, `live`, `recording`, `recordings`, `snapshot`, `snapshots`
|
||||
|
||||
Change to the specified view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: [view]
|
||||
```
|
||||
|
||||
### `default`
|
||||
|
||||
Change to the default view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: default
|
||||
```
|
||||
|
||||
### `download`
|
||||
|
||||
Download the displayed media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: download
|
||||
```
|
||||
|
||||
### `expand`
|
||||
|
||||
Expand the card into a dialog/popup.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: expand
|
||||
```
|
||||
|
||||
### `fullscreen`
|
||||
|
||||
Toggle fullscreen.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: fullscreen
|
||||
```
|
||||
|
||||
### `live_substream_select`
|
||||
|
||||
Select a substream.
|
||||
|
||||
```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. |
|
||||
|
||||
### `media_player`
|
||||
|
||||
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. |
|
||||
| `media_player_action` | Either `play` or `stop` to play or stop the media in question. |
|
||||
|
||||
### `menu_toggle`
|
||||
|
||||
Show/hide the menu (for the `hidden` mode style).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: menu_toggle
|
||||
```
|
||||
|
||||
### `microphone_mute`, `microphone_unmute`
|
||||
|
||||
Mute/Unmute the microphone during [2-way audio](../usage/2-way-audio.md).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: microphone_mute
|
||||
```
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: microphone_unmute
|
||||
```
|
||||
|
||||
### `mute`, `unmute`
|
||||
|
||||
Mute/Unmute the selected media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: mute
|
||||
```
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: unmute
|
||||
```
|
||||
|
||||
### `play`, `pause`
|
||||
|
||||
Play/Pause the selected media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: play
|
||||
```
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: pause
|
||||
```
|
||||
|
||||
### `ptz`
|
||||
|
||||
Execute a native PTZ action (only for native out-of-the-box PTZ camera engines, e.g. Frigate).
|
||||
|
||||
Takes a required `ptz_action` parameter that is one of .
|
||||
|
||||
```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`. |
|
||||
| `ptz_action` | One of `left`, `right`, `up`, `down`, `zoom_in`, `zoom_out` or `preset`. |
|
||||
| `ptz_phase` | Optional parameter that is one of `start` or `stop` to start or stop the movement separately. |
|
||||
| `ptz_preset` | Optional preset to execute when the `ptz_action` is `preset`. |
|
||||
|
||||
### `screenshot`
|
||||
|
||||
Take a screenshot of the selected media (e.g. a still from a video).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: screenshot
|
||||
```
|
||||
|
||||
### `show_ptz`
|
||||
|
||||
Show or hide the PTZ controls.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: show_ptz
|
||||
[...]
|
||||
```
|
||||
|
||||
| Parameter | Description |
|
||||
| - | - |
|
||||
| `action` | Must be `custom:frigate-card-action`. |
|
||||
| `frigate_card_action` | Must be `show_ptz`. |
|
||||
| `show_ptz` | If `true` shows the PTZ controls, if `false` hides them. |
|
||||
|
||||
## `more-info`
|
||||
|
||||
Open the "more-info" dialog for an entity. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: more-info
|
||||
[...]
|
||||
```
|
||||
|
||||
## `navigate`
|
||||
|
||||
Navigate to a particular dashboard path. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: navigate
|
||||
[...]
|
||||
```
|
||||
|
||||
## `toggle`
|
||||
|
||||
Toggle an entity. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: toggle
|
||||
[...]
|
||||
```
|
||||
|
||||
## `url`
|
||||
|
||||
Navigate to an arbitrary URL. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: url
|
||||
[...]
|
||||
```
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
[](common/expanded-warning.md ':include')
|
||||
|
||||
### Stock Home Assistant actions
|
||||
|
||||
Reference: [Home Assistant Actions](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
elements:
|
||||
- type: icon
|
||||
icon: mdi:numeric-1-box
|
||||
title: More info action
|
||||
style:
|
||||
left: 200px
|
||||
top: 50px
|
||||
entity: light.office_main_lights
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: icon
|
||||
icon: mdi:numeric-2-box
|
||||
title: Toggle action
|
||||
style:
|
||||
left: 200px
|
||||
top: 100px
|
||||
entity: light.office_main_lights
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: icon
|
||||
icon: mdi:numeric-3-box
|
||||
title: Call Service action
|
||||
style:
|
||||
left: 200px
|
||||
top: 150px
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: homeassistant.toggle
|
||||
service_data:
|
||||
entity_id: light.office_main_lights
|
||||
- type: icon
|
||||
icon: mdi:numeric-4-box
|
||||
title: Navigate action
|
||||
style:
|
||||
left: 200px
|
||||
top: 200px
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /lovelace/2
|
||||
- type: icon
|
||||
icon: mdi:numeric-5-box
|
||||
title: URL action
|
||||
style:
|
||||
left: 200px
|
||||
top: 250px
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://www.home-assistant.io/
|
||||
- type: icon
|
||||
icon: mdi:numeric-6-box
|
||||
title: None action
|
||||
style:
|
||||
left: 200px
|
||||
top: 300px
|
||||
tap_action:
|
||||
action: none
|
||||
- type: icon
|
||||
icon: mdi:numeric-7-box
|
||||
title: Custom action
|
||||
style:
|
||||
left: 200px
|
||||
top: 350px
|
||||
tap_action:
|
||||
action: fire-dom-event
|
||||
key: value
|
||||
```
|
||||
|
||||
### Frigate Card actions
|
||||
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-a-circle
|
||||
title: Show default view
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: default
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-b-circle
|
||||
title: Show most recent clip
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: clip
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-c-circle
|
||||
title: Show clips
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: clips
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-d-circle
|
||||
title: Show image view
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: image
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-e-circle
|
||||
title: Show live view
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-f-circle
|
||||
title: Show most recent snapshot
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: snapshot
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-g-circle
|
||||
title: Show snapshots
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: snapshots
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-h-circle
|
||||
title: Download media
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: download
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-i-circle
|
||||
title: Open Frigate UI
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_ui
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-j-circle
|
||||
title: Change to fullscreen
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: fullscreen
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-k-circle
|
||||
title: Toggle hidden menu
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: menu_toggle
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-l-circle
|
||||
title: Select Front Door
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_select
|
||||
camera: camera.front_door
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-m-circle
|
||||
title: Media player play
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: media_player
|
||||
media_player: media_player.nesthub50be
|
||||
media_player_action: play
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-n-circle
|
||||
title: Media player stop
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: media_player
|
||||
media_player: media_player.nesthub
|
||||
media_player_action: stop
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-o-circle
|
||||
title: Screenshot
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: screenshot
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-p-circle
|
||||
title: Show PTZ
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: show_ptz
|
||||
show_ptz: true
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-q-circle
|
||||
title: Native PTZ Preset
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz
|
||||
ptz_action: preset
|
||||
ptz_preset: doorway
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-r-circle
|
||||
title: Change Zoom
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: change_zoom
|
||||
pan:
|
||||
x: 50
|
||||
y: 50
|
||||
zoom: 1
|
||||
```
|
||||
@@ -0,0 +1,73 @@
|
||||
# `actions`
|
||||
|
||||
## Introduction to actions <!-- {docsify-ignore} -->
|
||||
|
||||
`actions` is not a top-level configuration block, but can be used as part of
|
||||
multiple other blocks.
|
||||
|
||||
Actions are pre-configured activities that can be triggered in response to a
|
||||
variety of circumstances (e.g. tapping on a menu icon, double tapping on an
|
||||
[element](../elements.md) or holding the mouse/tap down on a particular
|
||||
[view](../view.md?id=supported-views)).
|
||||
|
||||
### Differences in actions between Frigate Card and Home Assistant
|
||||
|
||||
Both the Home Assistant frontend and the Frigate card cooperate to provide
|
||||
action functionality. In general, the Frigate Card functionality is a superset
|
||||
of that offered by stock Home Assistant.
|
||||
|
||||
Stock action functionality is used for Stock [Home Assistant picture
|
||||
elements](https://www.home-assistant.io/lovelace/picture-elements/). Extended
|
||||
Frigate card behavior covers all other interactions on the Frigate card (e.g.
|
||||
menu icon elements, submenus and actions on the card or views).
|
||||
|
||||
#### Custom action types: `start_tap` and `end_tap`
|
||||
|
||||
The card has partial support for two special action types `start_tap` and
|
||||
`end_tap` which occur when a tap is started (e.g. mouse is pressed down /
|
||||
touch begins), and ended (e.g. mouse released / touch ends) respectively. This
|
||||
might be useful for PTZ cameras cameras to start/stop movement on touch. Network
|
||||
latency may introduce unavoidable imprecision between `end_tap` and action
|
||||
actually occurring.
|
||||
|
||||
#### Multiple actions
|
||||
|
||||
Extended Frigate card behavior supports a list of actions instead of a single
|
||||
action, all of which will be handled. See [an example of multiple
|
||||
actions](../../examples.md?id=multiple-actions).
|
||||
|
||||
## Card and view actions <!-- {docsify-ignore} -->
|
||||
|
||||
Actions may be attached to the card itself, to trigger action when the card
|
||||
experiences a `tap`, `double_tap`, `hold`, `start_tap` or `end_tap` event.
|
||||
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` |
|
||||
| `media_viewer.actions` | `clip`, `snapshot`, `recording` |
|
||||
| `view.actions` | All except `timeline` and `diagnostic` |
|
||||
|
||||
If an action is configured for both the whole card (`view.actions`) and a more
|
||||
specific view (e.g. `live.actions`) then the actions are merged, with the more
|
||||
specific overriding the less specific.
|
||||
|
||||
!> The card itself relies on user interactions to function (e.g. `tap` on
|
||||
the menu should activate that button). Card or View actions are prevented from
|
||||
being activated through standard interaction with menu buttons, next/previous
|
||||
controls, thumbnails, etc, but in some cases this prevention is not possible
|
||||
(e.g. embedded WebRTC card controls) -- in these cases duplicate actions may
|
||||
occur with certain configurations (e.g. `tap`).
|
||||
|
||||
!> Card-wide actions are not supported on the `timeline` view, `diagnostics`
|
||||
view nor when a info/error message is being displayed.
|
||||
|
||||
## Actions <!-- {docsify-ignore} -->
|
||||
|
||||
| Option | Description |
|
||||
| ------------------------------------ | ----------------------------------- |
|
||||
| [Custom Actions](./custom/README.md) | Custom actions to control the card. |
|
||||
| [Stock Actions](./stock/README.md) | Standard Home Assistant actions. |
|
||||
@@ -0,0 +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)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../developing.md)
|
||||
@@ -0,0 +1,737 @@
|
||||
# `custom:frigate-card-action`
|
||||
|
||||
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. |
|
||||
|
||||
## `camera_select`
|
||||
|
||||
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. |
|
||||
| `triggered` | If `true` instead of `camera` being specified then a triggered camera (if any) is selected instead. |
|
||||
|
||||
This action will respect the value of the `view.camera_select` to choose the appropriate view on the new camera. See [`view` configuration](../../view.md).
|
||||
|
||||
## `camera_ui`
|
||||
|
||||
Download the displayed media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_ui
|
||||
```
|
||||
|
||||
Open the UI for the selected camera engine (e.g. the Frigate UI).
|
||||
|
||||
## `change_zoom`
|
||||
|
||||
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. |
|
||||
| `zoom` | Optional parameter that controls how much to zoom-in. See the [camera zoom parameter](../../cameras/README.md?id=layout-configuration). |
|
||||
| `pan` | Optional parameter that controls how much to pan-x/y. See the [camera pan parameter](../../cameras/README.md?id=layout-configuration). |
|
||||
|
||||
?> If neither `zoom` nor `pan` are specified the camera will return to its default zoom and pan settings.
|
||||
|
||||
See [example of automatically zoom/panning based on state](../../../examples.md?id=automatically-zoom-based-on-state).
|
||||
|
||||
## `clip`
|
||||
|
||||
Change to the `clip` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: clip
|
||||
```
|
||||
|
||||
## `clips`
|
||||
|
||||
Change to the `clips` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: clips
|
||||
```
|
||||
|
||||
## `default`
|
||||
|
||||
Change to the default view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: default
|
||||
```
|
||||
|
||||
## `diagnostics`
|
||||
|
||||
Show the card diagnostics.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: diagnostics
|
||||
```
|
||||
|
||||
## `display_mode_select`
|
||||
|
||||
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. |
|
||||
|
||||
## `download`
|
||||
|
||||
Download the displayed media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: download
|
||||
```
|
||||
|
||||
## `expand`
|
||||
|
||||
Expand the card into a dialog/popup.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: expand
|
||||
```
|
||||
|
||||
## `fullscreen`
|
||||
|
||||
Toggle fullscreen.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: fullscreen
|
||||
```
|
||||
|
||||
## `image`
|
||||
|
||||
Change to the `image` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: image
|
||||
```
|
||||
|
||||
## `live`
|
||||
|
||||
Change to the `live` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live
|
||||
```
|
||||
|
||||
## `live_substream_off`
|
||||
|
||||
Turn off the substream (if on).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
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_on`
|
||||
|
||||
Turn on the first available substream. Use [Camera dependency configuration](../../cameras/README.md?id=dependencies) to configure substreams.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
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.
|
||||
|
||||
```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. |
|
||||
|
||||
## `log`
|
||||
|
||||
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. |
|
||||
| `level` | `info` | The console logging level to use. One of `['debug', 'info', 'warn', 'error']`. |
|
||||
|
||||
## `media_player`
|
||||
|
||||
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. |
|
||||
| `media_player_action` | Either `play` or `stop` to play or stop the media in question. |
|
||||
|
||||
## `menu_toggle`
|
||||
|
||||
Show/hide the menu (for the `hidden` mode style).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: menu_toggle
|
||||
```
|
||||
|
||||
## `microphone_mute`
|
||||
|
||||
Mute the microphone during [2-way audio](../../../usage/2-way-audio.md).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: microphone_mute
|
||||
```
|
||||
|
||||
## `microphone_unmute`
|
||||
|
||||
Unmute the microphone during [2-way audio](../../../usage/2-way-audio.md).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: microphone_unmute
|
||||
```
|
||||
|
||||
## `mute`
|
||||
|
||||
Mute the selected media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: mute
|
||||
```
|
||||
|
||||
## `pause`
|
||||
|
||||
Pause the selected media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: pause
|
||||
```
|
||||
|
||||
## `play`
|
||||
|
||||
Play the selected media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: play
|
||||
```
|
||||
|
||||
## `ptz`
|
||||
|
||||
Execute a real PTZ action, whether configured manually (see [Camera PTZ configuration](../../cameras/README.md?id=ptz)) or auto-detected.
|
||||
|
||||
```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. |
|
||||
| `ptz_action` | | Optional action that is of `left`, `right`, `up`, `down`, `zoom_in`, `zoom_out` or `preset`. |
|
||||
| `ptz_phase` | | Optional parameter that is one of `start` or `stop` to start or stop the movement separately. |
|
||||
| `ptz_preset` | | Optional preset to execute when the `ptz_action` is `preset`. |
|
||||
|
||||
?> If no `ptz_action` is specified, the camera returns to its "home" position. For a real PTZ camera, the "home" position is the first available preset. If there are no presets, there is no home position.
|
||||
|
||||
## `ptz_controls`
|
||||
|
||||
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. |
|
||||
|
||||
## `ptz_digital`
|
||||
|
||||
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). |
|
||||
| `ptz_action` | Optional action that is one of `left`, `right`, `up`, `down`, `zoom_in` or `zoom_out`. |
|
||||
| `ptz_phase` | Optional parameter that is one of `start` or `stop` to start or stop the movement separately. |
|
||||
| `absolute` | Optional parameter to specify exact absolute pan and zoom settings. See below. |
|
||||
|
||||
?> If no `ptz_action` is specified and no `absolute` value is specified, the camera returns to its "home" position. See [Camera layout configuration](../../cameras/README.md?id=layout-configuration) to configure the default "home" position for digital PTZ.
|
||||
|
||||
### `absolute`
|
||||
|
||||
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). |
|
||||
|
||||
## `ptz_multi`
|
||||
|
||||
Execute a PTZ action that intelligently chooses between a real and digital PTZ
|
||||
action. If the media in question is a live camera with real PTZ support, a real
|
||||
PTZ action will execute (equivalent to using the [`ptz`](README.md?id=ptz)
|
||||
action), otherwise a digital PTZ action will be run (equivalent to using the
|
||||
[`ptz_digital`](README.md?id=ptz_digital) action).
|
||||
|
||||
?> If the camera supports _any_ real PTZ action, _all_ actions will attempt to make real PTZ calls.
|
||||
|
||||
```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`. |
|
||||
| `ptz_phase` | Optional parameter that is one of `start` or `stop` to start or stop the movement separately. |
|
||||
| `ptz_preset` | Optional preset to execute when the `ptz_action` is `preset`. |
|
||||
|
||||
?> If no `ptz_action` is specified, the camera returns to its "home" position.
|
||||
|
||||
## `recording`
|
||||
|
||||
Change to the `recording` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: recording
|
||||
```
|
||||
|
||||
## `recordings`
|
||||
|
||||
Change to the `recordings` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: recordings
|
||||
```
|
||||
|
||||
## `screenshot`
|
||||
|
||||
Take a screenshot of the selected media (e.g. a still from a video).
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: screenshot
|
||||
```
|
||||
|
||||
## `sleep`
|
||||
|
||||
Take no action for a given duration. Useful to pause between multiple other actions.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
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. |
|
||||
|
||||
### `duration`
|
||||
|
||||
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. |
|
||||
| `ms` | Milliseconds to sleep for. |
|
||||
|
||||
?> Multiple values can be combined, e.g. `{ m: 2, s: 30}` will sleep for `2.5` minutes.
|
||||
|
||||
## `snapshot`
|
||||
|
||||
Change to the `snapshot` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: snapshot
|
||||
```
|
||||
|
||||
## `snapshots`
|
||||
|
||||
Change to the `snapshots` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: snapshots
|
||||
```
|
||||
|
||||
## `timeline`
|
||||
|
||||
Change to the `timeline` view.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: timeline
|
||||
```
|
||||
|
||||
## `unmute`
|
||||
|
||||
Unmute the selected media.
|
||||
|
||||
```yaml
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: unmute
|
||||
```
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
[](../../common/expanded-warning.md ':include')
|
||||
|
||||
```yaml
|
||||
elements:
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-a-circle
|
||||
title: Select Front Door
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_select
|
||||
camera: camera.front_door
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-b-circle
|
||||
title: Open Camera UI
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: camera_ui
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-c-circle
|
||||
title: Change Zoom
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: change_zoom
|
||||
pan:
|
||||
x: 50
|
||||
y: 50
|
||||
zoom: 1
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-d-circle
|
||||
title: Show most recent clip
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: clip
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-e-circle
|
||||
title: Show clips
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: clips
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-f-circle
|
||||
title: Show default view
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: default
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-g-circle
|
||||
title: Show diagnostics
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: diagnostics
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-h-circle
|
||||
title: Show grid
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: display_mode_select
|
||||
display_mode: grid
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-i-circle
|
||||
title: Download media
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: download
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-j-circle
|
||||
title: Expand
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: expand
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-k-circle
|
||||
title: Fullscreen
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: fullscreen
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-l-circle
|
||||
title: Show image view
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: image
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-m-circle
|
||||
title: Show live view
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-n-circle
|
||||
title: Turn off substream
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live_substream_off
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-o-circle
|
||||
title: Turn on substream
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live_substream_on
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-n-circle
|
||||
title: Select HD substream
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: live_substream_select
|
||||
camera: camera.front_door_hd
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-o-circle
|
||||
title: Log to console
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: log
|
||||
message: "Hello, world!"
|
||||
level: debug
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-m-circle
|
||||
title: Media player play
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: media_player
|
||||
media_player: media_player.nesthub50be
|
||||
media_player_action: play
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-n-circle
|
||||
title: Media player stop
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: media_player
|
||||
media_player: media_player.nesthub
|
||||
media_player_action: stop
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-o-circle
|
||||
title: Toggle hidden menu
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: menu_toggle
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-p-circle
|
||||
title: Microphone mute
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: microphone_mute
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-q-circle
|
||||
title: Microphone unmute
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: microphone_unmute
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-r-circle
|
||||
title: Mute
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: mute
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-s-circle
|
||||
title: Pause
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: pause
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-t-circle
|
||||
title: Play
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: play
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-u-circle
|
||||
title: Real PTZ Preset
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz
|
||||
ptz_action: preset
|
||||
ptz_preset: doorway
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-v-circle
|
||||
title: Show PTZ Controls
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz_controls
|
||||
enabled: true
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-w-circle
|
||||
title: Go to precise digital location
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz_digital
|
||||
absolute:
|
||||
zoom: 5
|
||||
pan:
|
||||
x: 58
|
||||
y: 14
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-x-circle
|
||||
title: Smart select between real and digital PTZ
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: ptz_multi
|
||||
ptz_action: left
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-y-circle
|
||||
title: Show most recent recording
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: recording
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-a-circle-outline
|
||||
title: Show recordings
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: recordings
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-b-circle-outline
|
||||
title: Screenshot
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: screenshot
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-c-circle-outline
|
||||
title: Sleep
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: sleep
|
||||
duration:
|
||||
h: 1
|
||||
m: 20
|
||||
s: 56
|
||||
ms: 422
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-d-circle-outline
|
||||
title: Show most recent snapshot
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: snapshot
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-e-circle-outline
|
||||
title: Show snapshots
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: snapshots
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-f-circle-outline
|
||||
title: Show timeline
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: timeline
|
||||
- type: custom:frigate-card-menu-icon
|
||||
icon: mdi:alpha-g-circle-outline
|
||||
title: Unmute
|
||||
tap_action:
|
||||
action: custom:frigate-card-action
|
||||
frigate_card_action: unmute
|
||||
```
|
||||
@@ -0,0 +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)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../../developing.md)
|
||||
@@ -0,0 +1,120 @@
|
||||
# Stock Actions
|
||||
|
||||
## `call-service`
|
||||
|
||||
Call a service. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: call-service
|
||||
[...]
|
||||
```
|
||||
|
||||
## `more-info`
|
||||
|
||||
Open the "more-info" dialog for an entity. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: more-info
|
||||
[...]
|
||||
```
|
||||
|
||||
## `navigate`
|
||||
|
||||
Navigate to a particular dashboard path. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: navigate
|
||||
[...]
|
||||
```
|
||||
|
||||
## `toggle`
|
||||
|
||||
Toggle an entity. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: toggle
|
||||
[...]
|
||||
```
|
||||
|
||||
## `url`
|
||||
|
||||
Navigate to an arbitrary URL. See [Home Assistant actions documentation](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
action: url
|
||||
[...]
|
||||
```
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
[](../../common/expanded-warning.md ':include')
|
||||
|
||||
Reference: [Home Assistant Actions](https://www.home-assistant.io/dashboards/actions/).
|
||||
|
||||
```yaml
|
||||
elements:
|
||||
- type: icon
|
||||
icon: mdi:numeric-1-box
|
||||
title: More info action
|
||||
style:
|
||||
left: 200px
|
||||
top: 50px
|
||||
entity: light.office_main_lights
|
||||
tap_action:
|
||||
action: more-info
|
||||
- type: icon
|
||||
icon: mdi:numeric-2-box
|
||||
title: Toggle action
|
||||
style:
|
||||
left: 200px
|
||||
top: 100px
|
||||
entity: light.office_main_lights
|
||||
tap_action:
|
||||
action: toggle
|
||||
- type: icon
|
||||
icon: mdi:numeric-3-box
|
||||
title: Call Service action
|
||||
style:
|
||||
left: 200px
|
||||
top: 150px
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: homeassistant.toggle
|
||||
data:
|
||||
entity_id: light.office_main_lights
|
||||
- type: icon
|
||||
icon: mdi:numeric-4-box
|
||||
title: Navigate action
|
||||
style:
|
||||
left: 200px
|
||||
top: 200px
|
||||
tap_action:
|
||||
action: navigate
|
||||
navigation_path: /lovelace/2
|
||||
- type: icon
|
||||
icon: mdi:numeric-5-box
|
||||
title: URL action
|
||||
style:
|
||||
left: 200px
|
||||
top: 250px
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://www.home-assistant.io/
|
||||
- type: icon
|
||||
icon: mdi:numeric-6-box
|
||||
title: None action
|
||||
style:
|
||||
left: 200px
|
||||
top: 300px
|
||||
tap_action:
|
||||
action: none
|
||||
- type: icon
|
||||
icon: mdi:numeric-7-box
|
||||
title: Custom action
|
||||
style:
|
||||
left: 200px
|
||||
top: 350px
|
||||
tap_action:
|
||||
action: fire-dom-event
|
||||
key: value
|
||||
```
|
||||
@@ -0,0 +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)
|
||||
|
||||
---
|
||||
|
||||
* [Developing](../../../developing.md)
|
||||
@@ -1,6 +1,6 @@
|
||||
# `automations`
|
||||
|
||||
Automatically take [actions](actions.md) based on [conditions](conditions.md) being met.
|
||||
Automatically take [actions](actions/README.md) based on [conditions](conditions.md) being met.
|
||||
|
||||
?> To change configuration conditionally use [overrides](overrides.md).
|
||||
|
||||
@@ -17,8 +17,8 @@ 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.md) that will be run when the [conditions](conditions.md) evaluate `true`. |
|
||||
| `actions_not` | | An optional list of [actions](actions.md) that will be run when the [conditions](conditions.md) evaluate `false`. |
|
||||
| `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`. |
|
||||
|
||||
# Fully expanded reference
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ cameras_global:
|
||||
| `engine` | `auto` | The camera engine to use. If `auto` the card will attempt to choose the correct engine from the specified options. See [Engine](engine.md). |
|
||||
| `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.md) to refer to a given camera unambiguously. |
|
||||
| `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).|
|
||||
| `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. |
|
||||
@@ -176,6 +176,66 @@ See [media layout examples](../../examples.md?id=media-layout).
|
||||

|
||||
|
||||
|
||||
## `ptz`
|
||||
|
||||
Configure the PTZ actions taken for a camera (not to be confused with configuration of the PTZ _controls_, see [Live PTZ Controls](../live.md?id=ptz) or [Media Viewer PTZ Controls](../media-viewer.md?id=ptz)). Manually configured actions override any auto-detected actions.
|
||||
|
||||
```yaml
|
||||
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".
|
||||
|
||||
The card supports both, and with the help of the
|
||||
`r2c_delay_between_calls_seconds` and `c2r_delay_between_calls_seconds` can
|
||||
translate between them where necessary. See the [ONVIF
|
||||
specification](https://www.onvif.org/specs/srv/ptz/ONVIF-PTZ-Service-Spec.pdf)
|
||||
for more details on the distinction between `relative` and `continuous`.
|
||||
|
||||
The card UI (e.g. PTZ controls) will always try to call the `continuous` variety
|
||||
to allow for precise/smooth controls, and if unavailable will translate multiple
|
||||
`relative` steps with optional delays between each step. Manually configured
|
||||
[actions](../actions/README.md) may be configured to call either variety.
|
||||
|
||||
?> Frigate auto-detected PTZ actions will always be `continuous` as this is what
|
||||
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. |
|
||||
| `data_left`, `data_right`, `data_up`, `data_down`, `data_zoom_in`, `data_zoom_out`, `data_home` | | Shorthand for relative actions that call the service defined by the `service` parameter, with the data provided in this argument. Internally, this is just translated into the longer-form `actions_[action]`. If both `actions_X` and `data_X` are specified, `actions_X` takes priority. This is compatible with [AlexxIT's WebRTC Card PTZ configuration](https://github.com/AlexxIT/WebRTC/wiki/PTZ-Config-Examples). |
|
||||
| `data_left_start`, `data_left_stop`, `data_right_start`, `data_right_stop`, `data_up_start`, `data_up_stop`, `data_down_start`, `data_down_stop`, `data_zoom_in_start`, `data_zoom_in_stop`, `data_zoom_out_start`, `data_zoom_out_stop` | | Shorthand for continuous actions that call the service defined by the `service` parameter, with the data provided in this argument. Internally, this is just translated into the longer-form `actions_[action]_start` and `actions_[action]_stop`. If both `actions_X_*` and `data_X_*` are specified, `actions_X_*` takes priority. This is compatible with [AlexxIT's WebRTC Card PTZ configuration](https://github.com/AlexxIT/WebRTC/wiki/PTZ-Config-Examples). Both a `_start` and `_stop` variety must be provided for an action to be usable. |
|
||||
| `presets` | | PTZ preset actions. See below. |
|
||||
| `r2c_delay_between_calls_seconds` | `0.5` | When the camera is configured with relative actions only (e.g. `left` but not `left_start` and `left_stop`), if something requests a continuous action (e.g. the card PTZ controls have a button held down), then a delay of this number of seconds will be inserted between each call of the relative action. Cameras / integrations that are slower to respond to relative steps may need to increase this value to avoid multiple simultaneous actions being sent. Cameras / integrations that are rapid to respond may need to decrease this value to increase the appearance of one single continuous motion. |
|
||||
| `service` | | An optional Home Assistant service to call when the `data_` parameters are used. |
|
||||
|
||||
### `presets`
|
||||
|
||||
Configures named PTZ presets. If a preset of this name is auto-detected, these configured actions will take precedence.
|
||||
|
||||
```yaml
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
ptz:
|
||||
presets:
|
||||
[preset_name]:
|
||||
[action]:
|
||||
```
|
||||
|
||||
`[action]` is any [call-service](../actions/stock/README.md?id=call-service) action.
|
||||
|
||||
## `triggers`
|
||||
|
||||
The `triggers` block configures what triggers a camera. Triggering can be used
|
||||
@@ -314,6 +374,61 @@ cameras:
|
||||
pan:
|
||||
x: 50
|
||||
y: 50
|
||||
- camera_entity: camera.manual-ptz
|
||||
ptz:
|
||||
c2r_delay_between_calls_seconds: 0.2
|
||||
r2c_delay_between_calls_seconds: 0.5
|
||||
# Relative action (only `left` shown)
|
||||
actions_left:
|
||||
action: call-service
|
||||
service: service.of_your_choice
|
||||
data:
|
||||
device: '048123'
|
||||
cmd: left
|
||||
# Continuous action (only `right` shown)
|
||||
actions_right_start:
|
||||
action: call-service
|
||||
service: service.of_your_choice
|
||||
data:
|
||||
device: '048123'
|
||||
cmd: right
|
||||
phase: start
|
||||
actions_right_stop:
|
||||
action: call-service
|
||||
service: service.of_your_choice
|
||||
data:
|
||||
device: '048123'
|
||||
phase: stop
|
||||
# Equivalent relative short form (only `up` shown)
|
||||
service: service.send_command
|
||||
data_up:
|
||||
device: '048123'
|
||||
cmd: up
|
||||
# Equivalent continuous short form (only `down` shown)
|
||||
service: service.send_command
|
||||
data_up_start:
|
||||
device: '048123'
|
||||
cmd: down
|
||||
phase: start
|
||||
data_up_stop:
|
||||
device: '048123'
|
||||
cmd: down
|
||||
phase: stop
|
||||
presets:
|
||||
# Preset using long form.
|
||||
armchair:
|
||||
action: call-service
|
||||
service: service.of_your_choice
|
||||
data:
|
||||
device: '048123'
|
||||
cmd: preset
|
||||
preset: armchair
|
||||
# Preset using short form.
|
||||
service: service.of_your_choice
|
||||
window:
|
||||
device: '048123'
|
||||
cmd: preset
|
||||
preset: window
|
||||
cameras_global:
|
||||
live_provider: ha
|
||||
```
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
* [Getting Started](../../README.md)
|
||||
* [Configuration](../README.md)
|
||||
* [`actions`](../actions.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)
|
||||
* [`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)
|
||||
|
||||
@@ -66,6 +66,24 @@ conditions:
|
||||
| `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. |
|
||||
|
||||
## `key`
|
||||
|
||||
```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. |
|
||||
| `key` | | Any [keyboard key value](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values), e.g. `ArrowLeft`. |
|
||||
| `meta` | `false` | An optional value to match whether the `meta` key is being held. |
|
||||
| `shift` | `false` | An optional value to match whether the `shift` key is being held. |
|
||||
| `state` | `down` | An optional value to match the state of the. Must be one of `down` or `up`. |
|
||||
|
||||
## `media_loaded`
|
||||
|
||||
```yaml
|
||||
@@ -77,7 +95,7 @@ conditions:
|
||||
| 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. Note that if `true` this
|
||||
| `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. |
|
||||
|
||||
## `microphone`
|
||||
|
||||
@@ -169,7 +187,7 @@ conditions:
|
||||
media is fetched. When including views as part of a [condition](conditions.md),
|
||||
you may need to refer to this special `media` view.
|
||||
|
||||
# Fully expanded reference
|
||||
## Fully expanded reference
|
||||
|
||||
[](common/expanded-warning.md ':include')
|
||||
|
||||
@@ -184,6 +202,13 @@ conditions:
|
||||
fullscreen: true
|
||||
- condition: interaction
|
||||
interaction: true
|
||||
- condition: key
|
||||
alt: false
|
||||
ctrl: false
|
||||
key: F
|
||||
meta: false
|
||||
shift: false
|
||||
state: down
|
||||
- condition: media_loaded
|
||||
media_loaded: true
|
||||
- condition: microphone
|
||||
|
||||
@@ -10,8 +10,8 @@ elements:
|
||||
- [element_2]
|
||||
```
|
||||
|
||||
?> The Frigate Card allows either a single [action](actions.md) (as in stock Home
|
||||
Assistant) or list of [actions](actions.md) to be defined for each class of user interaction
|
||||
?> The Frigate Card allows either a single [action](actions/README.md) (as in stock Home
|
||||
Assistant) or list of [actions](actions/README.md) to be defined for each class of user interaction
|
||||
(e.g. `tap`, `double_tap`, `hold`, etc). See [an example of multiple actions](../examples.md?id=multiple-actions).
|
||||
|
||||
## `conditional`
|
||||
@@ -81,7 +81,7 @@ Parameters for this element are identical to the parameters of the [stock Home A
|
||||
| `selected` | `false` | Whether or not to show this item as selected. |
|
||||
| `state_color` | `true` | Whether or not the title and icon should be stylized based on state. |
|
||||
| `style` | | Position and style the element using CSS. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](actions.md) to take when this item is interacted with. |
|
||||
| `tap_action`, `double_tap_action`, `hold_action`, `start_tap`, `end_tap` | | The [actions](actions/README.md) to take when this item is interacted with. |
|
||||
| `title` | | An optional title to display. |
|
||||
|
||||
## `custom:frigate-card-menu-submenu-select`
|
||||
@@ -185,7 +185,7 @@ elements:
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
> [Actions](actions.md) are omitted for simplicity.
|
||||
> [Actions](actions/README.md) are omitted for simplicity.
|
||||
|
||||
[](common/expanded-warning.md ':include')
|
||||
|
||||
|
||||
@@ -9,15 +9,14 @@ image:
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions` | | [Actions](actions.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. |
|
||||
| `zoomable` | `true` | Whether or not the image can be zoomed and panned, via touch/pinch and mouse scroll wheel with `ctrl` held. |
|
||||
|
||||
?> When `mode` is set to `camera` this is effectively providing the same image as the `image` [live provider](cameras/live-provider.md) would show in the live camera carousel.
|
||||
|
||||
# Fully expanded reference
|
||||
## Fully expanded reference
|
||||
|
||||
[](common/expanded-warning.md ':include')
|
||||
|
||||
@@ -25,7 +24,6 @@ image:
|
||||
image:
|
||||
mode: url
|
||||
refresh_seconds: 0
|
||||
zoomable: true
|
||||
actions:
|
||||
entity: light.office_main_lights
|
||||
tap_action:
|
||||
|
||||
+36
-49
@@ -9,7 +9,7 @@ live:
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions` | | [Actions](actions.md) to use for the `live` view. |
|
||||
| `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.|
|
||||
@@ -39,8 +39,8 @@ live:
|
||||
| - | - | - |
|
||||
| `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. |
|
||||
| `timeline` | | | Configures how the mini-timeline is shown on the `live` view. See below. |
|
||||
| `thumbnails` | | Configures how thumbnails are shown on the `live` view. See below. |
|
||||
| `timeline` | | Configures how the mini-timeline is shown on the `live` view. See below. |
|
||||
| `title` | | Configures how the camera title is shown on the `live` view. See below. |
|
||||
|
||||
### `next_previous`
|
||||
@@ -59,6 +59,29 @@ live:
|
||||
| `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` . |
|
||||
|
||||
### `ptz`
|
||||
|
||||
Configures the PTZ (Pan Tilt Zoom) controls.
|
||||
|
||||
```yaml
|
||||
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 |
|
||||
| `mode` | `auto` | If `on` or `off` will always or never show PTZ controls respectively, if `auto` will show PTZ controls only if the camera supports real PTZ. |
|
||||
| `orientation` | `horizontal` | Whether to show a `vertical` or `horizontal` PTZ control. |
|
||||
| `position` | `bottom-right` | Whether to position the control on the `top-left`, `top-right`, `bottom-left` or `bottom-right`. This may be overridden by using the `style` parameter to precisely control placement. |
|
||||
| `style` | | Optionally position and style the element using CSS. Similar to [Picture Element styling](https://www.home-assistant.io/dashboards/picture-elements/#how-to-use-the-style-object), except without any default, e.g. `left: 42%` |
|
||||
|
||||
To configure the PTZ _actions_ taken for a particular camera, see [Camera PTZ Settings](./cameras/README.md?id=ptz).
|
||||
|
||||
### `thumbnails`
|
||||
|
||||
Configures how thumbnails are shown on the live view.
|
||||
@@ -154,29 +177,6 @@ live:
|
||||
|
||||
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.
|
||||
|
||||
## `ptz`
|
||||
|
||||
Controls a PTZ (Pan Tilt Zoom) overlay on the `live` view.
|
||||
|
||||
```yaml
|
||||
live:
|
||||
ptz:
|
||||
[...]
|
||||
```
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions_left`, `actions_right`, `actions_up`, `actions_down`, `actions_zoom_in`, `actions_zoom_out`, `actions_home` | Set by camera [engine](cameras/engine.md) of the selected camera | The [actions](actions.md) to call when this icon is interacted with. |
|
||||
| `data_left`, `data_right`, `data_up`, `data_down`, `data_zoom_in`, `data_zoom_out`, `data_home` | | Shorthand for a `tap_action` that calls the `service` with the data provided in this argument. Internally, this is just translated into the longer-form `actions_[button]`. If both `actions_X` and `data_X` are specified, `actions_X` takes priority. This is compatible with [AlexxIT's WebRTC Card PTZ configuration](https://github.com/AlexxIT/WebRTC/wiki/PTZ-Config-Examples). |
|
||||
| `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 |
|
||||
| `mode` | `on` | When `on` will show a PTZ control if so configured (manually, or by the camera engine), if `off` will not show any control. |
|
||||
| `orientation` | `horizontal` | Whether to show a `vertical` or `horizontal` PTZ control. |
|
||||
| `position` | `bottom-right` | Whether to position the control on the `top-left`, `top-right`, `bottom-left` or `bottom-right`. This may be overridden by using the `style` parameter to precisely control placement. |
|
||||
| `service` | | An optional Home Assistant service to call when the `data_` parameters are used. |
|
||||
| `style` | | Optionally position and style the element using CSS. Similar to [Picture Element styling](https://www.home-assistant.io/dashboards/picture-elements/#how-to-use-the-style-object), except without any default, e.g. `left: 42%` |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
[](common/expanded-warning.md ':include')
|
||||
@@ -203,6 +203,16 @@ live:
|
||||
next_previous:
|
||||
style: chevrons
|
||||
size: 48
|
||||
ptz:
|
||||
mode: auto
|
||||
position: bottom-right
|
||||
orientation: horizontal
|
||||
hide_pan_tilt: false
|
||||
hide_zoom: false
|
||||
hide_home: false
|
||||
style:
|
||||
# Optionally override the default style.
|
||||
right: 5%
|
||||
thumbnails:
|
||||
media_type: events
|
||||
events_media_type: all
|
||||
@@ -227,29 +237,6 @@ live:
|
||||
always_connected: false
|
||||
disconnect_seconds: 90
|
||||
mute_after_microphone_mute_seconds: 60
|
||||
ptz:
|
||||
mode: on
|
||||
position: bottom-right
|
||||
orientation: horizontal
|
||||
hide_pan_tilt: false
|
||||
hide_zoom: false
|
||||
hide_home: false
|
||||
style:
|
||||
# Optionally override the default style.
|
||||
right: 5%
|
||||
# Manually specifying actions.
|
||||
actions_left:
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: sonoff.send_command
|
||||
service_data:
|
||||
device: '048123'
|
||||
cmd: left
|
||||
# Equivalent short form PTZ actions (only right button shown)
|
||||
service: sonoff.send_command
|
||||
data_right:
|
||||
device: '048123'
|
||||
cmd: right
|
||||
display:
|
||||
mode: single
|
||||
grid_selected_width_factor: 2
|
||||
|
||||
@@ -9,7 +9,7 @@ media_gallery:
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions` | | [Actions](actions.md) to use for all views that use the `media_gallery` (e.g. `clips`, `snapshots`, `recordings`). |
|
||||
| `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. |
|
||||
|
||||
## `controls`
|
||||
|
||||
@@ -9,7 +9,7 @@ media_viewer:
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions` | | [Actions](actions.md) to use for all views that use the `media_viewer` (e.g. `clip`, `snapshot`). |
|
||||
| `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.|
|
||||
@@ -55,6 +55,29 @@ media_viewer:
|
||||
| `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`
|
||||
|
||||
Configures the PTZ (Pan Tilt Zoom) controls. As the media viewer is never
|
||||
viewing live view, the PTZ controls in this context always refer to digital (vs
|
||||
real) panning and zooming.
|
||||
|
||||
```yaml
|
||||
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 |
|
||||
| `mode` | `off` | If `on` or `off` will always or never show PTZ controls respectively. |
|
||||
| `orientation` | `horizontal` | Whether to show a `vertical` or `horizontal` PTZ control. |
|
||||
| `position` | `bottom-right` | Whether to position the control on the `top-left`, `top-right`, `bottom-left` or `bottom-right`. This may be overridden by using the `style` parameter to precisely control placement. |
|
||||
| `style` | | Optionally position and style the element using CSS. Similar to [Picture Element styling](https://www.home-assistant.io/dashboards/picture-elements/#how-to-use-the-style-object), except without any default, e.g. `left: 42%` |
|
||||
|
||||
### `thumbnails`
|
||||
|
||||
Configures how thumbnails are shown on the media viewer.
|
||||
@@ -157,6 +180,16 @@ media_viewer:
|
||||
next_previous:
|
||||
size: 48
|
||||
style: thumbnails
|
||||
ptz:
|
||||
mode: off
|
||||
position: bottom-right
|
||||
orientation: horizontal
|
||||
hide_pan_tilt: false
|
||||
hide_zoom: false
|
||||
hide_home: false
|
||||
style:
|
||||
# Optionally override the default style.
|
||||
right: 5%
|
||||
thumbnails:
|
||||
size: 100
|
||||
mode: none
|
||||
|
||||
+10
-10
@@ -33,7 +33,6 @@ menu:
|
||||
| `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. |
|
||||
| `default_zoom` | The `default_zoom` button allows easily returning the camera to default pan/zoom. |
|
||||
| `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.|
|
||||
| `expand` | The `expand` menu button: expand the card into a popup/dialog. |
|
||||
@@ -41,9 +40,10 @@ menu:
|
||||
| `fullscreen` | The `fullscreen` menu button: expand the card to consume the fullscreen. |
|
||||
| `image` | The `image` view menu button: brings the user to the static `image` view. |
|
||||
| `live` | The `live` view menu button: brings the user to the `live` view. |
|
||||
| `media_player` | The `media_player` menu button: sends the visible media to a remote media player. Supports Frigate clips, snapshots and live camera (only for cameras that specify a `camera_entity` and only using the default HA stream (equivalent to the `ha` live provider). `jsmpeg` or `webrtc-card` are not supported, although live can still be played as long as `camera_entity` is specified. In the player list, a `tap` will send the media to the player, a `hold` will stop the media on the player. |
|
||||
| `media_player` | The `media_player` menu button: sends the visible media to a remote media player. Supports Frigate clips, snapshots and live camera (only for cameras that specify a `camera_entity` and only using the default HA stream (equivalent to the `ha` live provider)). `jsmpeg` or `webrtc-card` are not supported, although live can still be played as long as `camera_entity` is specified. In the player list, a `tap` will send the media to the player, a `hold` will stop the media on the player. |
|
||||
| `microphone` | The `microphone` button allows usage of 2-way audio in certain configurations. See [Using 2-way audio](../usage/2-way-audio.md). |
|
||||
| `ptz` | The `show_ptz` button shows or hide the PTZ controls. |
|
||||
| `ptz_controls` | The `ptz_controls` button shows or hides the PTZ controls. |
|
||||
| `ptz_home` | The `ptz_home` button allows easily returning the camera to default home position. |
|
||||
| `recordings` | The `recordings` view menu button: brings the user to the `recordings` view on tap and the most-recent `recording` view on hold. |
|
||||
| `screenshot` | The `screenshot` menu button: take a screenshot of the loaded media (e.g. a still from a video). |
|
||||
| `snapshots` | The `snapshots` view menu button: brings the user to the `clips` view on tap and the most-recent `snapshot` view on hold. |
|
||||
@@ -54,7 +54,7 @@ menu:
|
||||
| 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 `default_zoom`. `false` for `image`, `expand`, `microphone`, `mute`, `play`, `recordings`, `screenshot`, `ptz` | Whether or not to show the button. |
|
||||
| `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`.|
|
||||
|
||||
@@ -91,11 +91,6 @@ menu:
|
||||
enabled: true
|
||||
alignment: matching
|
||||
icon: mdi:video-switch
|
||||
default_zoom:
|
||||
priority: 50
|
||||
enabled: true
|
||||
alignment: matching
|
||||
icon: mdi:magnify-close
|
||||
substreams:
|
||||
priority: 50
|
||||
enabled: true
|
||||
@@ -167,11 +162,16 @@ menu:
|
||||
enabled: false
|
||||
alignment: matching
|
||||
icon: mdi:play
|
||||
show_ptz:
|
||||
ptz_controls:
|
||||
priority: 50
|
||||
enabled: false
|
||||
alignment: matching
|
||||
icon: mdi:pan
|
||||
ptz_home:
|
||||
priority: 50
|
||||
enabled: true
|
||||
alignment: matching
|
||||
icon: mdi:home
|
||||
button_size: 40
|
||||
position: top
|
||||
style: hidden
|
||||
|
||||
@@ -9,11 +9,12 @@ view:
|
||||
|
||||
| Option | Default | Description |
|
||||
| - | - | - |
|
||||
| `actions` | | [Actions](actions.md) to use for all views, individual actions may be overriden by view-specific actions. |
|
||||
| `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%`.|
|
||||
| `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. |
|
||||
| `render_entities` | | **YAML only**: A list of entity ids that should cause the card to re-render 'in-place'. The view/camera is not changed. `update_*` flags do not pertain/relate to the behavior of this flag. This should **very** rarely be needed, but could be useful if the card is both setting and changing HA state of the same object as could be the case for some complex `card_mod` scenarios ([example](https://github.com/dermotduffy/frigate-hass-card/issues/343)). |
|
||||
| `reset_after_interaction` | `true` | If `true` the card will reset to the default configured view (i.e. 'screensaver' functionality) after `interaction_seconds` has elapsed after user interaction. |
|
||||
| `triggers` | | How to react when a camera is [triggered](cameras/README.md?id=triggers). |
|
||||
@@ -22,6 +23,25 @@ view:
|
||||
| `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.|
|
||||
|
||||
## `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. |
|
||||
| alt | `false` | If `true` requires the `alt` key to be held. |
|
||||
| meta | `false` | If `true` requires the `meta` key to be held. |
|
||||
|
||||
## `triggers`
|
||||
|
||||
The `triggers` block controls how the card reacts when a camera is triggered (note that _what_ triggers the camera is controlled by the [`triggers`](cameras/README.md?id=triggers) block within the config for a given camera). This can be used for a variety of purposes, such as allowing the card to automatically change to `live` for a camera that triggers.
|
||||
@@ -102,6 +122,22 @@ view:
|
||||
interaction_mode: inactive
|
||||
trigger: default
|
||||
untrigger: none
|
||||
keyboard_shortcuts:
|
||||
enabled: true
|
||||
ptz_left:
|
||||
key: 'ArrowLeft'
|
||||
ptz_right:
|
||||
key: 'ArrowRight'
|
||||
ptz_up:
|
||||
key: 'ArrowUp'
|
||||
ptz_down:
|
||||
key: 'ArrowDown'
|
||||
ptz_zoom_in:
|
||||
key: '+'
|
||||
ptz_zoom_out:
|
||||
key: '-'
|
||||
ptz_home:
|
||||
key: 'h'
|
||||
actions:
|
||||
entity: light.office_main_lights
|
||||
tap_action:
|
||||
|
||||
+47
-2
@@ -37,6 +37,8 @@ dimensions:
|
||||
|
||||
## Automation
|
||||
|
||||
### Responding to fullscreen
|
||||
|
||||
This example will automatically turn on the first configured substream when the
|
||||
card is put in fullscreen mode, and turn off the substream when exiting
|
||||
fullscreen mode.
|
||||
@@ -68,6 +70,49 @@ automations:
|
||||
frigate_card_action: live_substream_off
|
||||
```
|
||||
|
||||
### Responding to key input
|
||||
|
||||
In addition to a handful of reconfigurable [built-in keyboard shortcuts](./usage/keyboard-shortcuts.md), `automations` can be used to take any action based on any keyboard input. These examples use [`key` conditions](./configuration/conditions.md?id=key) to assess keyboard state before taking action.
|
||||
|
||||
#### Change to `live` temporarily
|
||||
|
||||
In this example, the view will change to `live`, when `Alt+Z` is pressed, and change to the `clips` view `5` seconds later.
|
||||
|
||||
```yaml
|
||||
automations:
|
||||
- conditions:
|
||||
- condition: key
|
||||
key: z
|
||||
alt: true
|
||||
actions:
|
||||
- action: custom:frigate-card-action
|
||||
frigate_card_action: live
|
||||
- action: custom:frigate-card-action
|
||||
frigate_card_action: sleep
|
||||
duration:
|
||||
s: 5
|
||||
- action: custom:frigate-card-action
|
||||
frigate_card_action: clips
|
||||
```
|
||||
|
||||
#### Change to `live` while key _held_ down
|
||||
|
||||
In this example, the view will change to `live`, when `Alt+Z` is _held_ down, and immediately change to `clips` when _released_.
|
||||
|
||||
```yaml
|
||||
automations:
|
||||
- conditions:
|
||||
- condition: key
|
||||
key: z
|
||||
alt: true
|
||||
actions:
|
||||
- action: custom:frigate-card-action
|
||||
frigate_card_action: live
|
||||
actions_not:
|
||||
- action: custom:frigate-card-action
|
||||
frigate_card_action: clips
|
||||
```
|
||||
|
||||
## `card-mod`
|
||||
|
||||
This card allows the use of
|
||||
@@ -162,7 +207,7 @@ elements:
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: amcrest.ptz_control
|
||||
service_data:
|
||||
data:
|
||||
entity_id: camera.kitchen
|
||||
movement: up
|
||||
```
|
||||
@@ -374,7 +419,7 @@ elements:
|
||||
|
||||
## Multiple actions
|
||||
|
||||
This example shows how to configure multiple actions for a single Frigate card user interaction, in this case both selecting a different camera and changing the view on `tap`. Note that multiple actions are not supported on stock Picture Elements, see [actions](configuration/actions.md) for more information.
|
||||
This example shows how to configure multiple actions for a single Frigate card user interaction, in this case both selecting a different camera and changing the view on `tap`. Note that multiple actions are not supported on stock Picture Elements, see [actions](configuration/actions/README.md) for more information.
|
||||
|
||||
```yaml
|
||||
type: custom:frigate-card
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
* [Screenshots](../screenshots.md)
|
||||
* [Troubleshooting](../troubleshooting.md)
|
||||
* [Usage](README.md)
|
||||
* [2-way audio](2-way-audio.md)
|
||||
* [Casting](casting.md)
|
||||
* [URL Actions](url-actions.md)
|
||||
* [2-way audio](2-way-audio.md)
|
||||
* [Casting](casting.md)
|
||||
* [Keyboard Shortcuts](keyboard-shortcuts.md)
|
||||
* [URL Actions](url-actions.md)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Keyboard Shortcuts
|
||||
|
||||
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.
|
||||
|
||||
## 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. |
|
||||
| `ptz_right` | `ArrowRight` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move right. |
|
||||
| `ptz_up` | `ArrowUp` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ move up. |
|
||||
| `ptz_zoom_in` | `+` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ zoom in. |
|
||||
| `ptz_zoom_out` | `-` | [`ptz_multi`](../configuration/actions/custom/README.md?id=ptz_multi) | PTZ zoom out. |
|
||||
@@ -1,7 +1,7 @@
|
||||
# URL Actions
|
||||
|
||||
It is possible to pass the Frigate card one or more
|
||||
[actions](../configuration/actions.md) from the URL (e.g. select a particular
|
||||
[actions](../configuration/actions/README.md) from the URL (e.g. select a particular
|
||||
camera, open the live view in expanded mode, etc).
|
||||
|
||||
### When actions are executed
|
||||
@@ -44,7 +44,7 @@ unless the action is targeted with a `CARD_ID` as shown above.
|
||||
|
||||
## Supported Actions
|
||||
|
||||
Only a subset of all [actions](../configuration/actions.md) are supported in URL form.
|
||||
Only a subset of all [actions](../configuration/actions/README.md) are supported in URL form.
|
||||
|
||||
| Action | Supported in URL | Explanation |
|
||||
| - | - | - |
|
||||
@@ -68,7 +68,7 @@ Only a subset of all [actions](../configuration/actions.md) are supported in URL
|
||||
| `recording` | :white_check_mark: | |
|
||||
| `recordings` | :white_check_mark: | |
|
||||
| `screenshot`| :heavy_multiplication_x: | Latest media information is not available on initial render. |
|
||||
| `show_ptz` | :heavy_multiplication_x: | Please [request](https://github.com/dermotduffy/frigate-hass-card/issues) if you need this. |
|
||||
| `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: | |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user