-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Allow inverting netdata sensor values #21711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -88,7 +91,7 @@ class NetdataSensor(Entity): | |||
"""Implementation of a Netdata sensor.""" | |||
|
|||
def __init__( | |||
self, netdata, name, sensor, sensor_name, element, icon, unit): | |||
self, netdata, name, sensor, sensor_name, element, icon, unit, invert): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (83 > 79 characters)
Please, update the documentation and open a PR for it (be sure to create a documentation PR against the 🏷 I am adding the |
The tests seem to fail on |
I will merge it and fix the remaining stuff later if needed. |
Description:
Netdata returns all bandwidth related sensors as positive/negative numbers related to the interface. When you are uploading at 10Mbps, the
net.eno1 / sent
sensor it will report a speed of -10 Mbps. When you are downloading at 10Mbps, thenet.eno / received
sensor will report a speed of 10 Mbps. This is only useful when you want to put both values on a graph. For automations, graphs, ... it's counter-intuitive that the value is negative also.Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8883
Example entry for
configuration.yaml
(if applicable):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:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: