From df79ff80eb9682e7a2a534b08c63c2df57972f86 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Wed, 10 Nov 2021 21:31:55 -0800 Subject: [PATCH] Update README. --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94373822..d57fbfdc 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,7 @@ This card supports all [Picture Elements](https://www.home-assistant.io/lovelace -### `custom:frigate-card-conditional` +#### `custom:frigate-card-conditional` Parameters for the `custom:frigate-card-conditional` element: @@ -282,6 +282,23 @@ Parameters for the `custom:frigate-card-conditional` element: | `elements` | The elements to render. Can be any supported element, include additional condition or custom elements. | See the [PTZ example below](#frigate-card-conditional-example) for a real-world example. + +### Special Actions + +#### `custom:frigate-card-action` + +| Action name | Description | +| - | - | +| `custom:frigate-card-action` | Call a Frigate Card action. Acceptable values are `frigate`, `clip`, `clips`, `image`, `live`, `snapshot`, `snapshots`, `download`, `frigate_ui`, `fullscreen`.| + +| Value | Description | +| - | - | +| `frigate` | Show/hide the menu or trigger the default view. | +| `clip`, `clips`, `image`, `live`, `snapshot`, `snapshots` | Trigger the named [view](#views).| +|`download`|Download the displayed media.| +|`frigate_ui`|Open the Frigate UI at the configured URL.| +|`fullscreen`|Toggle fullscreen.| + ### Elements Examples #### Menu icons @@ -440,6 +457,29 @@ elements: ``` +#### Triggering card actions + +You can control the card itself with the `custom:frigate-card-action` action. + +
+ Expand: Custom fullscreen button + +This example shows an icon that toggles the card fullscreen mode. + +```yaml +elements: + - type: icon + icon: mdi:fullscreen + style: + left: 40px + top: 40px + tap_action: + action: custom:frigate-card-action + frigate_card_action: fullscreen +``` + +
+ ## Views