5.2 KiB
title, sidebar_label, description
title | sidebar_label | description |
---|---|---|
Picture Card | Picture | A very simple card that allows you to set an image to use for navigation to various paths in your interface or to call a service. |
A very simple card that allows you to set an image to use for navigation to various paths in your interface or to call a service.
Screenshot of the picture card.
{% configuration %}
type:
required: true
description: picture
type: string
image:
required: true
description: The URL of an image.
type: string
theme:
required: false
description: "Set to any theme within themes.yaml
"
type: string
tap_action:
required: false
description: Action to take on tap
type: map
keys:
action:
required: true
description: "Action to perform (call-service
, navigate
, url
, none
)"
type: string
default: "none
"
navigation_path:
required: false
description: "Path to navigate to (e.g. /lovelace/0/
) when action
defined as navigate
"
type: string
default: none
url_path:
required: false
description: "Path to navigate to (e.g. https://www.home-assistant.io
) when action
defined as url
"
type: string
default: none
service:
required: false
description: "Service to call (e.g. media_player.media_play_pause
) when action
defined as call-service
"
type: string
default: none
service_data:
required: false
description: "Service data to include (e.g. entity_id: media_player.bedroom
) when action
defined as call-service
"
type: string
default: none
confirmation:
required: false
description: "Present a confirmation dialog to confirm the action. See confirmation
object below"
type: [boolean, map]
default: "false"
hold_action:
required: false
description: Action to take on tap-and-hold
type: map
keys:
action:
required: true
description: "Action to perform (call-service
, navigate
, url
, none
)"
type: string
default: "none
"
navigation_path:
required: false
description: "Path to navigate to (e.g. /lovelace/0/
) when action
defined as navigate
"
type: string
default: none
url_path:
required: false
description: "Path to navigate to (e.g. https://www.home-assistant.io
) when action
defined as url
"
type: string
default: none
service:
required: false
description: "Service to call (e.g. media_player.media_play_pause
) when action
defined as call-service
"
type: string
default: none
service_data:
required: false
description: "Service data to include (e.g. entity_id: media_player.bedroom
) when action
defined as call-service
"
type: string
default: none
confirmation:
required: false
description: "Present a confirmation dialog to confirm the action. See confirmation
object below"
type: [boolean, map]
default: "false"
double_tap_action:
required: false
description: Action to take on double tap
type: map
keys:
action:
required: true
description: "Action to perform (more-info
, toggle
, call-service
, navigate
, url
, none
)"
type: string
default: "more-info
"
navigation_path:
required: false
description: "Path to navigate to (e.g. /lovelace/0/
) when action
defined as navigate
"
type: string
default: none
url_path:
required: false
description: "Path to navigate to (e.g. https://www.home-assistant.io
) when action
defined as url
"
type: string
default: none
service:
required: false
description: "Service to call (e.g. media_player.media_play_pause
) when action
defined as call-service
"
type: string
default: none
service_data:
required: false
description: "Service data to include (e.g. entity_id: media_player.bedroom
) when action
defined as call-service
"
type: string
default: none
confirmation:
required: false
description: "Present a confirmation dialog to confirm the action. See confirmation
object below"
type: [boolean, map]
default: "false"
{% endconfiguration %}
Options For Confirmation
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
{% configuration %}
text:
required: false
description: Text to present in the confirmation dialog.
type: string
exemptions:
required: false
description: "List of exemption
objects. See below"
type: list
{% endconfiguration %}
Options For Exemptions
{% configuration badges %} user: required: true description: User id that can see the view tab. type: string {% endconfiguration %}
Examples
Navigate to another view:
type: picture
image: /local/home.jpg
tap_action:
action: navigate
navigation_path: /lovelace/home
Check the views setup on how to setup custom IDs.
Toggle entity using a service:
type: picture
image: /local/light.png
service: light.toggle
service_data:
entity_id: light.ceiling_lights