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

Adjust onewire device model #58516

Merged
merged 2 commits into from
Oct 27, 2021
Merged

Adjust onewire device model #58516

merged 2 commits into from
Oct 27, 2021

Conversation

epenet
Copy link
Contributor

@epenet epenet commented Oct 27, 2021

Proposed change

Adjust onewire device model

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

  • 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
  • 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 @garbled1, mind taking a look at this pull request as it has been labeled with an integration (onewire) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@frenck frenck added smash Indicator this PR is close to finish for merging or closing and removed smash Indicator this PR is close to finish for merging or closing labels Oct 27, 2021
@frenck
Copy link
Member

frenck commented Oct 27, 2021

There is a merge conflict.

@epenet
Copy link
Contributor Author

epenet commented Oct 27, 2021

@frenck rebased on latest

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Oct 27, 2021
@garbled1
Copy link
Contributor

no objections

if TYPE_CHECKING:
assert self.owproxy
device_type = self.owproxy.read(f"{device_path}type").decode()
_LOGGER.debug("read `%stype`: %s", device_path, device_type)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
_LOGGER.debug("read `%stype`: %s", device_path, device_type)
_LOGGER.debug("read `%stype`: %s", device_path, device_type)

I'm not sure we need the logging, but it was existing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @bdraco this was to facilitate pytest debugging.
I had issues injecting just the right amount of side_effect, in the right order, etc...

I can remove if you think it's better to clean it up.

Copy link
Member

Choose a reason for hiding this comment

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

Its probably fine to leave in as it doesn't look like its called too frequently.

Copy link
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

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

LGTM

@bdraco bdraco merged commit b85217c into home-assistant:dev Oct 27, 2021
@epenet
Copy link
Contributor Author

epenet commented Oct 27, 2021

Thanks @bdraco

@epenet epenet deleted the onewire-model branch October 27, 2021 17:21
natekspencer pushed a commit to natekspencer/home-assistant-core that referenced this pull request Oct 29, 2021
Co-authored-by: epenet <epenet@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
by-code-owner cla-signed code-quality Hacktoberfest has-tests integration: onewire small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants