Fix Mi Flora median calculation#16085
Merged
MartinHjelmare merged 9 commits intohome-assistant:devfrom Sep 4, 2018
Merged
Conversation
houndci-bot
reviewed
Sep 2, 2018
|
|
||
|
|
||
| def setup_platform(hass, config, add_devices, discovery_info=None): | ||
| @asyncio.coroutine |
houndci-bot
reviewed
Sep 2, 2018
|
|
||
| def setup_platform(hass, config, add_entities, discovery_info=None): | ||
| @asyncio.coroutine | ||
| def async_setup_platform(hass, config, async_add_entities, discovery_info=None): |
2 tasks
houndci-bot
reviewed
Sep 2, 2018
|
|
||
| def setup_platform(hass, config, add_entities, discovery_info=None): | ||
| async def async_setup_platform(hass, config, async_add_entities, | ||
| discovery_info=None): |
There was a problem hiding this comment.
continuation line under-indented for visual indent
MartinHjelmare
approved these changes
Sep 2, 2018
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Good!
Please add a paragraph about the breaking change in the PR description for the release notes.
Contributor
Author
|
@MartinHjelmare done. |
MartinHjelmare
approved these changes
Sep 4, 2018
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:
miflora library caches values for 20 minutes.
mifloraHA component updates values each 30 seconds. Component gets 3 value updates, calculates median and sets state. During 20 minutes we get the same values from cache which makes median calculation totally useless - all values will be the same.cache_valueconf in favor of nativescan_interval, which is now set to 1200 seconds and used for both update interval and cache timeout in the library.PlatformNotReadyto don't delay HA startupble_timeoutandretries, they are not used in miflora library anymore and, actually, we don't need themPull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io/pull/6163
Breaking changes:
Removed
retriesandtimeoutconfig parameters, they were not used for several months. Replacedcache_valueconfig withscan_intervalto fix a bug in the PR.Checklist: