Add support for more advanced forms of overriding
This commit is contained in:
+25
-7
@@ -424,7 +424,7 @@ overrides:
|
||||
- condition: state
|
||||
entity: light.office_main_lights
|
||||
state: 'on'
|
||||
overrides:
|
||||
merge:
|
||||
menu:
|
||||
position: bottom
|
||||
```
|
||||
@@ -451,7 +451,7 @@ overrides:
|
||||
- condition: state
|
||||
entity: binary_sensor.alarm_armed
|
||||
state: 'off'
|
||||
overrides:
|
||||
merge:
|
||||
view:
|
||||
default: image
|
||||
```
|
||||
@@ -471,7 +471,7 @@ overrides:
|
||||
fullscreen: true
|
||||
- condition: display_mode
|
||||
display_mode: grid
|
||||
overrides:
|
||||
merge:
|
||||
live:
|
||||
display:
|
||||
grid_columns: 5
|
||||
@@ -497,7 +497,7 @@ overrides:
|
||||
- conditions:
|
||||
- condition: expand
|
||||
expand: true
|
||||
overrides:
|
||||
merge:
|
||||
menu:
|
||||
style: overlay
|
||||
```
|
||||
@@ -520,11 +520,29 @@ overrides:
|
||||
- conditions:
|
||||
- condition: fullscreen
|
||||
fullscreen: true
|
||||
overrides:
|
||||
merge:
|
||||
menu:
|
||||
style: none
|
||||
```
|
||||
|
||||
### Remove a camera when an entity state changes
|
||||
|
||||
This example removes a camera from the card when an entity is disabled (e.g. a switch controlling power to the camera).
|
||||
|
||||
```yaml
|
||||
type: custom:frigate-card
|
||||
cameras:
|
||||
- camera_entity: camera.office
|
||||
- camera_entity: camera.kitchen
|
||||
overrides:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity: switch.kitchen_camera_power
|
||||
state: off
|
||||
delete:
|
||||
- 'cameras[1]'
|
||||
```
|
||||
|
||||
## PTZ control
|
||||
|
||||
The card supports using PTZ controls to conveniently control pan, tilt and zoom for cameras. This example shows the PTZ controls on the `live` view. Note that if your camera engine supports it (e.g. `frigate`) this will just work out of the box with no configuration at all.
|
||||
@@ -568,7 +586,7 @@ overrides:
|
||||
- conditions:
|
||||
- condition: screen
|
||||
media_query: '(orientation: landscape)'
|
||||
overrides:
|
||||
merge:
|
||||
menu:
|
||||
position: left
|
||||
```
|
||||
@@ -584,7 +602,7 @@ overrides:
|
||||
- conditions:
|
||||
- condition: screen
|
||||
media_query: '(max-width: 300px)'
|
||||
overrides:
|
||||
merge:
|
||||
menu:
|
||||
style: none
|
||||
live:
|
||||
|
||||
Reference in New Issue
Block a user