Skip to content

add knx cover support#7997

Merged
balloob merged 2 commits into
home-assistant:devfrom
tiktok7:support-knx-cover
Jun 19, 2017
Merged

add knx cover support#7997
balloob merged 2 commits into
home-assistant:devfrom
tiktok7:support-knx-cover

Conversation

@tiktok7
Copy link
Copy Markdown
Contributor

@tiktok7 tiktok7 commented Jun 11, 2017

Adds support for KNX covers (roller shutters, window blinds)

Description:

Related feature request: https://community.home-assistant.io/t/support-for-knx-shutters-position-stop/14142

Notes

  1. Tested with MDT roller shutter. This hardware uses 0 as open and 100 as closed, which is the opposite of the base cover implementation. This problem is mentioned here, which appeared to suggest that the polymer frontend would automatically reverse the definition of open/closed based on the device class so I also added optional support for the "device_class" setting. When I tested that locally it did not appear to work (although the icon did change)

  2. The KNXMultiAddressDevice storage of address names was also changed from class storage to object instance storage because the same address names are used for object instance so the values were being overwritten.

  3. Needed to add calls supporting percentage type DPT_Scaling used for KNX position values in cover devices

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2845

Example entry for configuration.yaml (if applicable):

cover:
  - platform: knx
    updown_address: 9/0/0
    stop_address: 9/0/1
    setposition_address: 9/0/3
    getposition_address: 9/0/4

Checklist:

Note: no new dependencies, tests pass. Lint and pydoc warnings from tox have been corrected in the updated files

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated in home-assistant.github.io

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

  • New dependencies have been added to the REQUIREMENTS variable (example).

  • New dependencies are only imported inside functions that use them (example).

  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.

  • New files were added to .coveragerc.

also corrected bugs in device config

1. overwriting of addresses in KNXMultiAddressDevice
2. setting and getting int values
3. added percentage scaling
@homeassistant
Copy link
Copy Markdown
Contributor

Hi @tiktok7,

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!

@mention-bot
Copy link
Copy Markdown

@tiktok7, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fabaff, @balloob and @pvizeli to be potential reviewers.

@tiktok7
Copy link
Copy Markdown
Contributor Author

tiktok7 commented Jun 19, 2017

It's my first time to make a PR for the project. If I need to do something else to get this change considered for review/merging could someone give me a hint?

Copy link
Copy Markdown
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

This is awesome. Looks all great 🐬 🎉

I removed the property device_class that you added to the cover entity, as it's already party of the entity base class.

@balloob balloob merged commit 4fdde4f into home-assistant:dev Jun 19, 2017
@balloob balloob mentioned this pull request Jul 1, 2017
@tiktok7 tiktok7 deleted the support-knx-cover branch July 1, 2017 11:51
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
* add knx cover

also corrected bugs in device config

1. overwriting of addresses in KNXMultiAddressDevice
2. setting and getting int values
3. added percentage scaling

* Update __init__.py
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017
@ghost ghost removed the platform: cover.knx label Mar 21, 2019
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