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
+32
View File
@@ -1057,3 +1057,35 @@ overrides:
x: 100
y: 100
```
### Automatically zoom based on state
This example automatically zooms in and out based on the state of an entity:
```yaml
type: custom:frigate-card
cameras:
- camera_entity: camera.living_room
live_provider: go2rtc
debug:
logging: true
automations:
- conditions:
- condition: state
entity: binary_sensor.door_contact
state: 'on'
actions:
- action: custom:frigate-card-action
frigate_card_action: change_zoom
target_id: camera.living_room
zoom: 4
pan:
x: 38
y: 20
actions_not:
- action: custom:frigate-card-action
frigate_card_action: change_zoom
target_id: camera.living_room
```
![](images/zoom-automation.gif 'Zoom automation example :size=400')