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

Convert call-service to TypeScript #1985

Merged
merged 3 commits into from
Nov 7, 2018

Conversation

iantrich
Copy link
Member

@iantrich iantrich commented Nov 5, 2018

I'm not sure what type I should use for the config parameter

@ghost ghost assigned iantrich Nov 5, 2018
@ghost ghost added the in progress label Nov 5, 2018
@@ -0,0 +1,8 @@
import { HomeAssistant } from "../../../types";

export const callService = (config: any, hass: HomeAssistant): void => {
Copy link
Member

Choose a reason for hiding this comment

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

The call is indeed a bit weird, but you can derive from the usage of this object what we expect:

interface CallServiceConfig {
  service: string;
  entity: string;
  service_data?: { [key: string]: any };
}

@iantrich iantrich force-pushed the ts-common-functions branch from 8521714 to 3367680 Compare November 7, 2018 03:02
@balloob balloob merged commit f971995 into home-assistant:dev Nov 7, 2018
@ghost ghost removed the in progress label Nov 7, 2018
@iantrich iantrich deleted the ts-common-functions branch November 16, 2018 19:17
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants