diff --git a/source/_lovelace/entity-button.markdown b/source/_lovelace/entity-button.markdown index 73dbc9e62d7..8bc38b2a8bf 100644 --- a/source/_lovelace/entity-button.markdown +++ b/source/_lovelace/entity-button.markdown @@ -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`" diff --git a/source/_lovelace/glance.markdown b/source/_lovelace/glance.markdown index 32611e47f59..93296e6780d 100644 --- a/source/_lovelace/glance.markdown +++ b/source/_lovelace/glance.markdown @@ -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`" diff --git a/source/_lovelace/picture-elements.markdown b/source/_lovelace/picture-elements.markdown index 54b60b92285..c16b9c28934 100644 --- a/source/_lovelace/picture-elements.markdown +++ b/source/_lovelace/picture-elements.markdown @@ -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 diff --git a/source/_lovelace/picture-entity.markdown b/source/_lovelace/picture-entity.markdown index de390f82299..201641d3790 100644 --- a/source/_lovelace/picture-entity.markdown +++ b/source/_lovelace/picture-entity.markdown @@ -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 %}