Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picture cards: add image from UI #33096

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider starting the sentence with an uppercase letter and correcting the grammar: "Web URL lets you use an image from the web."

-   - **web URL** let you use an image from the web. For example `https://www.home-assistant.io/images/frontpage/assist_wake_word.png`.
+   - **Web URL** lets you use an image from the web. For example: `https://www.home-assistant.io/images/frontpage/assist_wake_word.png`.
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- **web URL** let you use an image from the web. For example `https://www.home-assistant.io/images/frontpage/assist_wake_word.png`.
- **Web URL** lets you use an image from the web. For example: `https://www.home-assistant.io/images/frontpage/assist_wake_word.png`.
Tools
LanguageTool

[typographical] ~15-~15: This sentence does not start with an uppercase letter. (UPPERCASE_SENTENCE_START)
Context: ...-studio-code-vsc-add-on) add-on. - web URL let you use an image from the web...


[typographical] ~15-~15: After the expression ‘for example’ a comma is usually used. (COMMA_FOR_EXAMPLE)
Context: ... let you use an image from the web. For example `https://www.home-assistant.io/images/f...


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.