-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
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
Remove km from visibility, add visibility_distance #8454
Conversation
Special case for added visibility_distance which is just a lookup on visibility code, | ||
not retrieved from the dp call directly. | ||
""" | ||
if self._condition == "visibility_distance" and 'visibility' in self.data.data.__dict__.keys(): |
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 (103 > 79 characters)
@@ -119,6 +129,12 @@ def name(self): | |||
@property | |||
def state(self): | |||
"""Return the state of the sensor.""" | |||
""" | |||
Special case for added visibility_distance which is just a lookup on visibility code, |
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 (96 > 79 characters)
not retrieved from the dp call directly. | ||
""" | ||
if self._condition == "visibility_distance" \ | ||
and 'visibility' in self.data.data.__dict__.keys(): |
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.
continuation line over-indented for visual indent
@@ -119,6 +129,14 @@ def name(self): | |||
@property | |||
def state(self): | |||
"""Return the state of the sensor.""" | |||
""" | |||
Special case for added visibility_distance |
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.
trailing whitespace
not retrieved from the dp call directly. | ||
""" | ||
if (self._condition == 'visibility_distance' and | ||
'visibility' in self.data.data.__dict__.keys()): |
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.
visually indented line with same indent as next logical line
which is just a lookup on visibility code, | ||
not retrieved from the dp call directly. | ||
""" | ||
if (self._condition == 'visibility_distance' and |
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.
trailing whitespace
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.
Thanks 🐬
* Remove km from visibility, add visibility_distance * Fix line length * Fix trailing space and line break indentation * Indentation * More whitespace
* Remove km from visibility, add visibility_distance * Fix line length * Fix trailing space and line break indentation * Indentation * More whitespace
Description:
The values for visibility provided by the Met Office are not in km but are codes (VG=Very Good, etc). These then map to estimated distance ranges of visibility.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2968
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 passNew dependencies have been added to theREQUIREMENTS
variable (example).New dependencies are only imported inside functions that use them (example).New dependencies have been added torequirements_all.txt
by runningscript/gen_requirements_all.py
.New files were added to.coveragerc
.