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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration flow to Whois #63069
Conversation
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.
Looks good! I will use this! 馃榾
Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
hass.config_entries.flow.async_init( | ||
DOMAIN, | ||
context={"source": SOURCE_IMPORT}, | ||
data={CONF_NAME: config[CONF_NAME]}, |
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.
Do you not need to pass also the domain name?
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.
Ouch, nicely spotted! 馃檹 thanks
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.
Added missing domain import in 90ada67
"""Initialize the sensor.""" | ||
self._attr_name = 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.
You are probably planning to do it in a follow-up PR, but since you are dropping the name from the config entry, does it not make sense to add the unique_id to the entity directly in this PR to be able to rename it in the UI?
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.
Yeah, that is the idea :)
I wanted to move that into the PR that adds more sensors/sensor entity descriptions to ensure a stable unique ID from the get-go (for all sensors)
This PR wasn't labeled correctly, added the breaking change label. |
Breaking change
The Whois integration migrated to configuration via the UI. Configuring Whois via YAML configuration has been deprecated and will be removed in a future Home Assistant release.
Your existing YAML configuration is automatically imported on upgrade to this release; and thus can be safely removed from your YAML configuration after upgrading.
Proposed change
This PR implements the bare minimum configuration flow for the Whois integration, including import.
This PR is part of a bunch of PRs that I have ready for this integration. Others include:
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: