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
Adjust services supported by litterrobot vacuum #95788
Conversation
Hey there @natekspencer, @tkdrob, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
f99d8fc
to
070e78d
Compare
is_fixable=False, | ||
severity=ir.IssueSeverity.WARNING, | ||
translation_key="service_deprecation_turn_off", | ||
) | ||
|
||
async def async_start(self) -> None: | ||
"""Start a clean cycle.""" | ||
await self.robot.start_cleaning() |
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.
What happens if self.robot.set_power_status(False)
has been called, will this still work, or do we need to also call self.robot.set_power_status(True)
here?
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.
self.robot.set_power_status(True)
would need to be called first if the robot is off, otherwise nothing will happen.
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.
OK, I updated the code to call self.robot.set_power_status(True)
@natekspencer @tkdrob I have no way to test the changes, could you review this, in particular my concern here: #95788 (comment) ? |
@emontnemery conflicts needs to be resolved |
03bfac8
to
d16601b
Compare
@natekspencer Would it be possible for you to test the changes? |
As far as functionality goes, this works. I'm debating if this approach makes sense from the end user perspective, however. Prior to this deprecation, the controls matched the capabilities of the Whisker app (i.e. you can start a clean cycle and turn off/on the robot). The Whisker app doesn't have the notion of stopping a cycle, but it can be done by powering off the robot, which is how it is implemented here. If the robot is off, you can't just start a cycle, but have to turn the robot on. However, turning the robot on automatically starts a clean cycle. This is handled more gracefully by always turning on the robot in the If I'm a user, do I understand that stopping a clean cycle will turn the robot off? Also, if I want to turn the robot off for another reason, can I just issue a stop command? Right now that works, but will that be deprecated in the future such that you can't stop a cycle if it isn't running? |
As explained in the background for the PR, the problem is that services Integrations need to implement the entity model defined by Home Assistant, this often means wording won't be the same in an official app and Home Assistant. There's some more background to this change here: https://developers.home-assistant.io/blog/2023/07/10/vacuum-updates |
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.
Thanks!
@emontnemery, sorry, I think I misrepresented what I was trying to say. I understand the reason for the changes and am not arguing that. What I was trying to comment on specifically was the stop functionally actually turning off the robot versus creating a separate switch entity to control power on/off. |
Oh, I see @natekspencer, I misunderstood then. If you want to change the behavior like that, it's fine to change the behavior in a follow-up PR. |
Proposed change
Add support for
vacuum.stop
and deprecate the implementation of servicesvacuum.turn_on
andvacuum.turn_off
inlitterrobot
vacuumBackground:
Services
vacuum.turn_on
andvacuum.turn_off
are supported by the deprecated base classVacuumEntity
, not by the base classStateVacuumEntity
which is implemented bylitterrobot
.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: