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

Improve Lutron RadioRA2 support, adding switches and scenes #18330

Merged
merged 5 commits into from
Dec 25, 2018

Conversation

cdheiser
Copy link
Contributor

@cdheiser cdheiser commented Nov 9, 2018

Description:

  • Update the version of pylutron to 0.2 which has various bug fixes.
  • Switch to pylutron's per-device subscribe
  • Add switch support, and configure any non-dimmable output as a switch.
  • Add scene support, using any configured keypad button with a corresponding LED as a scene.

Related issue (if applicable): fixes #

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

Example entry for configuration.yaml (if applicable):

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 communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

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

- Update the version of pylutron to 0.2 which has various bug fixes.
- Switch to pylutron's per-device subscribe
- Add switch support, and configure any non-dimmable output as a switch.
- Add scene support, using any configured keypad button with a corresponding LED as a scene.
@homeassistant
Copy link
Contributor

Hi @cdheiser,

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!

homeassistant/components/switch/lutron.py Outdated Show resolved Hide resolved
homeassistant/components/lutron.py Show resolved Hide resolved
homeassistant/components/scene/lutron.py Outdated Show resolved Hide resolved
homeassistant/components/scene/lutron.py Outdated Show resolved Hide resolved
homeassistant/components/scene/lutron.py Outdated Show resolved Hide resolved
homeassistant/components/switch/lutron.py Outdated Show resolved Hide resolved
def device_state_attributes(self):
"""Return the state attributes."""
attr = {}
attr['Lutron Integration ID'] = self._lutron_device.id
Copy link
Member

Choose a reason for hiding this comment

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

Keys in state attributes should be lowercase snakecase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was done to remain consistent with the existing light/lutron.py. I've updated the new switch code. I could update and include a fix for the light in this pull request as well.

Copy link
Member

@MartinHjelmare MartinHjelmare Nov 22, 2018

Choose a reason for hiding this comment

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

Could you make a separate PR with that correction for the light platform? It will be a breaking change. Thanks!

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.

Looks good! @pvizeli?

@cdheiser
Copy link
Contributor Author

cdheiser commented Dec 6, 2018

@pvizeli any other comments/requests?

@cdheiser
Copy link
Contributor Author

bump?

@MartinHjelmare MartinHjelmare changed the title Improve Lutron RadioRA2 support, adding switch and scene support. Improve Lutron RadioRA2 support, adding switches and scenes Dec 25, 2018
@MartinHjelmare MartinHjelmare merged commit b2081c5 into home-assistant:dev Dec 25, 2018
@ghost ghost removed the in progress label Dec 25, 2018
dshokouhi pushed a commit to dshokouhi/home-assistant that referenced this pull request Dec 25, 2018
…istant#18330)

* Improve Lutron RadioRA2 support, adding switch and scene support.

- Update the version of pylutron to 0.2 which has various bug fixes.
- Switch to pylutron's per-device subscribe
- Add switch support, and configure any non-dimmable output as a switch.
- Add scene support, using any configured keypad button with a corresponding LED as a scene.

* Fixes for comments in pull request home-assistant#18330

* More fixes for comments in pull request home-assistant#18330

* Remove unused imports

* Cleanup in docstrings for Lutron scene support.
@balloob balloob mentioned this pull request Jan 10, 2019
@grantalewis
Copy link

I've had problems crop up with lutron beginning in 0.85.1 -- so far no responses on my post:

#20348

@MartinHjelmare
Copy link
Member

Please open an issue if you suspect a bug. If you need help please use our help channels:
https://home-assistant.io/help/#communication-channels

Merged PRs should not be used for support or bug reports. Thanks!

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Jan 27, 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.

7 participants