Propose to add tag/write to frontend external bus (#621)

* Update external-bus.md

* Make `tag/write` expect answer
This commit is contained in:
Paulus Schoutsen 2020-08-20 13:57:31 +02:00 committed by GitHub
parent 26ffb34d5b
commit bf2fa6b6c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,10 +100,12 @@ Expected response payload:
```ts
{
hasSettingsScreen: boolean;
canWriteTag: boolean;
}
```
- `hasSettingsScreen` set to true if the external app will show a configuration screen when it receives the command `config_screen/show`. If so, a new option will be added to the sidebar to trigger the configuration screen.
- `canWriteTag` set to true if the external app is able to write tags and so can support the `tag/write` command.
### Show Config Screen `config_screen/show`
@ -155,3 +157,25 @@ Payload structure:
}
```
### Write Tag `tag/write`
Available in: Home Assistant 0.115
Type: `tag/write`
Direction: frontend to external app
Expect answer: yes
Tell the external app to open the UI to write to a tag. Name is the name of the tag as entered by the user. The name is `null` if no name has been set.
```ts
{
tag: string;
name: string | null;
}
```
Expected response payload is an empty object for now. We might add more later:
```ts
{}
```