core icon indicating copy to clipboard operation
core copied to clipboard

Add returning activity to Husqvarna lawn mower

Open mikey0000 opened this issue 1 year ago • 13 comments

Breaking change

Proposed change

Update the two mower integrations with returning activity

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New integration (thank you!)
  • [x] 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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • [ ] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] I have followed the perfect PR recommendations
  • [ ] The code has been formatted using Ruff (ruff format 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.

To help with the load of incoming pull requests:

mikey0000 avatar Aug 23 '24 21:08 mikey0000

Hey there @thomas55555, mind taking a look at this pull request as it has been labeled with an integration (husqvarna_automower) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of husqvarna_automower can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign husqvarna_automower Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

home-assistant[bot] avatar Aug 23 '24 21:08 home-assistant[bot]

Hey there @mib1185, @edenhaus, @augar, mind taking a look at this pull request as it has been labeled with an integration (ecovacs) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ecovacs can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign ecovacs Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

home-assistant[bot] avatar Aug 23 '24 21:08 home-assistant[bot]

There is a binary sensor for the same function. I think this should be deprecated in another PR. https://github.com/home-assistant/core/blob/7ae8f4c9d0c261e86404883188b39e5b960ae1e0/homeassistant/components/husqvarna_automower/binary_sensor.py#L42-L45

Otherwise it looks good for me.

Thomas55555 avatar Aug 24 '24 05:08 Thomas55555

Please split this into two PRs

joostlek avatar Aug 24 '24 05:08 joostlek

Please split this into two PRs

Wondered if I'd get asked that, will do, I'll keep this one for one half and open a new one for the other

mikey0000 avatar Aug 24 '24 05:08 mikey0000

Please split this into two PRs

Moved Ecovacs to here https://github.com/home-assistant/core/pull/124519

mikey0000 avatar Aug 24 '24 06:08 mikey0000

There is a binary sensor for the same function. I think this should be deprecated in another PR.

https://github.com/home-assistant/core/blob/7ae8f4c9d0c261e86404883188b39e5b960ae1e0/homeassistant/components/husqvarna_automower/binary_sensor.py#L42-L45

Otherwise it looks good for me.

You or me doing that?

mikey0000 avatar Aug 24 '24 06:08 mikey0000

There is a binary sensor for the same function. I think this should be deprecated in another PR. https://github.com/home-assistant/core/blob/7ae8f4c9d0c261e86404883188b39e5b960ae1e0/homeassistant/components/husqvarna_automower/binary_sensor.py#L42-L45

Otherwise it looks good for me.

You or me doing that?

I'm really busy right now. I can't do it within the next two weeks or something like that. So it would be nice, if you could do it.

Thomas55555 avatar Aug 24 '24 06:08 Thomas55555

There is a binary sensor for the same function. I think this should be deprecated in another PR. https://github.com/home-assistant/core/blob/7ae8f4c9d0c261e86404883188b39e5b960ae1e0/homeassistant/components/husqvarna_automower/binary_sensor.py#L42-L45

Otherwise it looks good for me.

You or me doing that?

I'm really busy right now. I can't do it within the next two weeks or something like that. So it would be nice, if you could do it.

Sweet as, happy to

mikey0000 avatar Aug 24 '24 07:08 mikey0000

Please split this into two PRs

Can you update the labels? Or should I just reopen a new PR?

mikey0000 avatar Aug 25 '24 20:08 mikey0000

There is a binary sensor for the same function. I think this should be deprecated in another PR. https://github.com/home-assistant/core/blob/7ae8f4c9d0c261e86404883188b39e5b960ae1e0/homeassistant/components/husqvarna_automower/binary_sensor.py#L42-L45

Otherwise it looks good for me.

You or me doing that?

I'm really busy right now. I can't do it within the next two weeks or something like that. So it would be nice, if you could do it.

https://github.com/home-assistant/core/pull/124610

if your at least able to test this out?

mikey0000 avatar Aug 26 '24 04:08 mikey0000

There is a binary sensor for the same function. I think this should be deprecated in another PR. https://github.com/home-assistant/core/blob/7ae8f4c9d0c261e86404883188b39e5b960ae1e0/homeassistant/components/husqvarna_automower/binary_sensor.py#L42-L45

Otherwise it looks good for me.

You or me doing that?

I'm really busy right now. I can't do it within the next two weeks or something like that. So it would be nice, if you could do it.

#124610

if your at least able to test this out?

Unfortunately not. But with a test we can be pretty sure, that it works.

Thomas55555 avatar Aug 26 '24 13:08 Thomas55555

Please at a test here:

https://github.com/home-assistant/core/blob/f4528b288fbd04302852be41c99f47e2941fb2f2/tests/components/husqvarna_automower/test_lawn_mower.py#L43-L47

("GOING_HOME", "IN_OPERATION", LawnMowerActivity.RETURNING),

Test added and passing.

mikey0000 avatar Aug 29 '24 01:08 mikey0000