Update demo
This commit is contained in:
parent
d03449c60a
commit
ac5d576c5b
|
@ -85,7 +85,7 @@ const CONFIGS = [
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: "Filtered entities (== on || home)",
|
heading: "On and home entities",
|
||||||
config: `
|
config: `
|
||||||
- type: entity-filter
|
- type: entity-filter
|
||||||
entities:
|
entities:
|
||||||
|
@ -103,7 +103,24 @@ const CONFIGS = [
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: 'With "entities" card config (== on || not_home)',
|
heading: "Same state as Bed Light",
|
||||||
|
config: `
|
||||||
|
- type: entity-filter
|
||||||
|
entities:
|
||||||
|
- device_tracker.demo_anne_therese
|
||||||
|
- device_tracker.demo_home_boy
|
||||||
|
- device_tracker.demo_paulus
|
||||||
|
- light.bed_light
|
||||||
|
- light.ceiling_lights
|
||||||
|
- light.kitchen_lights
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
state:
|
||||||
|
- light.bed_light
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
heading: 'With "entities" card config',
|
||||||
config: `
|
config: `
|
||||||
- type: entity-filter
|
- type: entity-filter
|
||||||
entities:
|
entities:
|
||||||
|
@ -125,7 +142,7 @@ const CONFIGS = [
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
heading: 'With "glance" card config (== on || not_home)',
|
heading: 'With "glance" card config',
|
||||||
config: `
|
config: `
|
||||||
- type: entity-filter
|
- type: entity-filter
|
||||||
entities:
|
entities:
|
||||||
|
|
|
@ -200,8 +200,8 @@ export function extractConditionEntityIds(
|
||||||
}
|
}
|
||||||
} else if (condition.condition === "state") {
|
} else if (condition.condition === "state") {
|
||||||
[
|
[
|
||||||
...ensureArray(condition.state),
|
...(ensureArray(condition.state) ?? []),
|
||||||
...ensureArray(condition.state_not),
|
...(ensureArray(condition.state_not) ?? []),
|
||||||
].forEach((state) => {
|
].forEach((state) => {
|
||||||
if (!!state && isValidEntityId(state)) {
|
if (!!state && isValidEntityId(state)) {
|
||||||
entityIds.add(state);
|
entityIds.add(state);
|
||||||
|
|
Loading…
Reference in New Issue