Fix and optimize digitalloggers platform#9203
Merged
Merged
Conversation
houndci-bot
reviewed
Aug 28, 2017
| self._parent_device.statuslocal[self.outletnumber - 1][1] | ||
| ) | ||
|
|
||
| outlet_status = self._parent_device._statuslist[self._outlet_number - 1] |
There was a problem hiding this comment.
line too long (80 > 79 characters)
pvizeli
approved these changes
Aug 29, 2017
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Shouldn't update be called before adding the entity?
| ) | ||
|
|
||
| add_devices(devices, True) | ||
| add_devices(outlets) |
Member
There was a problem hiding this comment.
Without True as the second argument here, update will not be called before adding each device. I don't think that is intended.
Member
Author
There was a problem hiding this comment.
No, I intentionally change this because I was able to get all of the necessary data from the iteration of power_switch (line 69).
Member
There was a problem hiding this comment.
Ah, thanks for the clarification!
matemaciek
added a commit
to matemaciek/home-assistant
that referenced
this pull request
Aug 30, 2017
* upstream/dev: (113 commits) Fix fitbit error when trying to access token after upgrade. (home-assistant#9183) Upgrade sendgrid to 5.0.1 (home-assistant#9215) Upgrade pyasn1 to 0.3.3 and pyasn1-modules to 0.1.1 (home-assistant#9216) directv: extended discovery via REST api, bug fix (home-assistant#8800) Bayesian Binary Sensor (home-assistant#8810) Add cloud auth support (home-assistant#9208) Abode push events and lock, cover, and switch components (home-assistant#9095) Lint Sonarr tests Upgrade pymysensors to 0.11.1 (home-assistant#9212) Refactor rfxtrx (home-assistant#9117) Issue home-assistant#6893 in rfxtrx (home-assistant#9130) Support for season sensor (home-assistant#8958) Add counter component (home-assistant#9146) Fix and optimize digitalloggers platform (home-assistant#9203) Prevent error when no forecast data was available (home-assistant#9176) Add "status" to Sonarr sensor (home-assistant#9204) fix worldtidesinfo home-assistant#9184 (home-assistant#9201) Update pushbullet.py (home-assistant#9200) Fix dht22 when no data was read initially home-assistant#8976 (home-assistant#9198) Prevent iCloud exceptions in logfile (home-assistant#9179) ...
Merged
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:
The Digital Loggers Switch platform was broken by #8878. This is a refactor with optimization that fixes it. The platform previously made 10+ HTTP requests upon initialization, and has now been reduced to two.
Related issue (if applicable): fixes #8990
Checklist:
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests pass