-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Add System monitoring component #10130
Conversation
a5ec90c
to
8a996a3
Compare
raise NotImplementedError() | ||
|
||
@property | ||
def state(self): |
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.
I'd leave this not overwritten and also remove the value
property, and let platforms overwrite state
.
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.
It seems that my intention was not clear here and the current state of this PR is not reflecting this. Platforms should not longer need to take care about converting or rounding the data. The component will process or preparing the data which then are used for the state.
8a996a3
to
c99bbe7
Compare
'memory_used': ['Memory used', 'MiB', 'mdi:memory'], | ||
} | ||
|
||
from pint import UnitRegistry |
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.
module level import not at top of file
I'm not a fan of this approach. I don't see any benefit compared to the sensor component. If we want names and units to be consistent, can't we just have system monitoring platforms do that? (also, how many system platform monitoring components do we need?) |
We have system monitoring sensor platforms for that and we use them. With the introduction of this component we would have been capable to offload the whole conversion and round process from the platforms to the component. Also, it would have been possible for users set the unit of measurement according their needs.
The more interesting questions is not how many platforms we need but how many we already have and can profit. The I will not forget this and re-open it in 2018 when I spend more time thinking about additional benefits. |
Description:
This is a limited prototype/proposal for a
system_monitoring
component. As mentioned in #10118 should this help us to avoid the issue with the naming as the names are handled by the component through a dict lookup. Also, units of measurement and icons would be identical across platforms.Depends on: #10555
Related issue (if applicable): fixes #10118
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass