-
Notifications
You must be signed in to change notification settings - Fork 37
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
Dynamically discover mac address of bridge + HACS improvements #55
Conversation
rsnodgrass
commented
May 19, 2020
- dynamically discover mac address of bridge (config does not need to be specified for entity registry to work)
- rename README.md to be HACS compatible as default README
- adds hacs.json for improved HACS support (default readme)
according to #56 & #57 there may be issues with HA <110 {
"name": "Lutron Caseta Smart Bridge PRO / RA2 Select",
"domains": [ "cover", "fan", "light", "scene", "sensor", "switch" ],
"homeassistant": "0.110",
"render_readme": true
} |
Good point about minimum version for the updated version. I have updated this to include that limitation (now that we have a hacs.json file). |
@upsert can you look at this change, it now restricts updates to 0.110 (with thew new hacs.json file) and automatically discovers the MAC address of the bridge. |
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.
The info.md
was provided for rendering in HACS. It should not need the readme rendered as it is very long.
@upsert Aha, thanks for catching that. I have removed render_readme and did an editing pass on the info.md file. |
I've done some testing and I'm seeing that It is not clear if this is an issue with the Tested on a virtual machine running Ubuntu 18.04.04 LTS. |
I've integrated your changes to info.md, README.md and the HACS file. The JSON should help head off issues being raised due to the recent breaking changes and the requirement for 0.110. |
Great. I hope to have time to look at 00:00:00:00:00 MAC issue in next few days.
Three thoughts:
* Persist previous IP to MAC mappings across restarts and use when look up fails
* Delay sensor creation and periodically recheck MAC every second until it resolves (but I don’t like any delay in availability of light control on startup)
* or...just back out change and leave manual config only
…
On May 26, 2020 at 5:11 AM, <upsert ***@***.***)> wrote:
I've integrated your changes to info.md, README.md and the HACS file. The JSON should help head off issues being raised due to the recent breaking changes and the requirement for 0.110.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (#55 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAQY4XBW3PIBI3W5M5FEBHTRTOWWFANCNFSM4NFLVPKA).
|
mac_address = None | ||
# load the bridge's MAC address used for generating unique IDs for each device | ||
host = bridge[CONF_HOST] | ||
mac_address = getmac.get_mac_address(ip=host) |
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.
This does I/O and can also throw an exception. It should be wrapped in await hass.async_add_executor_job
. ... probably will need partial
as well due to the keyword arg.
At this point, this custom component is in maintenance mode and will not be adding new features or dependencies. See the built-in integration for Lutron Caséta for more features including auto-discovery. |