Skip to content
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

Neato Fixes #4490

Merged
merged 4 commits into from
Nov 22, 2016
Merged

Neato Fixes #4490

merged 4 commits into from
Nov 22, 2016

Conversation

turbokongen
Copy link
Contributor

Description:
The Neato Clean switch did not update correctly on spot- or manual cleaning and was slow in responsiveness.
Also moved the Constants to the hub.

@mention-bot
Copy link

@turbokongen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jabesq to be a potential reviewer.

@@ -100,6 +104,7 @@ def turn_on(self, **kwargs):
self.robot.start_cleaning()
elif self.type == SWITCH_TYPE_SCHEDULE:
self.robot.enable_schedule()
self.schedule_update_ha_state()
Copy link
Member

Choose a reason for hiding this comment

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

you don't have to schedule an update, Home Assistant will do that because this device has should_poll == True

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does that mean update() will be called after turn_off() is done?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

@@ -109,3 +114,4 @@ def turn_off(self, **kwargs):
self.robot.send_to_base()
elif self.type == SWITCH_TYPE_SCHEDULE:
self.robot.disable_schedule()
self.schedule_update_ha_state()
Copy link
Member

Choose a reason for hiding this comment

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

If this call is slow, it's probably because of the time.sleep(1)

@balloob balloob added this to the 0.33.2 milestone Nov 22, 2016
@balloob balloob merged commit 248f5c0 into home-assistant:dev Nov 22, 2016
balloob pushed a commit that referenced this pull request Nov 22, 2016
* Fix, switch state. Move constants to hub

* Responsiveness

* Whitespace

* Delay was not needed as commands does not return until done.
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants