Split out fastdotcom into a sensor and component (#8377)

* Split out fastdotcom into a sensor and component

* Correct copy/paste error

* Update ha_category

Co-Authored-By: rohankapoorcom <rohan@rohankapoor.com>

* Consolidate the fastdotcom sensor page back into the component

* ✏️ Tweaks
This commit is contained in:
Rohan Kapoor 2019-02-11 15:06:58 -08:00 committed by Franck Nijhof
parent b3df16f6ee
commit 8461d74947
2 changed files with 86 additions and 73 deletions

View File

@ -0,0 +1,86 @@
---
layout: page
title: "Fast.com"
description: "How to integrate Fast.com within Home Assistant."
date: 2019-02-01 21:30
sidebar: true
comments: false
sharing: true
footer: true
logo: fastdotcom.png
ha_category:
- System Monitor
- Sensor
featured: false
ha_release: 0.88
ha_iot_class: "Cloud Polling"
redirect_form:
- /components/sensor.fastdotcom/
---
The `fastdotcom` component uses the [Fast.com](https://fast.com/) web service to measure network bandwidth performance.
<p class='note'>
Currently fast.com only supports measuring download bandwidth. If you want to measure bandwidth metrics other then download such as ping and upload, utilize the [speedtest](/components/sensor.speedtest) component.
</p>
Enabling this component will automatically create the Fast.com Sensor.
By default, a speed test will be run every hour. The user can change the update frequency in the configuration by defining the `update_interval` for a speed test to run.
## {% linkable_title Configuration %}
To add Fast.com to your installation, add the following to your `configuration.yaml` file:
Once per hour, on the hour (default):
```yaml
fastdotcom:
```
Every half hour of every day:
```yaml
fastdotcom:
update_interval:
minutes: 30
```
{% configuration %}
update_interval:
description: "Minimum time interval between updates. Supported formats: `update_interval: 'HH:MM:SS'`, `update_interval: 'HH:MM'` and Time period dictionary (see example below)."
required: false
default: 60 minutes
type: time
manual:
description: Turn manual mode on or off. Manual mode will disable scheduled speedtests.
required: false
default: false
type: boolean
{% endconfiguration %}
#### {% linkable_title Time period dictionary example %}
```yaml
update_interval:
# At least one of these must be specified:
days: 0
hours: 0
minutes: 3
seconds: 30
milliseconds: 0
```
### {% linkable_title Service %}
Once loaded, the `fastdotcom` component will expose a service (`fastdotcom.speedtest`) that can be called to run a Fast.com speed test on demand. This service takes no parameters. This can be useful if you have enabled manual mode.
```yaml
action:
service: fastdotcom.speedtest
```
## {% linkable_title Notes %}
- When running on Raspberry Pi, the maximum speed is limited by its 100 Mbit/s LAN adapter.
- The sensor will return the maximum measured speed during a 15-second test.

View File

@ -1,73 +0,0 @@
---
layout: page
title: "Fast.com"
description: "How to integrate Fast.com within Home Assistant."
date: 2016-08-10 17:30
sidebar: true
comments: false
sharing: true
footer: true
logo: fastdotcom.png
ha_category: System Monitor
featured: false
ha_release: 0.26
ha_iot_class: "Cloud Polling"
---
The `fastdotcom` sensor component uses the [Fast.com](https://fast.com/) web service to measure network bandwidth performance.
<p class='note'>
Currently fast.com only supports measuring download bandwidth. If you want to measure bandwidth metrics other then download such as ping and upload, utilize the [speedtest](/components/sensor.speedtest) component.
</p>
By default, it will run every hour. The user can change the update frequency in the configuration by defining the minute and hour for a speedtest to run.
## {% linkable_title Configuration %}
To add a Fast.com sensor to your installation, add the following to your `configuration.yaml` file:
Once per hour, on the hour (default):
```yaml
sensor:
- platform: fastdotcom
```
Every half hour of every day:
```yaml
sensor:
- platform: fastdotcom
minute:
- 0
- 30
```
{% configuration %}
second:
description: Specify the second(s) of the hour to schedule the speedtest. Use a list for multiple entries.
required: false
default: 0
type: list
minute:
description: Specify the minute(s) of the hour to schedule the speedtest. Use a list for multiple entries.
required: false
default: 0
type: list
hour:
description: Specify the hour(s) of the day to schedule the speedtest. Use a list for multiple entries.
required: false
type: list
manual:
description: Turn manual mode on or off. Manual mode will disable scheduled speedtests.
required: false
default: false
type: boolean
{% endconfiguration %}
There is also a service named `sensor.update_fastdotcom` that you can use to run a fast.com speedtest on demand. You can turn on manual mode to disable the scheduled speedtests.
## {% linkable_title Notes %}
- When running on Raspberry Pi, just note that the maximum speed is limited by its 100 Mbit/s LAN adapter.
- This entity will return the maximum measured speed during an 15 second test.