mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-12 20:06:52 +00:00
Documentation for home-assistant/home-assistant-polymer#1848 (#7111)
This commit is contained in:
parent
cf0b549fbd
commit
59e1a47ef4
@ -50,6 +50,11 @@ tap_action:
|
|||||||
description: "Set to `toggle` or `call-service` for direct actions."
|
description: "Set to `toggle` or `call-service` for direct actions."
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: more-info
|
||||||
|
hold_action:
|
||||||
|
required: false
|
||||||
|
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `call-service`).
|
||||||
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
||||||
|
@ -72,6 +72,11 @@ tap_action:
|
|||||||
description: "Set to `toggle` or `call-service` for direct actions."
|
description: "Set to `toggle` or `call-service` for direct actions."
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: more-info
|
||||||
|
hold_action:
|
||||||
|
required: false
|
||||||
|
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `call-service`).
|
||||||
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
||||||
|
@ -91,11 +91,6 @@ service_data:
|
|||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
description: The service data to use.
|
||||||
type: object
|
type: object
|
||||||
hold_time:
|
|
||||||
required: false
|
|
||||||
description: Time in ms for click-and-hold to register.
|
|
||||||
type: integer
|
|
||||||
default: 500
|
|
||||||
style:
|
style:
|
||||||
required: true
|
required: true
|
||||||
description: Position and style the element using CSS.
|
description: Position and style the element using CSS.
|
||||||
@ -144,11 +139,6 @@ service_data:
|
|||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
description: The service data to use.
|
||||||
type: object
|
type: object
|
||||||
hold_time:
|
|
||||||
required: false
|
|
||||||
description: Time in ms for click-and-hold to register.
|
|
||||||
type: integer
|
|
||||||
default: 500
|
|
||||||
style:
|
style:
|
||||||
required: true
|
required: true
|
||||||
description: Position and style the element using CSS.
|
description: Position and style the element using CSS.
|
||||||
@ -223,11 +213,6 @@ service_data:
|
|||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
description: The service data to use.
|
||||||
type: object
|
type: object
|
||||||
hold_time:
|
|
||||||
required: false
|
|
||||||
description: Time in ms for click-and-hold to register.
|
|
||||||
type: integer
|
|
||||||
default: 500
|
|
||||||
style:
|
style:
|
||||||
required: true
|
required: true
|
||||||
description: Position and style the element using CSS.
|
description: Position and style the element using CSS.
|
||||||
@ -268,11 +253,6 @@ service_data:
|
|||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
description: The service data to use.
|
||||||
type: object
|
type: object
|
||||||
hold_time:
|
|
||||||
required: false
|
|
||||||
description: Time in ms for click-and-hold to register.
|
|
||||||
type: integer
|
|
||||||
default: 500
|
|
||||||
image:
|
image:
|
||||||
required: false
|
required: false
|
||||||
description: The image to display.
|
description: The image to display.
|
||||||
@ -353,7 +333,7 @@ state_filter:
|
|||||||
|
|
||||||
## {% linkable_title How to use click-and-hold %}
|
## {% linkable_title How to use click-and-hold %}
|
||||||
|
|
||||||
If the option `hold_action` is specified, that action will be performed when the entity is clicked and held for a certain time (default 0.5 seconds).
|
If the option `hold_action` is specified, that action will be performed when the entity is clicked and held for half a second or more.
|
||||||
Please note that the `tap_action` and `hold_action` share variables for `navigation_path`, `service` and `service_data`. It is therefore not possible to, e.g., call two different services when clicked and when held.
|
Please note that the `tap_action` and `hold_action` share variables for `navigation_path`, `service` and `service_data`. It is therefore not possible to, e.g., call two different services when clicked and when held.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -61,6 +61,11 @@ tap_action:
|
|||||||
description: "Set to `toggle` for turning entity on/off."
|
description: "Set to `toggle` for turning entity on/off."
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: more-info
|
||||||
|
hold_action:
|
||||||
|
required: false
|
||||||
|
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`).
|
||||||
|
type: string
|
||||||
|
default: none
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user