Add IlluminanceMeasurementSensor to ZHA#14563
Merged
rcloran merged 4 commits intohome-assistant:devfrom May 21, 2018
Merged
Conversation
syssi
reviewed
May 20, 2018
|
|
||
| class IlluminanceMeasurementSensor(Sensor): | ||
| """ZHA lux sensor.""" | ||
|
|
Contributor
Author
There was a problem hiding this comment.
it's defined as 0 in parent class Sensor
syssi
reviewed
May 20, 2018
| @property | ||
| def state(self): | ||
| """Return the state of the entity.""" | ||
| if self._state is None: |
Member
There was a problem hiding this comment.
The isn't needed. Just return self._state
Contributor
Author
There was a problem hiding this comment.
Was just following what other sensors were doing already. I can change this though. I’ll get it updated soon.
Member
There was a problem hiding this comment.
If the state is already None this condition is useless.
Contributor
Author
There was a problem hiding this comment.
I get it... hence why I said I'd change it.
houndci-bot
reviewed
May 20, 2018
| return None | ||
|
|
||
| return round(float(self._state)) | ||
| return round(float(self._state)) No newline at end of file |
| """Return the state of the entity.""" | ||
| return self._state | ||
|
|
||
|
|
dmulcahey
added a commit
to dmulcahey/home-assistant
that referenced
this pull request
May 26, 2018
* add IlluminanceMeasurementSensor * address review comment * Fix whitespace error during merge
fabaff
pushed a commit
that referenced
this pull request
May 26, 2018
* Add electrical measurement sensor * correct state update * hound fix * zha: Add metering sensor (#14562) * Add IlluminanceMeasurementSensor to ZHA (#14563) * add IlluminanceMeasurementSensor * address review comment * Fix whitespace error during merge * Add electrical measurement sensor * correct state update * hound / flake8
Merged
girlpunk
pushed a commit
to girlpunk/home-assistant
that referenced
this pull request
Sep 4, 2018
* add IlluminanceMeasurementSensor * address review comment * Fix whitespace error during merge
girlpunk
pushed a commit
to girlpunk/home-assistant
that referenced
this pull request
Sep 4, 2018
* Add electrical measurement sensor * correct state update * hound fix * zha: Add metering sensor (home-assistant#14562) * Add IlluminanceMeasurementSensor to ZHA (home-assistant#14563) * add IlluminanceMeasurementSensor * address review comment * Fix whitespace error during merge * Add electrical measurement sensor * correct state update * hound / flake8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
add support for devices that report illuminance measurements