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

Suggestion for one line adding... for getting keys WITHOUT python environment within HA #29

Open
ByteHeav opened this issue Jul 11, 2024 · 0 comments

Comments

@ByteHeav
Copy link

And if not added to script, just a hint for anyone else who gets extremely frustrated with the problem: HOW TO ADD LAMPS FIRST F****NG TIME.

Add last line in this to appropriate place, and yes, you can get human readable (and copy-paste able) info to logs...

localKeys = {};
for group in groups:
    devs = await hass.async_add_executor_job(api.devices, group['groupId']);
    for dev in devs:
        localKeys[dev.id] = dev.localKey;
        log.info('[Device found]\t device name: ' + dev.name + ', device id: ' + dev.id + ', localkey: ' + dev.localKey)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant