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

Add xiamoi_miio the water_box / mop status #43355

Merged

Conversation

JJdeVries
Copy link
Contributor

Proposed change

I would like to track the mop status to enable reminders to use the mop after a certain time has passed.

Here is a link to the relevant function of the miio dependency:
https://github.com/rytilahti/python-miio/blob/master/miio/vacuumcontainers.py#L173

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

This pull request needs to be manually signed off by @home-assistant/core before it can get merged.
(message by ReviewEnforcer)

@probot-home-assistant
Copy link

Hey there @rytilahti, @syssi, @starkillerOG, mind taking a look at this pull request as its been labeled with an integration (xiaomi_miio) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@MartinHjelmare MartinHjelmare changed the title Adding the water_box / mop status Add xiamoi_miio the water_box / mop status Nov 18, 2020
Copy link
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Looks straightforward to me, how about the naming of the variable? Should it be about the water box or the mop?

homeassistant/components/xiaomi_miio/vacuum.py Outdated Show resolved Hide resolved
@JJdeVries
Copy link
Contributor Author

Looks straightforward to me, how about the naming of the variable? Should it be about the water box or the mop?

I was kinda confused by the naming as wel. For the S5 Max that I have here this property only becomes true if I connect the mop to the robot, whereas the waterbox is always connected. So for me this naming is more intuitive, but I'm unsure how other models handle this.

@rytilahti
Copy link
Member

Hmm, I see, that's a tricky one but I'm open to have it as mop_attached. I hope someone having a non-S5max with a mop could confirm if the sensor is merely used for the mop, because if so, we should probably rename the property in python-miio at some point.

For the naming of the state attribute, I just checked if any other vacuum mentions mopping, and looks like only roomba/braava.py has anything relevant, and it exposes both detected_pad and tank_present. @shenxn, do you think it'd be worth to standardize the naming of mop availability?

Co-authored-by: Teemu R. <tpr@iki.fi>
@MartinHjelmare
Copy link
Member

Let's merge this for now.

@MartinHjelmare MartinHjelmare merged commit 1ae3bb6 into home-assistant:dev Dec 20, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants