From 1e0db23260dca29ffaceddf8f808cfffa8427bc8 Mon Sep 17 00:00:00 2001 From: Timmo Date: Mon, 11 Feb 2019 12:14:04 +0000 Subject: [PATCH] GitHub Sensor (#7942) * :books: Add GitHub sensor component docs * :hammer: Clarify name * :hammer: Fix typo and reword * :hammer: Set optionals * :books: Add examples for both login methods * :hammer: fix grammar Co-Authored-By: timmo001 * :hammer: remove optionals from example * :books: Reword setup section Co-Authored-By: timmo001 * :sparkles: Add enterprise server_url docs * :hammer: Update release number * :books: Update HA Release * :hammer: Change from server_url to url as suggested in main PR * :hammer: Update docs to match changes to sensor * :hammer: Update version --- source/_components/sensor.github.markdown | 57 +++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 source/_components/sensor.github.markdown diff --git a/source/_components/sensor.github.markdown b/source/_components/sensor.github.markdown new file mode 100644 index 00000000000..54750e0260a --- /dev/null +++ b/source/_components/sensor.github.markdown @@ -0,0 +1,57 @@ +--- +layout: page +title: "GitHub Sensor" +description: "How to integrate the GitHub sensor into Home Assistant." +date: 2018-12-24 18:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: github.png +ha_category: Sensor +ha_release: 0.88 +ha_iot_class: "Cloud Polling" +--- + +The GitHub sensor integrates data from [GitHub](https://github.com/) to monitor your favorite repositories. + +## {% linkable_title Setup %} + +To set up this sensor you will need a [personal access token][accesstoken]. You will need to check the `repo` scope for the sensor to function. + +## {% linkable_title Configuration %} + +To enable this platform, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: github + access_token: !secret github_access_token + repositories: + - path: 'home-assistant/home-assistant' +``` + +{% configuration %} +access_token: + description: Your GitHub Access Token + required: true + type: string +url: + description: If you are using a GitHub Enterprise server, add it's URL here. For example, `https://mygithubserver.com` + required: false + type: string +repositories: + description: A list of repository paths and optionally a name + required: true + type: list + keys: + path: + description: Path to the repository. For Home Assistant this will be `home-assistant/home-assistant` + required: true + type: string + name: + description: Name of the sensor. Gives the sensor a custom name in Home Assistant. Defaults to the repository name from GitHub if not specified. + required: false + type: string +{% endconfiguration %}