Skip to content

Commit

Permalink
Update config style and 'ha_release' (#3897)
Browse files Browse the repository at this point in the history
* Update config style and 'ha_release'

* Minor changes
  • Loading branch information
fabaff authored Nov 5, 2017
1 parent e32f1cd commit c544427
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 21 deletions.
22 changes: 17 additions & 5 deletions source/_components/binary_sensor.vultr.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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"
---

Expand All @@ -22,21 +22,33 @@ The following examples assume a subscription that has an ID of `123456` and a la
</p>

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
name: totally_awesome_server
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}`
35 changes: 26 additions & 9 deletions source/_components/sensor.vultr.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand All @@ -23,13 +23,37 @@ The following examples assume a subscription that has an ID of `123456` and a la
</p>

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
Expand All @@ -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$).
21 changes: 17 additions & 4 deletions source/_components/switch.vultr.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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"
---

Expand All @@ -22,21 +22,34 @@ The following examples assume a subscription that has an ID of `123456` and a la
</p>

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
name: Amazing Server
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}`
11 changes: 8 additions & 3 deletions source/_components/vultr.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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"
---
Expand All @@ -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.

0 comments on commit c544427

Please sign in to comment.