core icon indicating copy to clipboard operation
core copied to clipboard

Update A. O. Smith integration to reflect upstream API changes

Open bdr99 opened this issue 1 year ago • 1 comments

Breaking change

A. O. Smith now provides the hot water status as a percentage rather than low, medium, or high. The hot water status entity has been updated accordingly.

Proposed change

Update the A. O. Smith integration to reflect new changes to the upstream API.

https://github.com/bdr99/py-aosmith/compare/1.0.8...1.0.10

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: https://github.com/bdr99/py-aosmith/issues/3
  • Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/35091

Checklist

  • [x] 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
  • [x] The code has been formatted using Ruff (ruff format homeassistant tests)
  • [x] 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:

  • [x] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [x] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [x] 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:

bdr99 avatar Oct 05 '24 21:10 bdr99

I think the test failures are unrelated.

bdr99 avatar Oct 05 '24 21:10 bdr99

Does this break current installations?

joostlek avatar Oct 06 '24 05:10 joostlek

Only if they created an automation based on the hot water status entity. I marked it as a breaking change to be on the safe side.

bdr99 avatar Oct 06 '24 15:10 bdr99

No but does the current integration stop working?

joostlek avatar Oct 06 '24 15:10 joostlek

The current integration is pointed to an old A. O. Smith API that still provides the hot water status value as low, medium, or high. But that server seems to be no longer maintained and has been having outages, sometimes for days at a time. So, if we don't make this change, the integration will still work but the server connection will be unstable.

bdr99 avatar Oct 06 '24 15:10 bdr99