From ba46f2e850f4dedf63911095012ce044761cc0bb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 2 Sep 2018 15:51:29 +0200 Subject: [PATCH] Update APCUPSd docs (#6159) --- source/_components/apcupsd.markdown | 18 ++++++-- .../binary_sensor.apcupsd.markdown | 12 +++-- source/_components/sensor.apcupsd.markdown | 44 ++----------------- 3 files changed, 27 insertions(+), 47 deletions(-) diff --git a/source/_components/apcupsd.markdown b/source/_components/apcupsd.markdown index fd25d00d0d5..ff6f732484e 100644 --- a/source/_components/apcupsd.markdown +++ b/source/_components/apcupsd.markdown @@ -14,6 +14,8 @@ ha_release: 0.13 [APCUPSd](http://www.apcupsd.org/) status information can be integrated into Home Assistant when the Network Information Server (NIS) [is configured](http://www.apcupsd.org/manual/manual.html#nis-server-client-configuration-using-the-net-driver) is enabled on the APC device. +## {% linkable_title Configuration %} + To enable this sensor, add the following lines to your `configuration.yaml`: ```yaml @@ -21,8 +23,16 @@ To enable this sensor, add the following lines to your `configuration.yaml`: apcupsd: ``` -Configuration variables: - -- **host** (*Optional*): The hostname/IP address on which the APCUPSd NIS is being served. Defaults to `localhost`. -- **port** (*Optional*): The port on which the APCUPSd NIS is listening. Defaults to `3551`. +{% configuration %} +host: + description: The hostname/IP address on which the APCUPSd NIS is being served. + required: false + type: string + default: localhost +port: + description: The port on which the APCUPSd NIS is listening. + required: false + type: int + default: 3551 +{% endconfiguration %} diff --git a/source/_components/binary_sensor.apcupsd.markdown b/source/_components/binary_sensor.apcupsd.markdown index 6c599b75b15..30a124785a2 100644 --- a/source/_components/binary_sensor.apcupsd.markdown +++ b/source/_components/binary_sensor.apcupsd.markdown @@ -15,6 +15,8 @@ ha_iot_class: "Local Polling" In addition to the [APCUPSd Sensor](/components/sensor.apcupsd/) devices, you may also create a device which is simply "on" when the UPS status is online and "off" at all other times. +## {% linkable_title Configuration %} + To enable this sensor, you first have to set up [apcupsd](/components/apcupsd/), and add the following lines to your `configuration.yaml` file: ```yaml @@ -23,6 +25,10 @@ binary_sensor: - platform: apcupsd ``` -Configuration variables: - -- **name** (*Optional*): Name to use in the front end. +{% configuration %} +name: + description: Name to use in the frontend. + required: false + type: string + default: UPS Online Status +{% endconfiguration %} diff --git a/source/_components/sensor.apcupsd.markdown b/source/_components/sensor.apcupsd.markdown index 54db50e7520..bfaf33769b6 100644 --- a/source/_components/sensor.apcupsd.markdown +++ b/source/_components/sensor.apcupsd.markdown @@ -15,6 +15,8 @@ ha_iot_class: "Local Polling" The `apcupsd` sensor platform allows you to monitor a UPS (battery backup) by using data from the [apcaccess](http://linux.die.net/man/8/apcaccess) command. +## {% linkable_title Configuration %} + To use this sensor platform, you first have to set up [apcupsd](/components/apcupsd/), and add the following to your `configuration.yaml` file: ```yaml @@ -24,14 +26,6 @@ sensor: resources: - bcharge - linev - - loadpct - - nominv - - nompower - - numxfers - - outputv - - status - - timeleft - - tonbatt ``` Configuration variables: @@ -64,37 +58,7 @@ MAXTIME : 0 Seconds MAXLINEV : 249.6 Volts MINLINEV : 244.4 Volts OUTPUTV : 218.4 Volts -SENSE : High -DWAKE : 0 Seconds -DSHUTD : 180 Seconds -DLOWBATT : 2 Minutes -LOTRANS : 196.0 Volts -HITRANS : 253.0 Volts -RETPCT : 15.0 Percent -ITEMP : 30.6 C -ALARMDEL : Low Battery -BATTV : 27.6 Volts -LINEFREQ : 50.0 Hz -LASTXFER : High line voltage -NUMXFERS : 0 -TONBATT : 0 Seconds -CUMONBATT: 0 Seconds -XOFFBATT : N/A -SELFTEST : NO -STESTI : 336 -STATFLAG : 0x0500000A -DIPSW : 0x00 -REG1 : 0x00 -REG2 : 0x00 -REG3 : 0x00 -MANDATE : 07/13/99 -SERIALNO : GS9888761008 -BATTDATE : 13/11/15 -NOMOUTV : 230 Volts -NOMBATTV : 24.0 Volts -EXTBATTS : 0 -FIRMWARE : 70.11.I -END APC : 2016-02-09 17:13:46 +0000 +[...] ``` Use the (case insensitive) values from the left hand column: @@ -105,5 +69,5 @@ sensor: resources: - linev - loadpct - - itemp + - timeleft ```