8000 Update Roomba to new STATE API by arbreng · Pull Request #15779 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update Roomba to new STATE API #15779

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

Closed
wants to merge 1 commit into from

Conversation

arbreng
Copy link
Contributor
@arbreng arbreng commented Aug 1, 2018

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:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (91 > 79 characters)

"""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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (82 > 79 characters)

"""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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (84 > 79 characters)

}


async def async_setup_platform(hass, config, async_add_devices, discovery_info=None):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (85 > 79 characters)

@arbreng
Copy link
Contributor Author
arbreng commented Aug 1, 2018

Part of: home-assistant/architecture#29

@cnrd
Copy link
Contributor
cnrd commented Aug 1, 2018

Does it make sense to merge this first? #15751

@cnrd
Copy link
Contributor
cnrd commented Aug 12, 2018

@arbreng Please update your PR to support this: #15751

@arbreng
Copy link
Contributor Author
arbreng commented Aug 31, 2018

Will do; August was crazy. Finally sitting down to work on this this weekend

@balloob
Copy link
Member
balloob commented Nov 27, 2018

@arbreng I would love to see this PR land, would you be able to pick it up?

@arbreng
Copy link
Contributor Author
arbreng commented Nov 28, 2018 via email

A605
@balloob
Copy link
Member
balloob commented Dec 14, 2018

This PR seems to have gone stale. Closing it.

@balloob balloob closed this Dec 14, 2018
@ghost ghost removed the in progress label Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0