docs: Fix incorrect change_zoom example (#1640)

This commit is contained in:
Dermot Duffy
2024-10-13 16:44:40 -07:00
committed by GitHub
parent 7895de96d2
commit 2269f9891d
2 changed files with 15 additions and 45 deletions
+2 -32
View File
@@ -42,28 +42,6 @@ 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.
@@ -369,6 +347,8 @@ frigate_card_action: ptz-digital
?> 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.
See [example of automatically zoom/panning based on state](../../../examples.md?id=automatically-zoom-based-on-state).
### `absolute`
Set exact digital PTZ pan and zoom parameters.
@@ -524,16 +504,6 @@ elements:
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
+13 -13
View File
@@ -707,7 +707,7 @@ elements:
opacity: 0.5
```
![](images/picture-elements-temperature.png 'Picture elements temperature example :size=400')
![Picture elements temperature example](images/picture-elements-temperature.png 'Picture elements temperature example :size=400')
## Static images
@@ -742,7 +742,7 @@ status_bar:
This example shows an icon and a message on the status bar when a camera is triggered, replacing the existing contents of the status bar through the use of `exclusive`.
![](images/dynamic-status.gif 'Dynamic Status Messages :size=400')
![Dynamic Status Messages](images/dynamic-status.gif 'Dynamic Status Messages :size=400')
```yaml
type: custom:frigate-card
@@ -1059,9 +1059,8 @@ cameras:
card_id: main
```
```
```text
https://ha.mydomain.org/lovelace-test/0?frigate-card-action.main.clips
```
### Choosing the camera from a separate picture elements card
@@ -1101,11 +1100,11 @@ elements:
navigation_path: /lovelace-test/0?frigate-card-action.camera_select=camera.kitchen
```
![](images/navigate-picture-elements.gif 'Taking card actions via the URL :size=400')
![Taking card actions via the URL](images/navigate-picture-elements.gif 'Taking card actions via the URL :size=400')
### Selecting a camera in expanded mode via query string
```
```text
https://ha.mydomain.org/lovelace-test/0?frigate-card-action.camera_select=kitchen&frigate-card-action.expand
```
@@ -1198,16 +1197,17 @@ automations:
state: 'on'
actions:
- action: custom:frigate-card-action
frigate_card_action: change_zoom
frigate_card_action: ptz_digital
target_id: camera.living_room
zoom: 4
pan:
x: 38
y: 20
absolute:
zoom: 4
pan:
x: 38
y: 20
actions_not:
- action: custom:frigate-card-action
frigate_card_action: change_zoom
frigate_card_action: ptz_digital
target_id: camera.living_room
```
![](images/zoom-automation.gif 'Zoom automation example :size=400')
![Zoom automation example](images/zoom-automation.gif 'Zoom automation example :size=400')