From c840d6bb720366d5cb10682441647208fbdd34b8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 2 Oct 2016 17:14:29 +0200 Subject: [PATCH] Minimizing of the configuration sample (#1044) --- source/_components/sensor.cpuspeed.markdown | 3 +- source/_components/sensor.fastdotcom.markdown | 10 +-- .../sensor.fritzbox_callmonitor.markdown | 2 +- source/_components/sensor.glances.markdown | 40 +++++----- source/_components/sensor.hp_ilo.markdown | 65 ++++++++-------- .../_components/sensor.linux_battery.markdown | 2 - source/_components/sensor.pi_hole.markdown | 3 - source/_components/sensor.snmp.markdown | 14 ++-- source/_components/sensor.speedtest.markdown | 76 ++++++++++--------- .../_components/sensor.supervisord.markdown | 3 +- 10 files changed, 106 insertions(+), 112 deletions(-) diff --git a/source/_components/sensor.cpuspeed.markdown b/source/_components/sensor.cpuspeed.markdown index 14df61d0ac6..d876d37fc4d 100644 --- a/source/_components/sensor.cpuspeed.markdown +++ b/source/_components/sensor.cpuspeed.markdown @@ -20,8 +20,7 @@ To add this platform to your installation, add the following to your `configurat ```yaml # Example configuration.yaml entry sensor: - platform: cpuspeed - name: CPU + - platform: cpuspeed ``` Configuration variables: diff --git a/source/_components/sensor.fastdotcom.markdown b/source/_components/sensor.fastdotcom.markdown index 69130b5a3d8..b7e7e06e385 100644 --- a/source/_components/sensor.fastdotcom.markdown +++ b/source/_components/sensor.fastdotcom.markdown @@ -23,7 +23,7 @@ Once per hour, on the hour (default): ```yaml sensor: - platform: fastdotcom + - platform: fastdotcom ``` More examples: @@ -32,10 +32,10 @@ Every half hour of every day: ```yaml sensor: - platform: fastdotcom - minute: - - 0 - - 30 + - platform: fastdotcom + minute: + - 0 + - 30 ``` Configuration variables: diff --git a/source/_components/sensor.fritzbox_callmonitor.markdown b/source/_components/sensor.fritzbox_callmonitor.markdown index 290b9bc5051..f792d0a3291 100644 --- a/source/_components/sensor.fritzbox_callmonitor.markdown +++ b/source/_components/sensor.fritzbox_callmonitor.markdown @@ -24,7 +24,7 @@ To use the Fritz!Box call monitor in your installation, add the following to you ```yaml # Example configuration.yaml entry sensor: - platform: fritzbox_callmonitor + - platform: fritzbox_callmonitor ``` Configuration variables: diff --git a/source/_components/sensor.glances.markdown b/source/_components/sensor.glances.markdown index e0079f4737d..daaa3b9a281 100644 --- a/source/_components/sensor.glances.markdown +++ b/source/_components/sensor.glances.markdown @@ -35,31 +35,29 @@ To enable the glances sensor, add the following lines to your `configuration.yam ```yaml # Example configuration.yaml entry sensor: - platform: glances - name: Glances sensor - host: IP_ADDRESS - port: 61208 - resources: - - 'disk_use_percent' - - 'disk_use' - - 'disk_free' - - 'memory_use_percent' - - 'memory_use' - - 'memory_free' - - 'swap_use_percent' - - 'swap_use' - - 'swap_free' - - 'processor_load' - - 'process_running' - - 'process_total' - - 'process_thread' - - 'process_sleeping' + - platform: glances + host: IP_ADDRESS + resources: + - 'disk_use_percent' + - 'disk_use' + - 'disk_free' + - 'memory_use_percent' + - 'memory_use' + - 'memory_free' + - 'swap_use_percent' + - 'swap_use' + - 'swap_free' + - 'processor_load' + - 'process_running' + - 'process_total' + - 'process_thread' + - 'process_sleeping' ``` Configuration variables: -- **host** (*Required*): The IP address of your host, eg. 192.168.1.32. -- **port** (*Option*): The network port to connect to. Default is 61208. +- **host** (*Required*): The IP address of your host, eg. `192.168.1.32`. +- **port** (*Option*): The network port to connect to. Default is `61208`. - **name** (*Optional*): Name of the Glances sensor. - **resources** (*Required*): Entries to monitor. - **disk_use_percent**: Used disk space in percent diff --git a/source/_components/sensor.hp_ilo.markdown b/source/_components/sensor.hp_ilo.markdown index e57ebe9c83c..69a5f170a45 100644 --- a/source/_components/sensor.hp_ilo.markdown +++ b/source/_components/sensor.hp_ilo.markdown @@ -31,40 +31,39 @@ To use this component in your installation, add the following to your `configura ```yaml # Example configuration.yaml entry sensor: - platform: hp_ilo - host: IP_ADDRESS or HOSTNAME - port: PORT - username: USERNAME - password: PASSWORD - monitored_variables: - - server_name - - server_fqdn - - server_host_data - - server_oa_info - - server_power_status - - server_power_readings - - server_power_on_time - - server_asset_tag - - server_uid_status - - server_health - - network_settings + - platform: hp_ilo + host: IP_ADDRESS or HOSTNAME + username: USERNAME + password: PASSWORD + monitored_variables: + - server_name + - server_fqdn + - server_host_data + - server_oa_info + - server_power_status + - server_power_readings + - server_power_on_time + - server_asset_tag + - server_uid_status + - server_health + - network_settings ``` Configuration variables: -- **host** (*Required*): The hostname or IP address on which the ILO can be reached -- **port** (*Optional*): The port on which the ILO can be reached, defaults to port 443 -- **username** (*Required*): The username used to connect to the ILO -- **password** (*Required*): The password used to connect to the ILO -- **monitored_variables** array (*Optional*): Information to be collected from the ILO, defaults to `server_name` - - **server_name**: Get the name of the server this iLO is managing - - **server_fqdn**: Get the fqdn of the server this iLO is managing - - **server_host_data**: Get SMBIOS records that describe the host - - **server_oa_info**: Get information about the Onboard Administrator of the enclosing chassis - - **server_power_status**: Whether the server is powered on or not - - **server_power_readings**: Get current, min, max and average power readings - - **server_power_on_time**: How many minutes ago has the server been powered on - - **server_asset_tag**: Gets the server asset tag - - **server_uid_status**: Get the status of the UID light - - **server_health**: Get server health information - - **network_settings**: Get the iLO network settings +- **host** (*Required*): The hostname or IP address on which the ILO can be reached. +- **port** (*Optional*): The port on which the ILO can be reached, defaults to port `443`. +- **username** (*Required*): The username used to connect to the ILO. +- **password** (*Required*): The password used to connect to the ILO. +- **monitored_variables** array (*Optional*): Information to be collected from the ILO, defaults to `server_name`. + - **server_name**: Get the name of the server this iLO is managing. + - **server_fqdn**: Get the fqdn of the server this iLO is managing. + - **server_host_data**: Get SMBIOS records that describe the host. + - **server_oa_info**: Get information about the Onboard Administrator of the enclosing chassis. + - **server_power_status**: Whether the server is powered on or not. + - **server_power_readings**: Get current, min, max and average power readings. + - **server_power_on_time**: How many minutes ago has the server been powered on. + - **server_asset_tag**: Gets the server asset tag. + - **server_uid_status**: Get the status of the UID light. + - **server_health**: Get server health information. + - **network_settings**: Get the iLO network settings. diff --git a/source/_components/sensor.linux_battery.markdown b/source/_components/sensor.linux_battery.markdown index f0ab5a44008..173946b94f0 100644 --- a/source/_components/sensor.linux_battery.markdown +++ b/source/_components/sensor.linux_battery.markdown @@ -20,8 +20,6 @@ To setup a battery sensor to your installation, add the following to your `confi # Example configuration.yaml entry sensor: - platform: linux_battery - name: Laptop - battery: 1 ``` Configuration variables: diff --git a/source/_components/sensor.pi_hole.markdown b/source/_components/sensor.pi_hole.markdown index 7545dd91738..ae7c97c8abf 100644 --- a/source/_components/sensor.pi_hole.markdown +++ b/source/_components/sensor.pi_hole.markdown @@ -22,9 +22,6 @@ To enable this sensor, add the following lines to your `configuration.yaml` file # Example configuration.yaml entry sensor: - platform: pi_hole - host: 192.168.1.2 - ssl: True - verify_ssl: ``` Configuration variables: diff --git a/source/_components/sensor.snmp.markdown b/source/_components/sensor.snmp.markdown index dad233bf380..d73d049fdb9 100644 --- a/source/_components/sensor.snmp.markdown +++ b/source/_components/sensor.snmp.markdown @@ -21,19 +21,15 @@ To enable this sensor in your installation, add the following to your `configura ```yaml # Example configuration.yaml entry sensor: - platform: snmp - name: Load - host: 192.168.1.32 - port: 161 - community: public - baseoid: 1.3.6.1.4.1.2021.10.1.3.1 - unit_of_measurement: "%" + - platform: snmp + host: 192.168.1.32 + baseoid: 1.3.6.1.4.1.2021.10.1.3.1 ``` Configuration variables: -- **host** (*Required*): The IP address of your host, eg. 192.168.1.32. -- **port** (*Option*): The SNMP port of your host. Defaults to 161. +- **host** (*Required*): The IP address of your host, eg. `192.168.1.32`. +- **port** (*Option*): The SNMP port of your host. Defaults to `161`. - **name** (*Optional*): Name of the SNMP sensor. - **community** (*Optional*): The SNMP community which is set for the device. Most devices have a default community set to to `public` with read-only permission (which is sufficient). - **baseoid** (*Required*): The OID where the information is located. It's advised to use the numerical notation. diff --git a/source/_components/sensor.speedtest.markdown b/source/_components/sensor.speedtest.markdown index d7257c9a12f..10d9d02cb2a 100644 --- a/source/_components/sensor.speedtest.markdown +++ b/source/_components/sensor.speedtest.markdown @@ -22,42 +22,9 @@ To add a Speedtest.net sensor to your installation, add the following to your `c Once per hour, on the hour (default): ```yaml +# Example configuration.yaml entry sensor: platform: speedtest - server_id: 1234 - monitored_conditions: - - ping - - download - - upload -``` - -More examples: - -Every half hour of every day: - -```yaml -sensor: - platform: speedtest - minute: - - 0 - - 30 - monitored_conditions: - - ping - - download - - upload -``` - -Everyday at 12:30AM, 6:30AM, 12:30PM, 6:30PM: - -```yaml -sensor: - platform: speedtest - minute: 30 - hour: - - 0 - - 6 - - 12 - - 18 monitored_conditions: - ping - download @@ -78,3 +45,44 @@ Configuration variables: This component uses [speedtest-cli](https://github.com/sivel/speedtest-cli) to gather network performance data from Speedtest.net. Please be aware of the potential [inconsistencies](https://github.com/sivel/speedtest-cli#inconsistency) that this component may display. When Home Assistant first starts up, the values of the speedtest will show as `Unknown`. You can use the service `sensor.update_speedtest` to run a manual speedtest and populate the data or just wait for the next regularly scheduled test. + +## {% linkable_title Examples %} + +In this section you find some real life examples of how to use this sensor. + +### {% linkable_title Run periodically %} + +Every half hour of every day: + +```yaml +# Example configuration.yaml entry +sensor: + - platform: speedtest + minute: + - 0 + - 30 + monitored_conditions: + - ping + - download + - upload +``` + +### {% linkable_title Run at a specific time %} + +Everyday at 12:30AM, 6:30AM, 12:30PM, 6:30PM: + +```yaml +# Example configuration.yaml entry +sensor: + platform: speedtest + minute: 30 + hour: + - 0 + - 6 + - 12 + - 18 + monitored_conditions: + - ping + - download + - upload +``` diff --git a/source/_components/sensor.supervisord.markdown b/source/_components/sensor.supervisord.markdown index 57c545ddf3c..3d805e36303 100644 --- a/source/_components/sensor.supervisord.markdown +++ b/source/_components/sensor.supervisord.markdown @@ -18,8 +18,7 @@ To use this sensor in your installation, add the following to your `configuratio ```yaml # Example configuration.yaml entry sensor: - platform: supervisord - url: http://192.168.1.1:9001/RPC2 + - platform: supervisord ``` Configuration variables: