You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/sensor.nut.markdown
+80-42Lines changed: 80 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -28,56 +28,83 @@ sensor:
28
28
- battery.runtime
29
29
```
30
30
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 %}
40
67
41
68
### {% linkable_title Example %}
42
69
43
-
Given the following example output from NUT (Your variables may differ):
70
+
Given the following example output from NUT (your variables may differ):
44
71
45
72
```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'
73
100
'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'
78
105
```
79
106
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.
81
108
82
109
```yaml
83
110
sensor:
@@ -94,3 +121,14 @@ sensor:
94
121
- input.voltage
95
122
- battery.runtime
96
123
```
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.
0 commit comments