-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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 compensation helper #121857
base: dev
Are you sure you want to change the base?
Conversation
Hey there @Petro31, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Everything looks good. Tested the config flow through the UI and it makes sense.
Entering the points could be better but there isn't a better config flow option, and I'm happy with the current results.
The code and tests look good.
vol.Required(CONF_DATAPOINTS): SelectSelector( | ||
SelectSelectorConfig( | ||
options=[], | ||
multiple=True, | ||
custom_value=True, | ||
mode=SelectSelectorMode.DROPDOWN, | ||
) | ||
), |
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 shouldn't be asking for users to enter comma-separated values in a text field. This is error-prone as well as a bad end-user experience.
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 have another suggestion to get the desired functionality? There's no other selectors that offer an "endless list" of items.
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.
I think the only good solution here is to see if we can make a selector that allows for adding "groups" of selectors.
Little like sections I guess, but then for repeating groups of items.
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.
While I do get that's not optimal for users to input like I built it, I'm not thinking as it's too bad as there is quite descriptive text, easier than in yaml and also quite some validation that its input is ok.
However @frenck I'm not against building a new selector for this (as there is also other places that would benefit). Could you expand how you were thinking this would be presented as I'm struggling to see how it would be made. Thanks
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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. |
Proposed change
Adds config flow to compensation helper
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: