feat: Add or, and and not condition types (#1980)

[skip ci]
This commit is contained in:
Dermot Duffy
2025-03-23 21:04:15 -07:00
committed by GitHub
parent f140f6a653
commit a3b17d8cb2
6 changed files with 312 additions and 20 deletions
+3
View File
@@ -696,6 +696,7 @@ describe('config defaults', () => {
it('should include all conditions', () => {
const conditions = [
{ condition: 'and', conditions: [{ condition: 'initialized' }] },
{ condition: 'camera', cameras: ['camera.office'] },
{ condition: 'config', paths: ['menu.style'] },
{ condition: 'display_mode', display_mode: 'single' },
@@ -714,12 +715,14 @@ describe('config defaults', () => {
},
{ condition: 'media_loaded', media_loaded: true },
{ condition: 'microphone', connected: true, muted: true },
{ condition: 'not', conditions: [{ condition: 'initialized' }] },
{
condition: 'numeric_state',
entity: 'sensor.office_temperature',
above: 10,
below: 20,
},
{ condition: 'or', conditions: [{ condition: 'initialized' }] },
{ condition: 'screen', media_query: '(orientation: landscape)' },
{
condition: 'state',