Add additional parameters to NUT UPS sensor#15066
Conversation
Added input.frequency and a number of output parameters.
| 'output.voltage': ['Output Voltage', 'V', 'mdi:flash'], | ||
| 'output.voltage.nominal': ['Nominal Output Voltage', 'V', 'mdi:flash'], | ||
| 'output.frequency': ['Output Frequency', 'hz', 'mdi:flash'], | ||
| 'output.frequency.nominal': ['Nominal Output Frequency', 'hz', 'mdi:flash'], |
There was a problem hiding this comment.
line too long (80 > 79 characters)
| 'input.voltage.nominal': ['Nominal Input Voltage', 'V', 'mdi:flash'], | ||
| 'input.frequency': ['Input Line Frequency','hz','mdi:flash'], | ||
| 'input.frequency.nominal': ['Nominal Input Line Frequency','hz','mdi:flash'], | ||
| 'input.frequency.status': ['Input Frequency Status','','mdi:information-outline'], |
There was a problem hiding this comment.
missing whitespace after ','
line too long (86 > 79 characters)
| 'input.voltage': ['Input Voltage', 'V', 'mdi:flash'], | ||
| 'input.voltage.nominal': ['Nominal Input Voltage', 'V', 'mdi:flash'], | ||
| 'input.frequency': ['Input Line Frequency','hz','mdi:flash'], | ||
| 'input.frequency.nominal': ['Nominal Input Line Frequency','hz','mdi:flash'], |
There was a problem hiding this comment.
missing whitespace after ','
line too long (81 > 79 characters)
| ['Voltage Transfer Reason', '', 'mdi:information-outline'], | ||
| 'input.voltage': ['Input Voltage', 'V', 'mdi:flash'], | ||
| 'input.voltage.nominal': ['Nominal Input Voltage', 'V', 'mdi:flash'], | ||
| 'input.frequency': ['Input Line Frequency','hz','mdi:flash'], |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Fix the hound and lint issues and we can merge this.
Fixed formatting issues Added "devices" fields
| 'device.mfr': ['Device manufacturer', '', 'mdi:information-outline'], | ||
| 'device.serial': ['Device serial', '', 'mdi:information-outline'], | ||
| 'device.type': ['Device type', '', 'mdi:information-outline'], | ||
| 'device.description': ['Device description', '', 'mdi:information-outline'], |
There was a problem hiding this comment.
This line is too long. Do a line break.
| ['Device physical location', '', 'mdi:information-outline'], | ||
| 'device.part': ['Device part number', '', 'mdi:information-outline'], | ||
| 'device.macaddr': | ||
| ['Device network address', '', 'mdi:information-outline'], |
There was a problem hiding this comment.
All of these above are static information about the device and should not be added as sensors. We will probably soon implement a "device" concept related to each entity where this type of information can be stored. But we shouldn't add it to the state machine as entity states at this point.
There was a problem hiding this comment.
Makes sense. Will remove.
Removed device.* sensors
|
Would be good to also list the new options in the documentation. |
* Update nut.py Added input.frequency and a number of output parameters. * Update nut.py Fixed formatting issues Added "devices" fields * Separated "device.description" line to two lines. * Update nut.py Removed device.* sensors
Description:
Added additional parameters to NUT UPS sensor
input.frequency
output.current
output.voltage
output.frequency
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5623
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: