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 more diagnostic sensors to iRobot #84995

Merged
merged 17 commits into from Oct 19, 2023

Conversation

Xitee1
Copy link
Contributor

@Xitee1 Xitee1 commented Jan 2, 2023

Breaking change

Proposed change

The iRobot integration currently unlike the official iRobot-App does not show much information's/statistics about the robot like the total missions and total cleaning time. I've found out that the information's are already available and there just are no sensors for it.
So I have added the following sensors:

  • missions cancelled: Total missions that have been cancelled
  • missions failed: Total missions that have failed
  • missions successful: Total successful missions
  • missions total: All total missions together
  • scrubs count: Total amount of how often the robot has executed "scrub"
  • total cleaning time: How long the robot has spend cleaning (total) (in hours)

The following attributes to the vacuum entity have been added too:

  • Battery cycles
  • Average mission time (in minutes)

I hope that I did everything correctly. This is my first PR :)

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)
  • Deprecation (breaking change to happen in the future)
  • 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.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Jan 2, 2023

Hi Xitee1

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

home-assistant bot commented Jan 2, 2023

Hey there @pschmitt, @cyr-ius, @shenxn, mind taking a look at this pull request as it has been labeled with an integration (roomba) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of roomba can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign roomba Removes the current integration label and assignees on the issue, add the integration domain after the command.

Copy link
Contributor

@930913 930913 left a comment

Choose a reason for hiding this comment

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

Thank you very much for your first contribution! I have some suggestions for you.

homeassistant/components/roomba/irobot_base.py Outdated Show resolved Hide resolved
homeassistant/components/roomba/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/roomba/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/roomba/sensor.py Show resolved Hide resolved
homeassistant/components/roomba/irobot_base.py Outdated Show resolved Hide resolved
@930913
Copy link
Contributor

930913 commented Jan 5, 2023

Btw, you still need to sign the CLA as mentioned in the comment above.

@Xitee1
Copy link
Contributor Author

Xitee1 commented Jan 5, 2023

Btw, you still need to sign the CLA as mentioned in the comment above.

I already have signed CLA. The bot has even added the "cla-signed" label to the PR.

@930913
Copy link
Contributor

930913 commented Jan 5, 2023

So you have! I must have missed that 🤦

@Xitee1
Copy link
Contributor Author

Xitee1 commented Mar 10, 2023

Is there anything wrong with this? This PR is open for months now and still hasn't been merged.

Copy link

@Lurchi70 Lurchi70 left a comment

Choose a reason for hiding this comment

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

Good work. Seems to me like a good extension of the existing roomba integration.

@Xitee1 Xitee1 requested review from 930913 and killer0071234 and removed request for 930913 March 22, 2023 17:44
bdraco
bdraco previously requested changes Apr 17, 2023
Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

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

Please resolve conflicts

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft April 17, 2023 03:51
@Xitee1 Xitee1 marked this pull request as ready for review April 17, 2023 18:02
@Xitee1
Copy link
Contributor Author

Xitee1 commented Apr 17, 2023

Please resolve conflicts

I checked it in my IDE and manually edited it in the Github web editor because for some reason almost all checks fail after merging dev into irobot_more_sensors. I have resolved the conflicts and comitted but for some reason Github still says there are conflicts. And I can't resolve it in the Github conflicts web editor because apparently it is too much for the merge web editor even thought it is a single line of code.

I'm giving up at this now.. such an easy and simple addition and so much stress and time consuming getting that PR trough.
If anyone wants to still use it, I found out that you can just copy and paste the "roomba" folder (the integration) in the custom_components folder in HA if you have HACS installed. Then restart HA and you have the new sensors.

@bdraco bdraco marked this pull request as draft April 17, 2023 19:26
@bdraco
Copy link
Member

bdraco commented Apr 19, 2023

I'm going to close this PR since you've indicated you don't want to continue this. Feel free to reopen or make a new one if you change your mind later.

Thanks for willing to contribute 👍

@bdraco bdraco closed this Apr 19, 2023
@Xitee1 Xitee1 marked this pull request as ready for review October 6, 2023 19:46
@Xitee1
Copy link
Contributor Author

Xitee1 commented Oct 6, 2023

@frenck Done.

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Oct 6, 2023
homeassistant/components/roomba/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/roomba/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/roomba/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/roomba/sensor.py Outdated Show resolved Hide resolved
@joostlek
Copy link
Member

Also tested and looks okay

@joostlek joostlek dismissed bdraco’s stale review October 19, 2023 11:53

Changes addressed

@joostlek joostlek changed the title iRobot more diagnostic sensors Add more diagnostic sensors to iRobot Oct 19, 2023
@joostlek joostlek merged commit 2d833fd into home-assistant:dev Oct 19, 2023
25 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2023
@Xitee1 Xitee1 deleted the irobot_more_sensors branch October 22, 2023 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed integration: roomba new-feature Quality Scale: No score smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants