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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependency for HomematicIP Cloud #43018

Merged
merged 6 commits into from Nov 12, 2020
Merged

Bump dependency for HomematicIP Cloud #43018

merged 6 commits into from Nov 12, 2020

Conversation

SukramJ
Copy link
Contributor

@SukramJ SukramJ commented Nov 9, 2020

Proposed change

  • bump dependency to 0.12.1
  • redesign HAP device usage for duty cycle
  • update tests

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:

@project-bot project-bot bot added this to Needs review in Dev Nov 9, 2020
@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev Nov 9, 2020
@balloob
Copy link
Member

balloob commented Nov 9, 2020

Can we run a migration to clean up the entities that can be safely deleted?

Dev automation moved this from By Code Owner to Reviewer approved Nov 9, 2020
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

Looks good.

@SukramJ
Copy link
Contributor Author

SukramJ commented Nov 10, 2020

Hi @balloob ,
i added some code to cleanup the entity registry. I hope this is what you meant.
Do you have any better solutions in code?
BR

@balloob
Copy link
Member

balloob commented Nov 11, 2020

Ok. This means that we can remove the breaking change.

for hapid in hap.home.accessPointUpdateStates.keys():
if er_entry.unique_id == f"HomematicipBatterySensor_{hapid}":
entity_registry.async_remove(er_entry.entity_id)
except Exception as err: # pylint: disable=broad-except:
Copy link
Member

Choose a reason for hiding this comment

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

Do not catch Exception. What can raise here ? Wrap only the code that can raise and with the errors that you expect.

Copy link
Contributor Author

@SukramJ SukramJ Nov 11, 2020

Choose a reason for hiding this comment

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

I was overly careful here. The check for the minimum version should be OK, so i removed try/catch.

@SukramJ SukramJ requested a review from balloob November 11, 2020 15:02
@SukramJ
Copy link
Contributor Author

SukramJ commented Nov 12, 2020

Hi, please add the to current beta.
Thanks a lot.

@balloob balloob merged commit d7e5d1b into home-assistant:dev Nov 12, 2020
Dev automation moved this from Reviewer approved to Done Nov 12, 2020
@SukramJ SukramJ deleted the HmIP-NewHap branch November 12, 2020 10:00
@springstan
Copy link
Member

Hi, please add the to current beta.
Thanks a lot.

Tagging this for 0.118 as requested.

@springstan springstan added this to the 0.118.0 milestone Nov 12, 2020
balloob added a commit that referenced this pull request Nov 13, 2020
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

Homematic IP Access Point Firmware: 2.2.18 has lost connection with the cloud
4 participants