Update Roomba to new STATE API#15779
Closed
arbreng wants to merge 1 commit intohome-assistant:devfrom
Closed
Conversation
houndci-bot
reviewed
Aug 1, 2018
| yield from self.async_resume() | ||
| if self.state == STATE_CLEANING: # vacuum is running | ||
| await self.async_pause() | ||
| elif self.state == STATE_PAUSED: # self._status == 'Stopped': # vacuum is stopped |
| async def async_pause(self, **kwargs): | ||
| """Pause the cleaning cycle.""" | ||
| yield from self.hass.async_add_job(self.vacuum.send_command, 'pause') | ||
| # TODO: What happens here if in DOCKED, PAUSED, IDLE, RETURNING, or ERROR? |
| async def async_resume(self, **kwargs): | ||
| """Resume the cleaning cycle.""" | ||
| yield from self.hass.async_add_job(self.vacuum.send_command, 'resume') | ||
| # TODO: What happens here if in CLEANING, DOCKED, IDLE, RETURNING, or ERROR? |
| } | ||
|
|
||
|
|
||
| async def async_setup_platform(hass, config, async_add_devices, discovery_info=None): |
Contributor
Author
|
Part of: home-assistant/architecture#29 |
2 tasks
Contributor
|
Does it make sense to merge this first? #15751 |
Contributor
Contributor
Author
|
Will do; August was crazy. Finally sitting down to work on this this weekend |
Member
|
@arbreng I would love to see this PR land, would you be able to pick it up? |
Contributor
Author
|
Sure! Work and wedding planning have had me really busy lately, but I
should be able to rebase and clean it up this weekend.
…On Tue, Nov 27, 2018 at 6:39 AM Paulus Schoutsen ***@***.***> wrote:
@arbreng <https://github.com/arbreng> I would love to see this PR land,
would you be able to pick it up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#15779 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWUzEwvQPA2K1pkK2vwYldv0CeFYcAgLks5uzU6ogaJpZM4VqVrF>
.
--
David Worsham
(415) 340-2102
|
Member
|
This PR seems to have gone stale. Closing it. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Adds support for states to the Roomba Vacuum Platform, this can be merged after: #15573
It also introduce breaking changes, as it no longer uses:
STATE_ON
STATE_OFF
Also removes any functions related to ToggleEntity, which results in the following services no longer working:
turn_on (Use start_pause instead)
turn_off (Use return_to_dock instead)
toggle (No replacement)
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5939
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed: