10000 Add configuration flow for Buienradar integration by RobBie1221 · Pull Request #37796 · home-assistant/core · GitHub
[go: up one dir, main page]

Skip to content

Add configuration flow for Buienradar integration #37796

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

Merged
merged 58 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
69f942d
Add configuration flow for Buienradar integration
RobBie1221 Jul 12, 2020
28d1df7
Update buienradar camera tests to work with config flow
RobBie1221 Jul 13, 2020
e7404dd
Update buienradar weather tests to work with config flow
RobBie1221 Jul 13, 2020
6cb7b82
Update buienradar sensor tests to work with config flow
RobBie1221 Jul 13, 2020
e140cb9
Remove buienradar config_flow tests to pass tests
RobBie1221 Jul 13, 2020
5faefce
Add config flow tests for buienradar integration
RobBie1221 Jul 13, 2020
63d0483
Increase test coverage for buienradar config_flow tests
RobBie1221 Jul 13, 2020
2e11aab
Move data into domain
RobBie1221 Aug 5, 2020
e9306b8
Remove forecast option
RobBie1221 Aug 5, 2020
17cd62a
Move data to options
RobBie1221 Aug 5, 2020
57ac7ad
Remove options from config flow
RobBie1221 Aug 5, 2020
825f6a0
Adjust tests
RobBie1221 Aug 5, 2020
10d14b3
Adjust string
RobBie1221 Aug 5, 2020
2b9da3f
Fix pylint issues
RobBie1221 Aug 5, 2020
aedc670
Rework review comments
RobBie1221 Aug 21, 2020
8d56802
Handle import
RobBie1221 Oct 11, 2020
0bb0392
Change config flow to setup camera or weather
RobBie1221 Oct 11, 2020
c2374fc
Fix tests
RobBie1221 Oct 11, 2020
9b5e537
Remove translated file
RobBie1221 Oct 11, 2020
c07feac
Fix pylint
RobBie1221 Oct 11, 2020
7d6763e
Fix flake8
RobBie1221 Oct 12, 2020
43b57de
Fix unload
RobBie1221 Oct 12, 2020
b438ae8
Minor name changes
RobBie1221 Dec 26, 2020
8e3f815
Update homeassistant/components/buienradar/config_flow.py
RobBie1221 Feb 19, 2021
443c11a
Remove asynctest
RobBie1221 Feb 20, 2021
eaeb6e6
Add translation
RobBie1221 Mar 10, 2021
42540a8
Disable sensors by default
RobBie1221 Mar 10, 2021
7fcdaff
Remove integration name from translations
RobBie1221 Mar 10, 2021
dded4d8
Remove import method
RobBie1221 Mar 10, 2021
dad5129
Drop selection between platforms, disable camera by default
RobBie1221 Mar 13, 2021
4f09f12
Minor fix in configured_instances
RobBie1221 Mar 13, 2021
4089f69
Bugfix in weather
RobBie1221 Mar 13, 2021
56a8778
Rework import
RobBie1221 Mar 15, 2021
eb5e915
Change unique ids of camera
RobBie1221 Mar 15, 2021
2332701
Fix in import
RobBie1221 Mar 15, 2021
e4596a6
Fix camera tests
RobBie1221 Mar 15, 2021
91ddf2b
Fix sensor test
RobBie1221 Mar 15, 2021
9166031
Fix sensor test 2
RobBie1221 Mar 15, 2021
fe11489
Fix config flow tests
RobBie1221 Mar 15, 2021
4e5321e
Add option flow
RobBie1221 Mar 15, 2021
0e4ebc3
Add tests for option flow
RobBie1221 Mar 15, 2021
e433de2
Add import tests
RobBie1221 Mar 16, 2021
828ff24
Some cleanups
RobBie1221 Mar 16, 2021
8de1c1a
Apply suggestions from code review
RobBie1221 Apr 30, 2021
f5f3d59
Fix isort,black,mypy
RobBie1221 Apr 30, 2021
e65a143
Small tweaks and added typing to new parts
frenck Apr 30, 2021
895741e
Fix review comments (1)
RobBie1221 May 2, 2021
653b2c1
Apply suggestions from code review
RobBie1221 May 2, 2021
bcc6225
Fix review comments (2)
RobBie1221 May 2, 2021
8661ab9
Merge branch 'buienradar_cfg_flow' of https://github.com/RobBie1221/c…
RobBie1221 May 2, 2021
cf7242e
Fix issues
RobBie1221 May 2, 2021
7e7a1f0
Fix unique id
RobBie1221 May 2, 2021
b11919d
Improve tests
RobBie1221 May 2, 2021
bd0f86c
Extend tests
RobBie1221 May 2, 2021
aaf549e
Fix issue with unload
RobBie1221 May 3, 2021
5144929
Address review comments
RobBie1221 May 4, 2021
cddba93
Add warning when loading platform
RobBie1221 May 4, 2021
c68172c
Add load/unload test
RobBie1221 May 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extend tests
  • Loading branch information
RobBie1221 committed May 2, 2021
commit bd0f86c5f07d95808335e9de1d1a06c7bd76096c
1 change: 0 additions & 1 deletion tests/components/buienradar/test_config_flow.py
< F55F td id="diff-bcf5d7ad7ca1f9a02e6ac6842e23ce8c0d1b543a49a4c102114695d900096830L71" data-line-number="71" class="blob-num blob-num-deletion js-linkable-line-number">
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ async def test_config_flow_already_configured_weather(hass):

async def test_import_camera(hass):
"""Test import of camera."""

with patch(
"homeassistant.components.buienradar.async_setup_entry", return_value=True
):
Expand Down
23 changes: 22 additions & 1 deletion tests/components/buienradar/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from homeassistant.components.buienradar import async_setup
from homeassistant.components.buienradar.const import DOMAIN
from homeassistant.helpers.entity_registry import async_get_registry


async def test_import_all(hass):
Expand Down Expand Up @@ -45,7 +46,18 @@ async def test_import_all(hass):

async def test_import_camera(hass):
"""Test import of camera platform."""
config = {"camera 1": [{"platform": "buienradar", "country_code": "NL"}]}
entity_registry = await async_get_registry(hass)
entity_registry.async_get_or_create(
domain="camera",
platform="buienradar",
unique_id="512_NL",
original_name="test_name",
)
await hass.async_block_till_done()

config = {
"camera 1": [{"platform": "buienradar", "country_code": "NL", "dimension": 512}]
}

with patch(
"homeassistant.components.buienradar.async_setup_entry", return_value=True
Expand All @@ -68,3 +80,12 @@ async def test_import_camera(hass):
"delta": 600,
"name": "Buienradar",
}

entity_id = entity_registry.async_get_entity_id(
"camera",
"buienradar",
f"{hass.config.latitude:2.6f}{hass.config.longitude:2.6f}",
)
assert entity_id
entity = entity_registry.async_get(entity_id)
assert entity.original_name == "test_name"
0