diff --git a/docs/dev_101_services.md b/docs/dev_101_services.md index 6beacc26..40672df1 100644 --- a/docs/dev_101_services.md +++ b/docs/dev_101_services.md @@ -31,13 +31,25 @@ def setup(hass, config): return True ``` -Load the integration by adding the following to your `configuration.yaml`. When your component is loaded, a new service should be available to call. +To load the integration in Home Assistant is necessary to create a `manifest.json` and to add an entry in your `configuration.yaml`. When your component is loaded, a new service should be available to call. ```yaml # configuration.yaml entry hello_service: ``` +An example of `manifest.json`: + +```json +{ + "domain": "hello_service", + "name": "Hello Service", + "documentation": "https://developers.home-assistant.io/docs/dev_101_services", + "iot_class": "local_push", + "version": "0.1.0" +} +``` + Open the frontend and in the sidebar, click the first icon in the developer tool section. This will open the Call Service developer tool. On the right, find your service and click on it. This will automatically fill in the correct values. Pressing "Call Service" will now call your service without any parameters. This will cause your service to create a state with the default name 'World'. If you want to specify the name, you have to specify a parameter by providing it through Service Data. In YAML mode, add the following and press "Call Service again".