From f5e1dd8c65a7600b703eae2988b8355ca67eb958 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Mon, 25 Mar 2019 01:25:54 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9C=20Merges/Redirect=20Matrix=20compo?= =?UTF-8?q?nent=20pages=20(#9020)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_components/matrix.markdown | 44 +++++++++++++++++++++-- source/_components/notify.matrix.markdown | 44 ----------------------- 2 files changed, 42 insertions(+), 46 deletions(-) delete mode 100644 source/_components/notify.matrix.markdown diff --git a/source/_components/matrix.markdown b/source/_components/matrix.markdown index f3f72b63aa1..4cc3ce41822 100644 --- a/source/_components/matrix.markdown +++ b/source/_components/matrix.markdown @@ -8,12 +8,22 @@ comments: false sharing: true footer: true logo: matrix.png -ha_category: Hub +ha_category: + - Hub + - Notifications ha_release: 0.69 +redirect_from: + - /components/notify.matrix/ --- This component allows you to send messages to matrix rooms, as well as to react to messages in matrix rooms. Reacting to commands is accomplished by firing an event when one of the configured commands is triggered. +There is currently support for the following device types within Home Assistant: + +- [Notifications](#notifications) + +## {% linkable_title Configuration %} + ```yaml # Example configuration.yaml entry matrix: @@ -83,7 +93,7 @@ If the command is a word command, the `data` field contains a list of the comman ### {% linkable_title Comprehensive Configuration Example %} -This example also uses the [matrix `notify` platform](/components/notify.matrix/). +This example also uses the [matrix `notify` platform](#notifications). {% raw %} ```yaml @@ -136,3 +146,33 @@ This configuration will: - Listen for "!testword" in the room "#someothertest:matrix.org" (and *only*) there. If such a message is encountered, it will answer with "It looks like you wrote !testword" into the "#hasstest:matrix.org" channel. - Listen in both rooms for any message matching "My name is " and answer with "Hello " into "#hasstest:matrix.org". + +## {% linkable_title Notifications %} + +The `matrix` platform allows you to deliver notifications from Home Assistant to a [Matrix](http://matrix.org) room. Rooms can be both direct as well as group chats. + +To enable Matrix notifications in your installation, you first need to configure the [Matrix component](#configuration). Then, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +notify: + - name: NOTIFIER_NAME + platform: matrix + default_room: ROOM_ID_OR_ALIAS +``` + +{% configuration %} +name: + description: Setting the optional parameter `name` allows multiple notifiers to be created. The notifier will bind to the service `notify.NOTIFIER_NAME`. + required: false + default: notify + type: string +default_room: + description: The room all messages will be sent to, when no other target is given. + required: true + type: string +{% endconfiguration %} + +The target room has to be precreated, the room id can be obtained from the rooms settings dialog. Rooms by default have a canonical id of the form `"!:homeserver.tld"`, but can also be allocated aliases like `"#roomname:homeserver.tld"`. Make sure to use quotes around the room id or alias to escape special characters (`!`, and `#`) in YAML. The notifying account may need to be invited to the room, depending on the individual rooms policies. + +To use notifications, please see the [getting started with automation page](/getting-started/automation/). \ No newline at end of file diff --git a/source/_components/notify.matrix.markdown b/source/_components/notify.matrix.markdown deleted file mode 100644 index f03d25b734f..00000000000 --- a/source/_components/notify.matrix.markdown +++ /dev/null @@ -1,44 +0,0 @@ ---- -layout: page -title: "Matrix" -description: "Instructions on how to add Matrix notifications to Home Assistant." -date: 2016-10-11 23:51 -sidebar: true -comments: false -sharing: true -footer: true -logo: matrix.png -ha_category: Notifications -ha_release: 0.32 ---- - -The `matrix` platform allows you to deliver notifications from Home Assistant to a [Matrix](http://matrix.org) room. Rooms can be both direct as well as group chats. - -## {% linkable_title Configuration %} - -To enable Matrix notifications in your installation, you first need to configure -the [Matrix component](/components/matrix/). Then, add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -notify: - - name: NOTIFIER_NAME - platform: matrix - default_room: ROOM_ID_OR_ALIAS -``` - -{% configuration %} -name: - description: Setting the optional parameter `name` allows multiple notifiers to be created. The notifier will bind to the service `notify.NOTIFIER_NAME`. - required: false - default: notify - type: string -default_room: - description: The room all messages will be sent to, when no other target is given. - required: true - type: string -{% endconfiguration %} - -The target room has to be precreated, the room id can be obtained from the rooms settings dialog. Rooms by default have a canonical id of the form `"!:homeserver.tld"`, but can also be allocated aliases like `"#roomname:homeserver.tld"`. Make sure to use quotes around the room id or alias to escape special characters (`!`, and `#`) in YAML. The notifying account may need to be invited to the room, depending on the individual rooms policies. - -To use notifications, please see the [getting started with automation page](/getting-started/automation/).