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 SmartThings Cover platform and add cover device classes #21192

Merged
merged 6 commits into from Feb 25, 2019

Conversation

andrewsayre
Copy link
Member

@andrewsayre andrewsayre commented Feb 18, 2019

Description:

Adds SmartThings Cover platform that represents SmartThings devices that have open/close related capabilities. Highlights:

  • Supports open/close for doors, garage doors, and window shades.
  • Cover position is supported for device that implement the switchLevel capability.
  • Battery level is reported as a state attribute if the battery capability is implemented by the device.
  • Cover entities are automatically created if supported by the device.
  • Adds 6 new device classes to the Cover platform per Add additional Cover device classes architecture#153 (curtain, door, shade, shutter, blind, and awning)

BREAKING CHANGE: With the addition of the SmartThings Cover platform, the SmartThings Sensor platform will no longer represent Door, Garage Door and Window Share attributes. Additionally, if the cover device reports battery status, the value will be present as a state attribute (battery_level) and not a discrete sensor.

Pull request in home-assistant.io with documentation: home-assistant/home-assistant.io#8625

Pull request in developers.home-assistant with dev documentation: home-assistant/developers.home-assistant#187

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

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

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@andrewsayre andrewsayre changed the title Add SmartThings cover platform and add cover device classes Add SmartThings Cover platform and add cover device classes Feb 24, 2019
@andrewsayre
Copy link
Member Author

@balloob Can you take a look at this when you get a chance? I think it's ready to move forward.

homeassistant/components/smartthings/cover.py Outdated Show resolved Hide resolved
homeassistant/components/smartthings/cover.py Outdated Show resolved Hide resolved
homeassistant/components/smartthings/cover.py Outdated Show resolved Hide resolved
homeassistant/components/smartthings/cover.py Outdated Show resolved Hide resolved
tests/components/smartthings/test_cover.py Show resolved Hide resolved
Copy link
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.

Last comment I think.

tests/components/smartthings/test_cover.py Show resolved Hide resolved
Copy link
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.

Nice!

@balloob balloob merged commit d3f1ee4 into home-assistant:dev Feb 25, 2019
@ghost ghost removed the in progress label Feb 25, 2019
@andrewsayre andrewsayre deleted the feature-smartthings-cover branch February 25, 2019 23:06
@balloob balloob mentioned this pull request Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants