feat: Add support for template conditions (#1995)

- Closes:  #1988
This commit is contained in:
Dermot Duffy
2025-04-05 22:25:46 +01:00
committed by GitHub
parent 36783855a2
commit e7a9e20c9e
10 changed files with 184 additions and 67 deletions
+22
View File
@@ -272,6 +272,28 @@ almost certainly not useful / reliable as a condition.
See [Home Assistant conditions documentation](https://www.home-assistant.io/dashboards/conditional/#state).
## `template`
Matches based on a template.
```yaml
conditions:
- condition: template
# [...]
```
| Parameter | Description |
| ---------------- | ---------------------------------------------------------------------------------- |
| `condition` | Must be `template`. |
| `value_template` | The Home Assistant template to check, e.g. `{{ states('switch.office') == 'on' }}` |
See [Home Assistant conditions documentation](https://www.home-assistant.io/docs/scripts/conditions/#template-condition).
?> The Advanced Camera Card uses
[ha-nunjucks](https://github.com/Nerwyn/ha-nunjucks) to process templates.
Consult its documentation for the wide variety of different template values
supported.
## `triggered`
Matches based on whether the selected camera has been triggered.