Update README.

This commit is contained in:
Dermot Duffy
2022-05-01 12:48:03 -07:00
parent dafaae7fe4
commit 08ce8e8419
2 changed files with 39 additions and 0 deletions
+38
View File
@@ -579,9 +579,30 @@ All variables listed are under a `conditions:` section.
| `view` | A list of [views](#views) in which this condition is satified (e.g. `clips`) | | `view` | A list of [views](#views) in which this condition is satified (e.g. `clips`) |
| `camera` | A list of camera ids in which this condition is satisfied. See [camera IDs](#camera-ids).| | `camera` | A list of camera ids in which this condition is satisfied. See [camera IDs](#camera-ids).|
| `fullscreen` | If `true` the condition is satisfied if the card is in fullscreen mode. If `false` the condition is satisfied if the card is **NOT** in fullscreen mode.| | `fullscreen` | If `true` the condition is satisfied if the card is in fullscreen mode. If `false` the condition is satisfied if the card is **NOT** in fullscreen mode.|
| `state` | A list of state conditions to compare with Home Assistant state. See below. |
See the [PTZ example below](#frigate-card-conditional-example) for a real-world example of how these conditions can be used. See the [PTZ example below](#frigate-card-conditional-example) for a real-world example of how these conditions can be used.
### State Conditions
```yaml
- conditions:
state:
- [entries]
```
The Frigate Card Condition can compare HA state against fixed string values. This is the same as the Home Assistant [Conditional Element](https://www.home-assistant.io/dashboards/picture-elements/#conditional-element) condition, but can be used outside of a Picture Element context (e.g. card configuration overrides).
If multiple entries are provided, the results are `AND`ed.
| Parameter | Description |
| - | - |
| `entity` | The entity ID to check the state for |
| `state` | Condition will be met if state is equal to this optional string. |
| `state_not` | Condition will be met if state is unequal to this optional string. |
See the [Menu override example below](#frigate-card-menu-override-example) for an illustration.
<a name="frigate-card-elements"></a> <a name="frigate-card-elements"></a>
## Picture Elements / Menu Customizations ## Picture Elements / Menu Customizations
@@ -1230,6 +1251,23 @@ overrides:
</details> </details>
<a name="frigate-card-menu-override-example"></a>
<details>
<summary>Expand: Change the menu position based on HA state</summary>
```yaml
overrides:
- conditions:
state:
- entity: light.office_lights
state: 'on'
overrides:
menu:
position: bottom
```
</details>
### Refreshing a static image ### Refreshing a static image
<details> <details>
+1
View File
@@ -204,6 +204,7 @@ export class FrigateCard extends LitElement {
} }
} }
// HA entity state is part of the condition state.
this._generateConditionState(); this._generateConditionState();
// Dark mode may depend on HASS. // Dark mode may depend on HASS.