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

Admin service to automatically add empty schema #22637

Merged
merged 2 commits into from
Apr 2, 2019
Merged

Conversation

balloob
Copy link
Member

@balloob balloob commented Apr 1, 2019

Description:

Don't require services without a schema to define one, instead just add a schema.

Per discussion #22609 (comment)

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@balloob balloob requested a review from a team as a code owner April 1, 2019 19:51
@ghost ghost assigned balloob Apr 1, 2019
@ghost ghost added the in progress label Apr 1, 2019
def async_register_admin_service(
hass: typing.HomeAssistantType, domain: str,
service: str, service_func: Callable,
schema: vol.Schema = vol.Schema({}, extra=vol.PREVENT_EXTRA)) -> None:

Choose a reason for hiding this comment

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

missing whitespace around parameter equals

Copy link
Member

@rohankapoorcom rohankapoorcom left a comment

Choose a reason for hiding this comment

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

LGTM

@balloob balloob merged commit e00ae35 into dev Apr 2, 2019
@delete-merged-branch delete-merged-branch bot deleted the admin-empty-schema branch April 2, 2019 16:34
@ghost ghost removed the in progress label Apr 2, 2019
unibeck pushed a commit to unibeck/home-assistant that referenced this pull request Apr 7, 2019
* Admin service to automatically add empty schema

* Lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants