-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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 config flow to discord #61069
Add config flow to discord #61069
Conversation
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Config flows take a while in the queue so it should not be closed by the bot. |
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 note, the upstream library has been archived and is unmaintained.
It won't be compatible with our Python 3.10 upgrade at this point.
Well that blows, not sure if there is another suitable package. |
@tkdrob Meanwhile; I've replaced the |
This latest commit will fail due to mypy. Discord in |
I can also go back to Node Red, the Discord node works there 😜 |
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.
Some initial comments. I haven't looked a the tests yet.
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.
Nice! Thanks, @tkdrob 👍
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 address the comments in a new PR. Thanks!
return await self.async_step_reauth_confirm() | ||
|
||
self._set_confirm_only() | ||
return self.async_show_form(step_id="reauth") |
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 form should be shown by the confirm step. The reauth step will always receive the existing config entry data as input.
Platform.NOTIFY, | ||
DOMAIN, | ||
hass.data[DOMAIN][entry.entry_id], | ||
hass.data[DOMAIN], |
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.
Same comments as for the slack config flow PR. See the Tibber integration for the correct way to call this function.
context={"source": config_entries.SOURCE_USER}, | ||
) | ||
with mocked_discord_info(), patch_discord_login(): | ||
result = await hass.config_entries.flow.async_configure( |
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.
We normally patch the integration setup function on all create entry and reauth_successful results to avoid setting up the whole integration.
Breaking change
Discord can now be set up in the UI. Existing yaml configurations are automatically imported and can be safely removed.
Proposed change
Add config flow to discord
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: