mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 18:36:51 +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."
|
||||
type: string
|
||||
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:
|
||||
required: false
|
||||
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."
|
||||
type: string
|
||||
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:
|
||||
required: false
|
||||
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
||||
|
@ -91,11 +91,6 @@ service_data:
|
||||
required: false
|
||||
description: The service data to use.
|
||||
type: object
|
||||
hold_time:
|
||||
required: false
|
||||
description: Time in ms for click-and-hold to register.
|
||||
type: integer
|
||||
default: 500
|
||||
style:
|
||||
required: true
|
||||
description: Position and style the element using CSS.
|
||||
@ -144,11 +139,6 @@ service_data:
|
||||
required: false
|
||||
description: The service data to use.
|
||||
type: object
|
||||
hold_time:
|
||||
required: false
|
||||
description: Time in ms for click-and-hold to register.
|
||||
type: integer
|
||||
default: 500
|
||||
style:
|
||||
required: true
|
||||
description: Position and style the element using CSS.
|
||||
@ -223,11 +213,6 @@ service_data:
|
||||
required: false
|
||||
description: The service data to use.
|
||||
type: object
|
||||
hold_time:
|
||||
required: false
|
||||
description: Time in ms for click-and-hold to register.
|
||||
type: integer
|
||||
default: 500
|
||||
style:
|
||||
required: true
|
||||
description: Position and style the element using CSS.
|
||||
@ -268,11 +253,6 @@ service_data:
|
||||
required: false
|
||||
description: The service data to use.
|
||||
type: object
|
||||
hold_time:
|
||||
required: false
|
||||
description: Time in ms for click-and-hold to register.
|
||||
type: integer
|
||||
default: 500
|
||||
image:
|
||||
required: false
|
||||
description: The image to display.
|
||||
@ -353,7 +333,7 @@ state_filter:
|
||||
|
||||
## {% 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.
|
||||
|
||||
```yaml
|
||||
|
@ -61,6 +61,11 @@ tap_action:
|
||||
description: "Set to `toggle` for turning entity on/off."
|
||||
type: string
|
||||
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 %}
|
||||
|
||||
## {% linkable_title Examples %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user