mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 13:56:53 +00:00
Merge pull request #5765 from home-assistant/c727-ll-filter
Lovelace: update filter
This commit is contained in:
commit
0862da461c
@ -26,26 +26,17 @@ type:
|
|||||||
type: string
|
type: string
|
||||||
entities:
|
entities:
|
||||||
required: true
|
required: true
|
||||||
description: "List of entities to show."
|
description: "List of entities to filter."
|
||||||
type: list
|
type: list
|
||||||
keys:
|
|
||||||
name:
|
|
||||||
required: false
|
|
||||||
description: The name to use in the front for the entity.
|
|
||||||
type: string
|
|
||||||
entity:
|
|
||||||
required: false
|
|
||||||
description: "The `entity_id` to show in the frontend."
|
|
||||||
type: string
|
|
||||||
state_filter:
|
state_filter:
|
||||||
required: true
|
required: true
|
||||||
description: Array of strings representing states.
|
description: List of strings representing states.
|
||||||
type: array
|
type: list
|
||||||
card:
|
card:
|
||||||
required: false
|
required: false
|
||||||
description: Extra options to pass down to the card rendering the result.
|
description: Extra options to pass down to the card rendering the result.
|
||||||
type: object
|
type: object
|
||||||
default: entities type
|
default: entities card
|
||||||
show_empty:
|
show_empty:
|
||||||
required: false
|
required: false
|
||||||
description: Allows hiding of card when no entities returned by filter.
|
description: Allows hiding of card when no entities returned by filter.
|
||||||
@ -53,7 +44,7 @@ show_empty:
|
|||||||
default: true
|
default: true
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
### {% linkable_title Examples %}
|
||||||
|
|
||||||
Show only active switches or lights in the house
|
Show only active switches or lights in the house
|
||||||
```yaml
|
```yaml
|
||||||
@ -64,9 +55,7 @@ Show only active switches or lights in the house
|
|||||||
- light.kitchen_lights
|
- light.kitchen_lights
|
||||||
- light.ceiling_lights
|
- light.ceiling_lights
|
||||||
state_filter:
|
state_filter:
|
||||||
- 'on'
|
- "on"
|
||||||
card:
|
|
||||||
title: Eating power
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Show only people that are at home using [glance](/lovelace/glance/):
|
Show only people that are at home using [glance](/lovelace/glance/):
|
||||||
@ -78,13 +67,13 @@ Show only people that are at home using [glance](/lovelace/glance/):
|
|||||||
- device_tracker.demo_anne_therese
|
- device_tracker.demo_anne_therese
|
||||||
- device_tracker.demo_home_boy
|
- device_tracker.demo_home_boy
|
||||||
state_filter:
|
state_filter:
|
||||||
- 'home'
|
- home
|
||||||
card:
|
card:
|
||||||
type: glance
|
type: glance
|
||||||
title: People at home
|
title: People at home
|
||||||
```
|
```
|
||||||
|
|
||||||
<p class='img'>
|
<p class='img'>
|
||||||
<img src='/images/lovelace/lovelace_entity_filter_glance.png' alt='Screenshot of the entity filter used on a Glance card'>
|
<img src='/images/lovelace/lovelace_entity_filter_glance.png' alt='Entity filter combined with glance card'>
|
||||||
Screenshot of the entity filter used on a Glance card.
|
Entity filter combined with glance card.
|
||||||
</p>
|
</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user