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 Linear Garage Door integration #91436

Merged
merged 13 commits into from Nov 22, 2023

Conversation

IceBotYT
Copy link
Contributor

@IceBotYT IceBotYT commented Apr 14, 2023

Proposed change

I am adding a new integration which allows users to control Linear garage doors from Home Assistant.

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)
  • 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
  • I have followed the perfect PR recommendations
  • 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.

To help with the load of incoming pull requests:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft April 14, 2023 21:22
@IceBotYT
Copy link
Contributor Author

Oops, didn't mean to include both 😅

@IceBotYT IceBotYT marked this pull request as ready for review April 14, 2023 22:06
@IceBotYT IceBotYT marked this pull request as draft April 14, 2023 23:25
@IceBotYT IceBotYT marked this pull request as ready for review April 15, 2023 00:14
@IceBotYT IceBotYT force-pushed the linear-garage-door branch 3 times, most recently from 2436862 to 46655be Compare April 15, 2023 21:53
@bdraco bdraco dismissed home-assistant’s stale review April 19, 2023 02:30

light platform removed

Copy link
Contributor

@Lash-L Lash-L left a comment

Choose a reason for hiding this comment

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

Here's a first pass!

I'm not a core maintainer - so don't feel like you have to listen to anything I say, but hopefully this is helpful!

@home-assistant home-assistant bot marked this pull request as draft May 24, 2023 14:06
@IceBotYT IceBotYT marked this pull request as ready for review May 25, 2023 23:07
@home-assistant home-assistant bot requested a review from emontnemery May 25, 2023 23:07
@IceBotYT IceBotYT force-pushed the linear-garage-door branch 3 times, most recently from 25727c0 to 68bc4a6 Compare May 29, 2023 14:34
Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

I think this looks good now, just a question about the device_id which is generated by the config flow.

await hub.login(
data["email"],
data["password"],
device_id=device_id,
Copy link
Contributor

Choose a reason for hiding this comment

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

So the device_id is just a random string?
Is it OK that the device_id is reset during reauth?

Also, there's another "device_id" used to build entity unique_id, could you give this one a different name so it's clearer which is which?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, the device_id generated by the config flow is the ID of the device making the request (Home Assistant). It serves no purpose other than to identify Home Assistant to Linear's servers. The device_id in the cover entity is the device ID of the garage door opener itself.

Copy link
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

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

Thanks, @IceBotYT 👍

@IceBotYT
Copy link
Contributor Author

Should I update the branch too? I don't have access to my computer at the moment so should I just use the update branch with rebase button?

Copy link
Contributor

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

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

Please make sure CI is passing

@home-assistant home-assistant bot marked this pull request as draft November 21, 2023 15:14
@emontnemery emontnemery marked this pull request as ready for review November 21, 2023 16:42
@home-assistant home-assistant bot marked this pull request as draft November 21, 2023 22:38
@emontnemery emontnemery marked this pull request as ready for review November 21, 2023 22:44
@emontnemery emontnemery merged commit cbb5d7e into home-assistant:dev Nov 22, 2023
53 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2023
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.

None yet

5 participants