test: Add tests for config actions, elements and conditions (#1976)

[skip ci]
This commit is contained in:
Dermot Duffy
2025-03-21 20:14:24 -07:00
committed by GitHub
parent 773b486489
commit 92fc8dd844
6 changed files with 737 additions and 30 deletions
+17
View File
@@ -45,6 +45,21 @@ conditions:
| `condition` | Must be `config`. |
| `paths` | An optional array of configuration paths (e.g. `menu.style`). If provided condition matches if _ANY_ of the provided configuration paths has changed. |
## `display_mode`
Matches when card display mode changes (e.g. `single` or `grid` mode). See the display settings for [`live`](live.md?id=display) or [`media_viewer`](media-viewer.md?id=display).
```yaml
conditions:
- condition: display_mode
# [...]
```
| Parameter | Description |
| -------------- | --------------------------- |
| `condition` | Must be `display_mode`. |
| `display_mode` | Must be `single` or `grid`. |
## `expand`
Matches based on whether the card is in "expanded" mode.
@@ -291,6 +306,8 @@ conditions:
- condition: config
paths:
- "menu.style"
- condition: display_mode
display_mode: single
- condition: expand
expand: true
- condition: fullscreen