Skip to content

Add config flow to Brottsplatskartan#70233

Merged
epenet merged 29 commits into
home-assistant:devfrom
gjohansson-ST:bpk_cf
Apr 12, 2023
Merged

Add config flow to Brottsplatskartan#70233
epenet merged 29 commits into
home-assistant:devfrom
gjohansson-ST:bpk_cf

Conversation

@gjohansson-ST
Copy link
Copy Markdown
Member

@gjohansson-ST gjohansson-ST commented Apr 18, 2022

Breaking change

The Brottsplatskartan integration has been migrated to configuration via the UI. Configuring via YAML configuration has now 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

Implement config flow for brottsplatskartan

Type of change

Implementation of config flow

  • 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

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.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • 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:

@github-actions
Copy link
Copy Markdown

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.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 22, 2022
@gjohansson-ST
Copy link
Copy Markdown
Member Author

Not stale. Awaiting review.

Copy link
Copy Markdown
Contributor

@luar123 luar123 left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Copy Markdown

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.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label Jan 13, 2023
@gjohansson-ST
Copy link
Copy Markdown
Member Author

Not stale

@github-actions github-actions Bot removed the stale label Jan 13, 2023
Comment thread homeassistant/components/brottsplatskartan/translations/en.json Outdated
Comment thread tests/components/brottsplatskartan/test_config_flow.py Outdated
Comment thread tests/components/brottsplatskartan/test_config_flow.py Outdated
Comment thread tests/components/brottsplatskartan/test_config_flow.py Outdated
Comment thread tests/components/brottsplatskartan/test_config_flow.py Outdated
Comment thread tests/components/brottsplatskartan/test_config_flow.py Outdated
Comment thread tests/components/brottsplatskartan/test_config_flow.py Outdated
Comment thread homeassistant/components/brottsplatskartan/sensor.py Outdated
Comment thread homeassistant/components/brottsplatskartan/const.py Outdated
@home-assistant home-assistant Bot marked this pull request as draft March 22, 2023 14:27
@home-assistant
Copy link
Copy Markdown
Contributor

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@gjohansson-ST
Copy link
Copy Markdown
Member Author

Coverage 100%

---------- coverage: platform linux, python 3.10.10-final-0 ----------
Name                                                        Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------------
homeassistant/components/brottsplatskartan/__init__.py          9      0   100%
homeassistant/components/brottsplatskartan/config_flow.py      39      0   100%
homeassistant/components/brottsplatskartan/const.py             9      0   100%
-----------------------------------------------------------------------------------------
TOTAL                                                          57      0   100%

Copy link
Copy Markdown
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

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

A few last comments, and a question.: how were multiple areas meant to work previously, and why now restrict to a single area?

Comment thread homeassistant/components/brottsplatskartan/config_flow.py Outdated
Comment thread homeassistant/components/brottsplatskartan/strings.json Outdated
Comment thread homeassistant/components/brottsplatskartan/sensor.py Outdated
Comment thread homeassistant/components/brottsplatskartan/sensor.py Outdated
Comment thread homeassistant/components/brottsplatskartan/sensor.py Outdated
Copy link
Copy Markdown
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

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

As per comments above.

@home-assistant home-assistant Bot marked this pull request as draft April 11, 2023 09:47
@gjohansson-ST
Copy link
Copy Markdown
Member Author

A few last comments, and a question.: how were multiple areas meant to work previously, and why now restrict to a single area?

It wasn't. Before and now you can only configure one area.
No clue why they set it as a list whomever created it.

@gjohansson-ST gjohansson-ST marked this pull request as ready for review April 11, 2023 20:58
@home-assistant home-assistant Bot requested a review from epenet April 11, 2023 20:58
Copy link
Copy Markdown
Contributor

@epenet epenet left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@epenet epenet added the smash Indicator this PR is close to finish for merging or closing label Apr 12, 2023
@epenet epenet merged commit 00847ee into home-assistant:dev Apr 12, 2023
@gjohansson-ST gjohansson-ST deleted the bpk_cf branch April 12, 2023 09:19
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 13, 2023
@frenck
Copy link
Copy Markdown
Member

frenck commented Apr 26, 2023

Removed the breaking change, as this is raising an issue in the repair center.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed config-flow This integration migrates to the UI by adding a config flow has-tests integration: brottsplatskartan new-feature smash Indicator this PR is close to finish for merging or closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants