Skip to content

Commit

Permalink
Fix event documentation example (#28402)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Aug 2, 2023
1 parent d53dc9b commit 3082907
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 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 once or twice 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, pressing the button on the remote short or long will trigger a different scene:
```yaml
trigger:
Expand All @@ -53,19 +53,19 @@ action:
- alias: "Choose an action based on the type of event"
choose:
- conditions:
- alias: "Normal evening scene if the button was pressed once"
- alias: "Normal evening scene if the button was pressed shortly"
condition: state
entity_id: event.hue_remote_control_on_button
attribute: "event_type"
state: "single_press"
state: "short_release"
sequence:
- scene: scene.living_room_evening
- conditions:
- alias: "Move"
- alias: "Scene for watching a movie if the button was pressed long"
condition: state
entity_id: event.hue_remote_control_on_button
attribute: "event_type"
state: "single_press"
state: "long_release"
sequence:
- scene: scene.living_room_movie
```
Expand Down

0 comments on commit 3082907

Please sign in to comment.