Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

HomeAssistant: Convert image instructions to code blocks.

Niloth P51839a72b9f7
diff --git a/static/images/integrations/homeassistant/001.png b/static/images/integrations/homeassistant/001.png
index 6417ef884e5..c6c831a7718 100644
Binary files a/static/images/integrations/homeassistant/001.png and b/static/images/integrations/homeassistant/001.png differ
diff --git a/static/images/integrations/homeassistant/002.png b/static/images/integrations/homeassistant/002.png
deleted file mode 100644
index 6d327a5ef18..00000000000
Binary files a/static/images/integrations/homeassistant/002.png and /dev/null differ
diff --git a/static/images/integrations/homeassistant/003.png b/static/images/integrations/homeassistant/003.png
deleted file mode 100644
index c6c831a7718..00000000000
Binary files a/static/images/integrations/homeassistant/003.png and /dev/null differ
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
index bce57919c7b..c2af406cd35 100644
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -737,7 +737,7 @@ DOC_SCREENSHOT_CONFIG: dict[str, list[BaseScreenshotConfig]] = {
],
"helloworld": [ScreenshotConfig("hello.json")],
"heroku": [ScreenshotConfig("deploy.txt")],
- "homeassistant": [ScreenshotConfig("reqwithtitle.json", image_name="003.png")],
+ "homeassistant": [ScreenshotConfig("reqwithtitle.json")],
"insping": [ScreenshotConfig("website_state_available.json")],
"intercom": [ScreenshotConfig("conversation_admin_replied.json")],
"jira": [ScreenshotConfig("created_v1.json")],
diff --git a/zerver/webhooks/homeassistant/doc.md b/zerver/webhooks/homeassistant/doc.md
index c07ee510429..6270496e4d8 100644
--- a/zerver/webhooks/homeassistant/doc.md
+++ b/zerver/webhooks/homeassistant/doc.md
@@ -5,7 +5,13 @@
1. In Home Assistant, you need to add the `notify` service to your
`configuration.yaml` file. This should look something like this:
- ![](/static/images/integrations/homeassistant/001.png)
+ ```
+ notify:
+ - platform: rest
+ resource: http: {{ external_api_uri }}v1/external/homeassistant?api_key=<API key>
+ method: POST_JSON
+ title_param_name: topic
+ ```
1. The `api_key` parameter should correspond to your bot's key. The `stream`
parameter is not necessarily required; if not given, it will default to
@@ -18,7 +24,17 @@
1. Finally, you need to configure a trigger for the service by adding
an automation entry in the HomeAssistant `configuration.yaml` file.
- ![](/static/images/integrations/homeassistant/002.png)
+ ```
+ automation:
+ trigger:
+ platform: sun
+ event: sunrise
+ action:
+ - service: notify.notify
+ data:
+ message: "It will be 30 degrees Celsius out there today!"
+ title: "Weather forecast"
+ ```
The `data` object takes at least a `message` property and an optional
`title` parameter which will be the conversation topic and which defaults
@@ -26,4 +42,4 @@
{!congrats.md!}
-![](/static/images/integrations/homeassistant/003.png)
+![](/static/images/integrations/homeassistant/001.png)