Skip to content

Commit 82425ff

Browse files
exxamaltesyssi
authored andcommitted
NUT sensor enhancements (home-assistant#5411)
1 parent e49e591 commit 82425ff

File tree

1 file changed

+80
-42
lines changed

1 file changed

+80
-42
lines changed

source/_components/sensor.nut.markdown

Lines changed: 80 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,56 +28,83 @@ sensor:
2828
- battery.runtime
2929
```
3030
31-
Configuration variables:
32-
33-
- **name** (*Optional*): Name prefix for defined sensors. Defaults to 'NUT UPS'.
34-
- **host** (*Optional*): The host name or address of the device that is running NUT. Defaults to localhost.
35-
- **port** (*Optional*): The port number. Defaults to 3493.
36-
- **alias** (*Optional*): Name of the ups on the NUT server. Will default to the first UPS name listed.
37-
- **username** (*Optional*): Username to login to the NUT server. Default is none.
38-
- **password** (*Optional*): Password to login to the NUT server. Default is none.
39-
- **resources** array (*Required*): Contains all entries to display.
31+
{% configuration %}
32+
name:
33+
description: Name prefix for defined sensors.
34+
required: false
35+
default: 'NUT UPS'
36+
type: string
37+
host:
38+
description: The host name or IP address of the device that is running NUT.
39+
required: false
40+
default: localhost
41+
type: string
42+
port:
43+
description: The port number.
44+
required: false
45+
default: 3493
46+
type: int
47+
alias:
48+
description: Name of the ups on the NUT server.
49+
required: false
50+
default: Will default to the first UPS name listed.
51+
type: string
52+
username:
53+
description: Username to login to the NUT server.
54+
required: false
55+
default: none
56+
type: string
57+
password:
58+
description: Password to login to the NUT server.
59+
required: false
60+
default: none
61+
type: string
62+
resources:
63+
description: Contains all entries to display.
64+
required: true
65+
type: list
66+
{% endconfiguration %}
4067
4168
### {% linkable_title Example %}
4269
43-
Given the following example output from NUT (Your variables may differ):
70+
Given the following example output from NUT (your variables may differ):
4471
4572
```yaml
46-
'ups.timer.reboot': '0',
47-
'battery.voltage': '27.0',
48-
'ups.firmware.aux': 'L3 -P ',
49-
'ups.mfr': 'American Power Conversion',
50-
'battery.runtime.low': '120',
51-
'ups.delay.shutdown': '20',
52-
'ups.load': '19',
53-
'ups.realpower.nominal': '600',
54-
'battery.charge.warning': '50',
55-
'battery.charge.low': '10',
56-
'ups.vendorid': '051d',
57-
'ups.timer.shutdown': '-1',
58-
'ups.test.result': 'No test initiated',
59-
'ups.firmware': '868.L3 -P.D',
60-
'battery.mfr.date': '2015/05/08',
61-
'ups.serial': '3B1519X19994 ',
62-
'ups.productid': '0002',
63-
'battery.runtime': '2552',
64-
'battery.date': '2001/09/25',
65-
'battery.voltage.nominal': '24.0',
66-
'battery.type': 'PbAc',
67-
'ups.mfr.date': '2015/05/08',
68-
'ups.status': 'OL',
69-
'ups.model': 'Back-UPS RS1000G',
70-
'ups.beeper.status': 'disabled',
71-
'battery.charge': '100',
72-
'input.sensitivity': 'medium',
73+
'ups.timer.reboot': '0'
74+
'battery.voltage': '27.0'
75+
'ups.firmware.aux': 'L3 -P '
76+
'ups.mfr': 'American Power Conversion'
77+
'battery.runtime.low': '120'
78+
'ups.delay.shutdown': '20'
79+
'ups.load': '19'
80+
'ups.realpower.nominal': '600'
81+
'battery.charge.warning': '50'
82+
'battery.charge.low': '10'
83+
'ups.vendorid': '051d'
84+
'ups.timer.shutdown': '-1'
85+
'ups.test.result': 'No test initiated'
86+
'ups.firmware': '868.L3 -P.D'
87+
'battery.mfr.date': '2015/05/08'
88+
'ups.serial': '3B1519X19994 '
89+
'ups.productid': '0002'
90+
'battery.runtime': '2552'
91+
'battery.date': '2001/09/25'
92+
'battery.voltage.nominal': '24.0'
93+
'battery.type': 'PbAc'
94+
'ups.mfr.date': '2015/05/08'
95+
'ups.status': 'OL'
96+
'ups.model': 'Back-UPS RS1000G'
97+
'ups.beeper.status': 'disabled'
98+
'battery.charge': '100'
99+
'input.sensitivity': 'medium'
73100
'input.transfer.low': '88'
74-
'input.transfer.high': '147',
75-
'input.voltage': '121.0',
76-
'input.voltage.nominal': '120',
77-
'input.transfer.reason': 'input voltage out of range',
101+
'input.transfer.high': '147'
102+
'input.voltage': '121.0'
103+
'input.voltage.nominal': '120'
104+
'input.transfer.reason': 'input voltage out of range'
78105
```
79106
80-
Use the values from the left hand column. Support is included for most values with 'ups', 'battery', and 'input' prefixes.
107+
Use the values from the left hand column. Support is included for most values with 'ups', 'battery', and 'input' prefixes.
81108
82109
```yaml
83110
sensor:
@@ -94,3 +121,14 @@ sensor:
94121
- input.voltage
95122
- battery.runtime
96123
```
124+
125+
### {% linkable_title UPS Status - human-readable version %}
126+
127+
An additional virtual sensor type `ups.status.display` is available translating the UPS status value retrieved from `ups.status` into a human-readable version.
128+
129+
```yaml
130+
sensor:
131+
- platform: nut
132+
resources:
133+
- ups.status.display
134+
```

0 commit comments

Comments
 (0)