Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event: Terminology tweak on button long-press #28403

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/_integrations/event.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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
trigger:
Expand All @@ -53,15 +53,15 @@ action:
- alias: "Choose an action based on the type of event"
choose:
- conditions:
- alias: "Normal evening scene if the button was pressed shortly"
- alias: "Normal evening scene if the button was pressed"
condition: state
entity_id: event.hue_remote_control_on_button
attribute: "event_type"
state: "short_release"
sequence:
- scene: scene.living_room_evening
- 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
entity_id: event.hue_remote_control_on_button
attribute: "event_type"
Expand Down