From bf2fa6b6c710eaae69f898fbaafc4d5c138d3fae Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 20 Aug 2020 13:57:31 +0200 Subject: [PATCH] Propose to add `tag/write` to frontend external bus (#621) * Update external-bus.md * Make `tag/write` expect answer --- docs/frontend/external-bus.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/frontend/external-bus.md b/docs/frontend/external-bus.md index ec5517b0..2bb0ba67 100644 --- a/docs/frontend/external-bus.md +++ b/docs/frontend/external-bus.md @@ -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 +{} +```