-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Neato Fixes #4490
Conversation
@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() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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)
* Fix, switch state. Move constants to hub * Responsiveness * Whitespace * Delay was not needed as commands does not return until done.
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.