mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Add options to badges (#10286)
* Update views.markdown https://github.com/home-assistant/home-assistant-polymer/pull/3552 * 🚑 Fixed build
This commit is contained in:
parent
729ba9f081
commit
7eea0a9a4d
@ -22,7 +22,7 @@ views:
|
|||||||
type: string
|
type: string
|
||||||
badges:
|
badges:
|
||||||
required: false
|
required: false
|
||||||
description: List of entities IDs to display as badge.
|
description: List of entities IDs or `badge` objects to display as badges.
|
||||||
type: list
|
type: list
|
||||||
cards:
|
cards:
|
||||||
required: false
|
required: false
|
||||||
@ -52,6 +52,44 @@ views:
|
|||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
## Options For Badges
|
||||||
|
|
||||||
|
If you define badges as objects instead of strings (by adding `entity:` before entity ID), allowing you to add more customizations:
|
||||||
|
|
||||||
|
{% configuration badges %}
|
||||||
|
entity:
|
||||||
|
required: true
|
||||||
|
description: Home Assistant entity ID.
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: Overwrites friendly name.
|
||||||
|
type: string
|
||||||
|
icon:
|
||||||
|
required: false
|
||||||
|
description: Overwrites icon or entity picture.
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
required: false
|
||||||
|
description: The URL of an image.
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
View config:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- title: Living room
|
||||||
|
badges:
|
||||||
|
- device_tracker.demo_paulus
|
||||||
|
- entity: light.ceiling_lights
|
||||||
|
name: Ceiling Lights
|
||||||
|
icon: mdi:bulb
|
||||||
|
- entity: switch.decorative_lights
|
||||||
|
image: /local/lights.png
|
||||||
|
```
|
||||||
|
|
||||||
## Paths
|
## Paths
|
||||||
|
|
||||||
You can link to one view from another view by its path. For this use cards that support navigation (`navigation_path`). Do not use special characters in paths.
|
You can link to one view from another view by its path. For this use cards that support navigation (`navigation_path`). Do not use special characters in paths.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user