From c54442720f148c1f6b4a6a2d9b7b87c4a1e0fdac Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Nov 2017 15:29:40 +0100 Subject: [PATCH] Update config style and 'ha_release' (#3897) * Update config style and 'ha_release' * Minor changes --- .../_components/binary_sensor.vultr.markdown | 22 +++++++++--- source/_components/sensor.vultr.markdown | 35 ++++++++++++++----- source/_components/switch.vultr.markdown | 21 ++++++++--- source/_components/vultr.markdown | 11 ++++-- 4 files changed, 68 insertions(+), 21 deletions(-) diff --git a/source/_components/binary_sensor.vultr.markdown b/source/_components/binary_sensor.vultr.markdown index cb1421e38e1..a78cb30dc37 100644 --- a/source/_components/binary_sensor.vultr.markdown +++ b/source/_components/binary_sensor.vultr.markdown @@ -9,7 +9,7 @@ sharing: true footer: true ha_category: System Monitor logo: vultr.png -ha_release: "0.57" +ha_release: "0.58" ha_iot_class: "Cloud Polling" --- @@ -22,13 +22,29 @@ The following examples assume a subscription that has an ID of `123456` and a la

Minimal `configuration.yaml` (produces `binary_sensor.vultr_web_server`): + ```yaml +# Example configuration.yaml entry binary_sensor: - platform: vultr subscription: 123456 ``` +{% configuration %} +subscription: + description: The subscription you want to monitor, this can be found in the URL when viewing a server. + required: true + type: string +name: + description: The name you want to give this binary sensor. + required: false + default: "Vultr {subscription label}" + type: string +{% endconfiguration %} + + Full `configuration.yaml` (produces `binary_sensor.totally_awesome_server`): + ```yaml binary_sensor: - platform: vultr @@ -36,7 +52,3 @@ binary_sensor: subscription: 12345 ``` -Configuration variables: - -- **subscription** (*Required*): The subscription you want to monitor, this can be found in the URL when viewing a server -- **name** (*Optional*): The name you want to give this binary sensor, defaults to `Vultr {subscription label}` diff --git a/source/_components/sensor.vultr.markdown b/source/_components/sensor.vultr.markdown index 154a21ba044..5aa03c73931 100644 --- a/source/_components/sensor.vultr.markdown +++ b/source/_components/sensor.vultr.markdown @@ -8,13 +8,13 @@ comments: false sharing: true footer: true logo: vultr.png -ha_release: "0.57" +ha_release: "0.58" ha_category: System Monitor ha_iot_class: "Cloud Polling" --- -The `vultr` sensor will allow you to view current bandwidth usage and pending charges against your [Vultr](https://www.vultr.com/) subscription. +The `vultr` sensor platform will allow you to view current bandwidth usage and pending charges against your [Vultr](https://www.vultr.com/) subscription. To use this sensor, you must set up your [Vultr hub](/components/vultr/). @@ -23,13 +23,37 @@ The following examples assume a subscription that has an ID of `123456` and a la

Minimal `configuration.yaml` (produces `sensor.vultr_web_server_current_bandwidth_used` and `sensor.vultr_web_server_pending_charges`): + ```yaml sensor: - platform: vultr subscription: 123456 ``` +{% configuration %} +subscription: + description: The Vultr subscription to monitor, this can be found in the URL when viewing a subscription. + required: true + type: string +name: + description: The name to give this sensor. + required: false + default: "Vultr {Vultr subscription label} {monitored condition name}" + type: string +monitored_conditions: + description: List of items you want to monitor for each subscription. + required: false + detault: All conditions + type: list + keys: + current_bandwidth_used: + description: The current (invoice period) bandwidth usage in Gigabytes (GB). + temperature: + pending_charges: The current (invoice period) charges that have built up for this subscription. Value is in US Dollars (US$). +{% endconfiguration %} + Full `configuration.yaml` using `{}` to format condition name (produces `sensor.server_current_bandwidth_used` and `sensor.server_pending_charges`): + ```yaml sensor: - platform: vultr @@ -50,10 +74,3 @@ sensor: - current_bandwidth_used ``` -Configuration variables: - -- **subscription** (*Required*): The Vultr subscription to monitor, this can be found in the URL when viewing a subscription -- **name** (*Optional*): The name to give this sensor, defaults to `Vultr {Vultr subscription label} {monitored condition name}`. -- **monitored_conditions** array (*Optional*): List of items you want to monitor for each subscription. Defaults to all of them if omitted. - - **current_bandwidth_used**: The current (invoice period) bandwidth usage in Gigabytes (GB). - - **pending_charges**: The current (invoice period) charges that have built up for this subscription. Value is in US Dollars (US$). diff --git a/source/_components/switch.vultr.markdown b/source/_components/switch.vultr.markdown index 0ac0bb3ad1e..087be7fe925 100644 --- a/source/_components/switch.vultr.markdown +++ b/source/_components/switch.vultr.markdown @@ -9,7 +9,7 @@ sharing: true footer: true logo: vultr.png ha_category: Switch -ha_release: "0.57" +ha_release: "0.58" ha_iot_class: "Cloud Polling" --- @@ -22,13 +22,29 @@ The following examples assume a subscription that has an ID of `123456` and a la

Minimal `configuration.yaml` (produces `switch.vultr_web_server`): + ```yaml +# Example configuration.yaml entry switch: - platform: vultr subscription: 123456 ``` +{% configuration %} +subscription: + description: List of droplets you want to control. + required: true + type: string +name: + description: The name you want to give this switch. + required: false + default: "Vultr {subscription label}" + type: string +{% endconfiguration %} + + Full `configuration.yaml` (produces `switch.amazing_server`): + ```yaml switch: - platform: vultr @@ -36,7 +52,4 @@ switch: subscription: 123456 ``` -Configuration variables: -- **subscription** (*Required*): List of droplets you want to control. -- **name** (*Optional*): The name you want to give this switch, defaults to `Vultr {subscription label}` diff --git a/source/_components/vultr.markdown b/source/_components/vultr.markdown index 411f89f2c52..187ddaab3f3 100644 --- a/source/_components/vultr.markdown +++ b/source/_components/vultr.markdown @@ -9,7 +9,7 @@ sharing: true footer: true featured: false ha_category: Hub -ha_release: "0.57" +ha_release: "0.58" logo: vultr.png ha_iot_class: "Cloud Polling" --- @@ -26,10 +26,15 @@ Ensure you allow the public IP of Home Assistant under the Access Control headin To integrate your Vultr subscriptions with Home Assistant, add the following section to your `configuration.yaml` file: ```yaml +# Example configuration.yaml entry vultr: api_key: ABCDEFG12345 ``` -Configuration variables: +{% configuration %} +api_key: + description: Your Vultr API key. + required: true + type: string +{% endconfiguration %} -- **api_key** (*Required*): Your Vultr API key.