Skip to content

Add support for Velux Gates#34774

Merged
frenck merged 4 commits intohome-assistant:devfrom
mnaggatz:dev
May 23, 2020
Merged

Add support for Velux Gates#34774
frenck merged 4 commits intohome-assistant:devfrom
mnaggatz:dev

Conversation

@mnaggatz
Copy link
Copy Markdown
Contributor

@mnaggatz mnaggatz commented Apr 27, 2020

Breaking change

Proposed change

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

  • 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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@homeassistant
Copy link
Copy Markdown
Contributor

Hi @mnaggatz,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@probot-home-assistant
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@Julius2342 Julius2342 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. (No idea why the tests fail)

if isinstance(self.node, RollerShutter):
return "shutter"
if isinstance(self.node, Window):
return "window"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

btw, do you have any idea, why the velux windows are shown as shutters in apple home.

(which has the effect, that all windows open, when you say "hey siri, open the shutters". :-) )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry, I don't know. I'm not quite there yet in my integration. I will definitely have a look at it, because I have Somfy roller shutters as well as Velux windows :-)

@mnaggatz mnaggatz marked this pull request as draft April 30, 2020 19:07
@mnaggatz mnaggatz marked this pull request as ready for review April 30, 2020 19:08
@mnaggatz
Copy link
Copy Markdown
Contributor Author

mnaggatz commented May 1, 2020

How can I start the test again? I can not see any errors belonging to my changes.

@frenck
Copy link
Copy Markdown
Member

frenck commented May 1, 2020

@mnaggatz Please rebase your PR on the latest dev branch in order to do that 👍

@mnaggatz
Copy link
Copy Markdown
Contributor Author

mnaggatz commented May 2, 2020

After two attempts, it finally worked. Thanks for the advice.

@mnaggatz
Copy link
Copy Markdown
Contributor Author

mnaggatz commented May 7, 2020

What is the further procedure? Is there anything else I need to do in order for the pull request to be executed?

@frenck frenck self-assigned this May 23, 2020
Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @mnaggatz! Looks good!

Oh, btw, nice first-time contribution to the project! Welcome! 🎉

@frenck frenck merged commit a5caf85 into home-assistant:dev May 23, 2020
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Please address the comment in a new PR. Thanks!

if isinstance(self.node, Awning):
return "awning"
if isinstance(self.node, Blind):
return "blind"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are constants in the cover entity integration for the valid device classes. Please import and use those here.

DEVICE_CLASS_AWNING = "awning"
DEVICE_CLASS_BLIND = "blind"
DEVICE_CLASS_CURTAIN = "curtain"
DEVICE_CLASS_DAMPER = "damper"
DEVICE_CLASS_DOOR = "door"
DEVICE_CLASS_GARAGE = "garage"
DEVICE_CLASS_GATE = "gate"
DEVICE_CLASS_SHADE = "shade"
DEVICE_CLASS_SHUTTER = "shutter"
DEVICE_CLASS_WINDOW = "window"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants