-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Fix event documentation example #28402
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @frenck :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny terminology tweak
@@ -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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, a different scene will be triggered depending on whether you press or press and hold the button: |
The MS Style Guide seems to use press and hold / select and hold
https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/p/press-and-hold
also google:
https://support.google.com/accessibility/android/answer/7650693?hl=en
Alternatively, Apple use the term long-press:
https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/handling_uikit_gestures/handling_long-press_gestures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sequence: | ||
- scene: scene.living_room_evening | ||
- conditions: | ||
- alias: "Move" | ||
- alias: "Scene for watching a movie if the button was pressed long" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- alias: "Scene for watching a movie if the button was pressed long" | |
- alias: "Scene for watching a movie if the button was pressed and held" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is matching the Hue wording, that is used in the example.
Proposed change
Adjusts/fixes the event button example, as reported by @Petro31 on Discord in the #beta channel.
It also changes the event types, as at the time of writing, the Hue events didn't exist yet. Now they do, and Hue doesn't have a double press 😅
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.