Skip to content

Allow data entry flows to hint for additional steps#49202

Merged
balloob merged 4 commits intohome-assistant:devfrom
emontnemery:data_entry_flow_last_step
Apr 23, 2021
Merged

Allow data entry flows to hint for additional steps#49202
balloob merged 4 commits intohome-assistant:devfrom
emontnemery:data_entry_flow_last_step

Conversation

@emontnemery
Copy link
Copy Markdown
Contributor

@emontnemery emontnemery commented Apr 14, 2021

Proposed change

Allow data entry flows to hint for additional steps

The idea is to make it clear to the user when there are additional options available.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@KapJI
Copy link
Copy Markdown
Member

KapJI commented Apr 17, 2021

This needs to be rebased to include #49260

@emontnemery emontnemery force-pushed the data_entry_flow_last_step branch from 38cf8a9 to 128b1f8 Compare April 20, 2021 12:42
Comment thread homeassistant/data_entry_flow.py
Comment thread homeassistant/data_entry_flow.py Outdated
data_schema: vol.Schema = None,
errors: dict[str, str] | None = None,
description_placeholders: dict[str, Any] | None = None,
last_step: bool = True,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems weird to default to True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect it to be defaulted to None and typed as bool | None.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be the difference between True and None then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None means not set. True/False means the config flow explicitly passed in True/False.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@balloob balloob merged commit 8013eb0 into home-assistant:dev Apr 23, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants