mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-08 18:06:29 +00:00
manifest.json
required to load the service (#1134)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
be96401076
commit
b177b638df
@ -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".
|
||||
|
Loading…
x
Reference in New Issue
Block a user