Config flow for elkm1#33297
Merged
Merged
Conversation
* As entity ids can now be changed, the “alarm_control_panel” attribute “changed_by_entity_id” is now “changed_by_keypad” and will show the name of the Elk keypad instead of the entity id. * An auto configure mode has been introduced which avoids the need to setup the complex include and exclude filters. This functionality still exists when configuring from yaml for power users who want more control over which entities elkm1 generates.
7 tasks
Member
Author
|
@gjbadros If you have a spare moment, would you give this a spin? |
balloob
reviewed
Mar 27, 2020
balloob
reviewed
Mar 27, 2020
…o linked keypads when auto_configure is False
Kane610
reviewed
Mar 27, 2020
Contributor
|
At least in my use case, I wanted to be able to specify an abbreviation
(e.g., "gh" for guest house, "ph" for pool house, or whatever) explicitly.
…On Fri, Mar 27, 2020 at 9:29 AM Robert Svensson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In homeassistant/components/elkm1/config_flow.py
<#33297 (comment)>:
> + if "base" not in errors:
+ await self.async_set_unique_id(user_input[CONF_PREFIX])
+ self._abort_if_unique_id_configured()
+
+ if self.importing:
+ return self.async_create_entry(title=info["title"], data=user_input)
+
+ return self.async_create_entry(
+ title=info["title"],
+ data={
+ CONF_HOST: info[CONF_HOST],
+ CONF_USERNAME: user_input[CONF_USERNAME],
+ CONF_PASSWORD: user_input[CONF_PASSWORD],
+ CONF_AUTO_CONFIGURE: True,
+ CONF_TEMPERATURE_UNIT: user_input[CONF_TEMPERATURE_UNIT],
+ CONF_PREFIX: info[CONF_PREFIX],
Can the prefix be automatically selected instead?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33297 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALOHTLBUTSKE5MRFURAFGDRJTH5VANCNFSM4LUVGIJQ>
.
|
balloob
reviewed
Mar 27, 2020
balloob
reviewed
Mar 27, 2020
balloob
approved these changes
Mar 27, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
attribute “changed_by_entity_id” is now “changed_by_keypad”
and will show the name of the Elk keypad instead of the entity id.
Proposed change
need to setup the complex include and exclude filters. This
functionality still exists when configuring from yaml for power
users who want more control over which entities elkm1 generates.
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional 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: