Skip to content

Commit

Permalink
Picture cards: add image from UI (#33096)
Browse files Browse the repository at this point in the history
  • Loading branch information
c0ffeeca7 authored and frenck committed Jun 5, 2024
1 parent 20bd4c5 commit b83c9ec
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/_dashboards/picture-entity.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The picture entity card displays an entity in the form of an image. Instead of i
Background changes according to the entity state.
</p>

{% include dashboard/edit_dashboard.md %}
{% include dashboard/add_picture_to_card.md %}

## YAML configuration

Expand Down
2 changes: 1 addition & 1 deletion source/_dashboards/picture-glance.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The picture glance card shows an image and lets you place small icons of entity
Picture glance card for a living room.
</p>

{% include dashboard/edit_dashboard.md %}
{% include dashboard/add_picture_to_card.md %}

## YAML configuration

Expand Down
2 changes: 1 addition & 1 deletion source/_dashboards/picture.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The picture card allows you to set an image to use for navigation to various pat
Screenshot of the picture card.
</p>

{% include dashboard/edit_dashboard.md %}
{% include dashboard/add_picture_to_card.md %}

## YAML configuration

Expand Down
20 changes: 20 additions & 0 deletions source/_includes/dashboard/add_picture_to_card.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% capture name %}{{ include.name | default: page.title }}{% endcapture %}
{% capture domain %}{{ include.domain | default: page.ha_domain }}{% endcapture %}
{% capture title %}{{ include.title | default: page.title }}{% endcapture %}

## Adding a {{ title | downcase }} to your dashboard

1. To add a card, follow steps 1-4 on [adding a card from a view](/dashboards/cards/#to-add-a-card-from-a-view).
- In step 2, on the **By card** tab, select {{ title | downcase }}.

2. Add a picture:

- **Upload picture** lets you pick an image from the system used to show your Home Assistant UI.
- **Local path** lets you pick an image stored on Home Assistant. For example: `/homeassistant/images/lights_view_background_image.jpg`.
- To store an image on Home Assistant, you need to [configure access to files](/common-tasks/os/#configuring-access-to-files), for example via [Samba](/common-tasks/os/#installing-and-using-the-samba-add-on) or the [Studio Code Server](/common-tasks/os/#installing-and-using-the-visual-studio-code-vsc-add-on) add-on.
- **web URL** let you use an image from the web. For example `https://www.home-assistant.io/images/frontpage/assist_wake_word.png`.

3. Define the parameters that are specific to the {{ title | downcase }}.
- For a description of the specific settings, refer to the description under YAML configuration.
- They also apply to the UI.
4. Save your changes.

0 comments on commit b83c9ec

Please sign in to comment.