-
-
Notifications
You must be signed in to change notification settings - Fork 31.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 support for wind, battery, radio signals for Netatmo sensor #2351
Conversation
@@ -24,6 +24,15 @@ | |||
'rain': ['Rain', 'mm', 'mdi:weather-rainy'], | |||
'sum_rain_1': ['sum_rain_1', 'mm', 'mdi:weather-rainy'], | |||
'sum_rain_24': ['sum_rain_24', 'mm', 'mdi:weather-rainy'], | |||
'battery_vp': ['Battery','','mdi:battery'], |
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.
- 30: E231 missing whitespace after ','
- 33: E231 missing whitespace after ','
Add |
Thanks @fabaff! |
@@ -11,19 +11,31 @@ | |||
from homeassistant.util import Throttle | |||
from homeassistant.loader import get_component | |||
|
|||
# Fix for pylint too many statements error | |||
# pylint: disable=too-many-statements |
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.
You shouldn't add this here at the top of the module, but local where the problem is. Put it on the next row directly after the docstring in the update method, near row 109. The disable statement has scope, so it's best to disable as little as possible, and it also makes it easier to see why it was needed.
The update method could be refactored to avoid the disable. It might be out of scope for this PR, but I would do a nested dict lookup and have a function that checks if data value is above inner dict value.
Looks good 🐬 💨 |
Perfect! |
Description:
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If code communicates with devices:
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