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

Fix mesh role for Fritz old devices #66369

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

chemelli74
Copy link
Contributor

Proposed change

Devices with old firmware ( <= 6.x ) doens't support mesh network.
This PR fix the mesh role.

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.
  • 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.

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:

@probot-home-assistant
Copy link

Hey there @mammuth, @AaronDavidSchneider, @mib1185, mind taking a look at this pull request as it has been labeled with an integration (fritz) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@chemelli74 chemelli74 changed the title Fix mesh role for Fritz nold devices Fix mesh role for Fritz old devices Feb 12, 2022
self.mesh_role = MeshRoles.SLAVE
return
if (
"Hosts1" not in self.connection.services
Copy link
Member

Choose a reason for hiding this comment

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

Device details should be handled by the library.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not a low level call, I don't think the library should be responsible for it.
We have the list of available services for each device, and based on that we decide what to do on HA side.

Simone

Copy link
Member

Choose a reason for hiding this comment

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

The point of the library is that it should handle device variations and abstract that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you would like to have a method like mesh_supported() in the library to replace this if ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that sounds good. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's see if the author of the library agree; anyway it will slow down a lot the fix :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving to draft as we are now waiting for kbr/fritzconnection#145

Copy link
Member

Choose a reason for hiding this comment

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

I am going to merge this PR for the hot fix.

We can update using the new function from the lib once it's been released.

@frenck frenck modified the milestones: 2022.2.6, 2022.2.7 Feb 12, 2022
@chemelli74 chemelli74 added the waiting-for-upstream We're waiting for a change upstream label Feb 12, 2022
@chemelli74 chemelli74 marked this pull request as draft February 12, 2022 16:59
@balloob balloob marked this pull request as ready for review February 12, 2022 21:58
@balloob balloob merged commit e069074 into home-assistant:dev Feb 12, 2022
@chemelli74 chemelli74 removed the waiting-for-upstream We're waiting for a change upstream label Feb 12, 2022
@chemelli74 chemelli74 deleted the chemelli74-fritz-mesh-role branch February 12, 2022 22:06
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FritzBox Tools Integration missing sensors
6 participants