Add example to documentation.

This commit is contained in:
Dermot Duffy
2024-04-27 19:56:50 -07:00
parent 7917e5c537
commit b70e3157d6
4 changed files with 50 additions and 3 deletions
+17 -3
View File
@@ -132,9 +132,13 @@ frigate_card_action: change_zoom
| - | - |
| `action` | Must be `custom:frigate-card-action`. |
| `frigate_card_action` | Must be `change_zoom`. |
| `target_id` | The [camera ID](cameras/README.md?id=cameras) to adjust the pan/zoom of, or a media ID (e.g. `frigate` event ID) to zoom in on specific media items. |
| `zoom` | How much to zoom-in. See the [camera zoom parameter](cameras/README.md?id=layout-configuration). |
| `pan` | How much to pan-x/y. See the [camera pan parameter](cameras/README.md?id=layout-configuration). |
| `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`
@@ -536,4 +540,14 @@ elements:
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
```