core icon indicating copy to clipboard operation
core copied to clipboard

Remove sunweg integration

Open rokam opened this issue 1 year ago • 19 comments

Breaking change

Removing Sunweg integration due to authentication with CAPTCHA. The integration can't work without authentication.

Proposed change

https://github.com/rokam/sunweg/issues/13

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)
  • [x] 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.
  • [ ] 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
  • [ ] 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:

rokam avatar Aug 19 '24 14:08 rokam

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

Code owner commands

Code owners of analytics_insights 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 analytics_insights 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 19 '24 14:08 home-assistant[bot]

(Just trying to do due diligence to avoid removing the integration to find a new way to do it in a month and having to add it again)

joostlek avatar Aug 19 '24 14:08 joostlek

There is no documented API and it was using the main page authentication form to retrieve the auth token. But sunweg just added a recaptcha to login page. https://sun.weg.net/sign-in

I tried to contact them without a response for a month. So, there is nothing that can be done ATM.

rokam avatar Aug 19 '24 14:08 rokam

And is there a way we can still use the API via a token we can fetch via the browser?

joostlek avatar Aug 19 '24 14:08 joostlek

Yes, but the token will expire in some days and there is no refresh token method.

rokam avatar Aug 19 '24 14:08 rokam

Right, I will discuss with others, I think it will be okay to remove it. But since this is a config entry we should raise an issue. Please check integrations like myq, life360 or mazda. They help the user to gracefully show the user to remove it.

joostlek avatar Aug 19 '24 14:08 joostlek

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes. Thank you for your contribution!

github-actions[bot] avatar Oct 18 '24 15:10 github-actions[bot]

@joostlek @rokam What is the state on this one?

../Frenck

frenck avatar Nov 10 '24 15:11 frenck

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes. Thank you for your contribution!

github-actions[bot] avatar Jan 09 '25 16:01 github-actions[bot]

Right, we still need to get on with this. I am not sure why the CI cancelled the jobs

joostlek avatar Jan 09 '25 21:01 joostlek

Right, we still need to get on with this. I am not sure why the CI cancelled the jobs

I think it's running

rokam avatar Jan 09 '25 21:01 rokam

@joostlek @rokam What is the state on this one?

../Frenck

Looks ready for me.

rokam avatar Jan 09 '25 21:01 rokam

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes. Thank you for your contribution!

github-actions[bot] avatar Mar 12 '25 17:03 github-actions[bot]

rebased

rokam avatar Mar 12 '25 18:03 rokam

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

Learn more about our pull request process.

home-assistant[bot] avatar Mar 12 '25 18:03 home-assistant[bot]

@joostlek is it fine to proceed with the removal?

abmantis avatar Mar 12 '25 18:03 abmantis

There are still 2 unresolved comments.

abmantis avatar Mar 12 '25 18:03 abmantis

@rokam I think you missed this one: https://github.com/home-assistant/core/pull/124230#discussion_r1992046863

Also, should we implement async_remove_entry like the myq integration does, so that we automatically remove disabled and ignored entries?

abmantis avatar Mar 25 '25 11:03 abmantis

@rokam I think you missed this one: #124230 (comment)

Also, should we implement async_remove_entry like the myq integration does, so that we automatically remove disabled and ignored entries?

I did as requested, although I think that the unload was enought.

rokam avatar Mar 25 '25 12:03 rokam

I think you are right, we can remove the unload function

joostlek avatar Mar 26 '25 12:03 joostlek

@rokam I've removed the code from async_unload_entry and added tests for the repair issue and entry removal. Let me know if it is fine for you so we can merge this.

abmantis avatar Mar 26 '25 12:03 abmantis

There's a merge conflict.

MartinHjelmare avatar Mar 27 '25 08:03 MartinHjelmare