Add example to documentation.
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||

|
||||
|
||||
Reference in New Issue
Block a user