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

Add discovery support to synology_dsm #33729

Merged
merged 21 commits into from
Apr 7, 2020

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Apr 6, 2020

Breaking change

The name configuration key has been removed.

Proposed change

Add discovery support to synology_dsm

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

Example entry for configuration.yaml:

# Example configuration.yaml

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

@probot-home-assistant
Copy link

Hey there @ProtoThis, @Quentame, mind taking a look at this pull request as its been labeled with a integration (synology_dsm) you are listed as a codeowner for? Thanks!

@bdraco
Copy link
Member Author

bdraco commented Apr 6, 2020

@Quentame I figure since you did all the hard work, I could do this.

@Quentame
Copy link
Member

Quentame commented Apr 6, 2020

@Quentame I figure since you did all the hard work, I could do this.

Hahaha, thanks !
I am self isolated at parent's house, so couldn't do discovery either at the moment (or maybe with some kind of VPN/SSH tunnel tricks, I don't know).

Will look at it in few hours.

@bdraco
Copy link
Member Author

bdraco commented Apr 6, 2020

@Quentame It looks like

self._api.temp_unit is called but I can't find it in the library

@Quentame
Copy link
Member

Quentame commented Apr 6, 2020

@Quentame It looks like

self._api.temp_unit is called but I can't find it in the library

Indeed, I thought I introduced a bug in 0.5.0 but no, this was like this before ... we should intestigate more but maybe we can remove this code.

@Quentame
Copy link
Member

Quentame commented Apr 6, 2020

Added "breaking change" + "docs-missing" because of CONF_NAME removal.

@bdraco
Copy link
Member Author

bdraco commented Apr 6, 2020

@Quentame It looks like
self._api.temp_unit is called but I can't find it in the library

Indeed, I thought I introduced a bug in 0.5.0 but no, this was like this before ... we should intestigate more but maybe we can remove this code.

I'll dig into this more later tonight and see what needs to change since its in a few places

@bdraco
Copy link
Member Author

bdraco commented Apr 7, 2020

@Quentame Its correct

temp_unit is a property of class SynoApi not class SynologyDSM.api

Naming is hard!

Copy link
Member

@Quentame Quentame left a comment

Choose a reason for hiding this comment

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

Tests are good for the non discovery part (can't test discovery).

Tested with:

  • UI
  • config.yaml basic
  • config.yaml basic + disks + volumes

@Quentame
Copy link
Member

Quentame commented Apr 7, 2020

@bdraco, maybe you can clean your repo 😂

@Quentame
Copy link
Member

Quentame commented Apr 7, 2020

Py test also passing

@MartinHjelmare
Copy link
Member

Please rebase on latest dev branch to let the build pass. We've merged a fix for the pylint issue.

@balloob balloob merged commit 078ce67 into home-assistant:dev Apr 7, 2020
@lock lock bot locked and limited conversation to collaborators Apr 15, 2020
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.

5 participants