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

Fix event documentation example #28402

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Fix event documentation example #28402

merged 1 commit into from
Aug 2, 2023

Conversation

frenck
Copy link
Member

@frenck frenck commented Aug 2, 2023

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

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

  • Link to parent pull request in the codebase:
  • Link to parent pull request in the Brands repository:
  • This PR fixes or closes issue: fixes #

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

@frenck frenck added this to the 2023.8 milestone Aug 2, 2023
@home-assistant home-assistant bot added in-progress This PR/Issue is currently being worked on needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch next This PR goes into the next branch labels Aug 2, 2023
@home-assistant

This comment was marked as outdated.

@frenck frenck removed in-progress This PR/Issue is currently being worked on needs-rebase The PR has been branched of the wrong base branch or targets an incorrect target branch labels Aug 2, 2023
Copy link
Contributor

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @frenck :P

@edenhaus edenhaus merged commit 312fc40 into next Aug 2, 2023
@edenhaus edenhaus deleted the frenck-2023-1110 branch August 2, 2023 07:28
Copy link
Contributor

@c0ffeeca7 c0ffeeca7 left a 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

@frenck frenck Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this case, as it is a physical remote, and not an UI button.

As per Microsoft:

CleanShot 2023-08-02 at 09 44 16

This is a hardware button, so matches the guides.

sequence:
- scene: scene.living_room_evening
- conditions:
- alias: "Move"
- alias: "Scene for watching a movie if the button was pressed long"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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"

Copy link
Member Author

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.

@frenck frenck added the cherry-picked This PR has been manually picked and merged into the current branch label Aug 2, 2023
frenck added a commit that referenced this pull request Aug 2, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cherry-picked This PR has been manually picked and merged into the current branch next This PR goes into the next branch
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants