Allow using more than one keyboard remote#11061
Merged
balloob merged 3 commits intohome-assistant:devfrom Dec 14, 2017
Merged
Conversation
This sets up one thread per keyboard remote, listening for events.
Contributor
|
Hi @BryanJacobs, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
balloob
reviewed
Dec 10, 2017
| vol.Optional(TYPE, default='key_up'): | ||
| vol.All(cv.string, vol.Any('key_up', 'key_down', 'key_hold')), | ||
| vol.All(cv.string, vol.Any('key_up', 'key_down', 'key_hold')), | ||
| vol.Exclusive(DEVICES, DEVICE_ID_GROUP): vol.All(cv.ensure_list, [ |
Member
There was a problem hiding this comment.
Instead of adding ensure_list here, you can just wrap the whole DOMAIN config as an ensure list. No need to specify the schema twice.
Contributor
Author
There was a problem hiding this comment.
I have done so. Be aware this means you can never backwards-compatibly add module-level (not keyboard-level) configuration options in the future.
balloob
requested changes
Dec 10, 2017
Member
balloob
left a comment
There was a problem hiding this comment.
Instead of adding a new devices key, just wrap the whole config in an ensure list, that way you are backwards compatible and support multiple keyboards.
houndci-bot
reviewed
Dec 11, 2017
e67e396 to
1d6bef4
Compare
houndci-bot
reviewed
Dec 11, 2017
| not config.get(DEVICE_NAME): | ||
| _LOGGER.error("No device_descriptor or device_name found") | ||
| not config.get(DEVICE_NAME) and\ | ||
| not config.get(DEVICES): |
balloob
approved these changes
Dec 14, 2017
akatrevorjay
added a commit
to akatrevorjay/home-assistant
that referenced
this pull request
Dec 15, 2017
…into dev * 'dev' of https://github.com/home-assistant/home-assistant: Disable html5 notify dependency (home-assistant#11135) ISY994 sensor improvements (home-assistant#10805) Allow using more than one keyboard remote (home-assistant#11061) set default utc offset to 0 (home-assistant#11114) Add problem device class (home-assistant#11130) Always consume the no_throttle keyword argument. (home-assistant#11126) Skip HASS emulated Hue bridges from detection. (home-assistant#11128) update pyripple (home-assistant#11122) Add media position properties (home-assistant#10076) Fixed typo in automation.py (home-assistant#11116)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This sets up one thread per keyboard remote, listening for events.
Various "air mouse" devices expose more than one evdev device. To use buttons that manifest as keyboard keys and buttons that manifest as multimedia keys on the same instance of home-assistant, it's necessary to set up more than one event listener.
Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
Documentation added/updated in home-assistant.github.io
If the code does not interact with devices:
toxrun successfully. Your PR cannot be merged unless tests passNo tests have been added, as this component appears to be untested already.