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 support for Lutron RadioRA 2 #5269
Conversation
@robbiet480, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @rmkraus to be potential reviewers. |
This PR did have a new |
@property | ||
def brightness(self): | ||
"""Return the brightness of the light.""" | ||
last_level = self._lutron_device.last_level() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this doing I/O inside properties?
DOMAIN = "lutron" | ||
|
||
# List of component names (string) your component depends upon. | ||
DEPENDENCIES = ['group', 'light'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to depend on group or light
|
||
LUTRON_CONTROLLER = None | ||
|
||
LUTRON_DEVICES = {'light': []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use hass.data
instead of globals
from pylutron import Lutron | ||
|
||
config = base_config.get(DOMAIN) | ||
LUTRON_CONTROLLER = Lutron( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hass.data
self._controller = controller | ||
self._area_name = area_name | ||
|
||
self.update() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Home Assistant can do this if you add boolean as second param to add_devices: add_devices(devices, True)
Note that it was not behind by 7mo, thats just when I originally authored the change. It's a few months behind, but I've updated my local version since then. I've had my day job keeping me busy to where I haven't had a chance to address the original comments and re-upload. I'd like to do that myself if you don't mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to re-upload my changes again. I'm going to find some time to do it for real this time :) Could you please abandon yours?
@thecynic Sure that's fine! |
This is a re-staged clone of the PR that @thecynic proposed in #3832. It was behind dev by almost 7 months and I was unable to get things updated on his PR because of GitHub permissions.
Description:
This PR adds support for the Lutron RadioRA 2. I've been running with it for a few months now and things seem pretty solid. I'm sure there are issues, so bug reports are welcome.
Example entry for
configuration.yaml
(if applicable):Checklist:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable ([example][ex-requir]).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.