mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 02:16:50 +00:00
Event: Terminology tweak on button long-press (#28403)
This commit is contained in:
parent
3082907b2d
commit
fec69b1d34
@ -43,7 +43,7 @@ Besides the timestamp of the last event, the event entity also keeps track of th
|
|||||||
|
|
||||||
This allows you, for example, to trigger a different action when the button on a remote control is pressed once or twice, if your remote control is capable of emitting these different types of events.
|
This allows you, for example, to trigger a different action when the button on a remote control is pressed once or twice, if your remote control is capable of emitting these different types of events.
|
||||||
|
|
||||||
When combining that with the [choose action](/docs/scripts/#choose-a-group-of-actions) script, you can assign multiple different actions to a single event entity. In the following example, pressing the button on the remote short or long will trigger a different scene:
|
When combining that with the [choose action](/docs/scripts/#choose-a-group-of-actions) script, you can assign multiple different actions to a single event entity. In the following example, short- or long-pressing the button on the remote will trigger a different scene:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
trigger:
|
trigger:
|
||||||
@ -53,7 +53,7 @@ action:
|
|||||||
- alias: "Choose an action based on the type of event"
|
- alias: "Choose an action based on the type of event"
|
||||||
choose:
|
choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- alias: "Normal evening scene if the button was pressed shortly"
|
- alias: "Normal evening scene if the button was pressed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: event.hue_remote_control_on_button
|
entity_id: event.hue_remote_control_on_button
|
||||||
attribute: "event_type"
|
attribute: "event_type"
|
||||||
@ -61,7 +61,7 @@ action:
|
|||||||
sequence:
|
sequence:
|
||||||
- scene: scene.living_room_evening
|
- scene: scene.living_room_evening
|
||||||
- conditions:
|
- conditions:
|
||||||
- alias: "Scene for watching a movie if the button was pressed long"
|
- alias: "Scene for watching a movie if the button was long-pressed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: event.hue_remote_control_on_button
|
entity_id: event.hue_remote_control_on_button
|
||||||
attribute: "event_type"
|
attribute: "event_type"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user