Commit Graph

41 Commits

Author SHA1 Message Date
Jan Bouwhuis
70b358bca1 Always reload after a successful reauth flow (#116026)
* Always reload after a succesfull reauth-flow

* Add test, fix CI failures

* Add kwarg to prevent reloading and tests

* Do not reload entry for bond if it exists

* Remove mocks on internals

* Rename kwarg to always_reload

* Update tests/components/weatherflow_cloud/test_config_flow.py

* Update tests/components/homeworks/test_config_flow.py

* Update tests/components/homeworks/test_config_flow.py

* Rename to option to reload_even_if_entry_is_unchanged
2024-04-24 15:13:33 +02:00
Marc Mueller
ff3a801936 Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Erik Montnemery
6fe28d3764 Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
Marc Mueller
c82933175d Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
J. Nick Koston
6fb86f179a Use new config entry update/abort helper in bond (#108690)
Use new config entry update/abort helper in bond

uses the new helper from https://github.com/home-assistant/core/pull/108034
2024-01-23 06:09:33 +01:00
J. Nick Koston
e079968ef4 Handle timeout fetching bond token in config flow (#78896) 2022-09-21 14:03:05 -04:00
J. Nick Koston
b3682a5c81 Revert bond reload on setup_retry discovery (#72744) 2022-05-30 22:51:35 -07:00
J. Nick Koston
3399be2dad Retry bond setup when zeroconf discovery happens (#72687) 2022-05-30 18:41:07 +02:00
Marcio Granzotto Rodrigues
c1f62d03a0 Fix bond device state with v3 firmwares (#72516) 2022-05-25 18:12:43 -10:00
J. Nick Koston
6b70bd7495 Fix uncaught exception in bond config flow (#61184) 2021-12-07 17:20:38 -08:00
epenet
fb94ed4e6b Use dataclass properties in bond discovery (#60590)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-30 10:58:06 +01:00
J. Nick Koston
ef8cf9e597 Add configuration_url to bond (#60523) 2021-11-29 08:44:11 +01:00
epenet
b3ffc1e183 Adjust async_step_zeroconf signature for strict typing (#59503)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-15 18:05:45 +01:00
epenet
e983370c27 Use zeroconf attributes (A-D) (#58835)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-02 12:27:06 -05:00
Ville Skyttä
73d192b3f3 Use HTTPStatus instead of HTTP_ consts and magic values in comp.../[bc]* (#57989) 2021-10-22 19:43:40 +02:00
J. Nick Koston
d09ee11c54 Fix bond reloading on zeroconf discovery when host has not changed (#57799) 2021-10-17 19:50:13 +02:00
J. Nick Koston
2adb9a8bec Refresh the bond token if it has changed and available (#57583) 2021-10-12 21:39:46 -07:00
Shay Levy
cf228e3fe5 Add constructor return type in integrations A-D (#50903) 2021-05-20 18:51:39 +03:00
Franck Nijhof
d4d0b93d3b Clean up connection classes in integrations A-C (#49888) 2021-04-30 21:01:52 -10:00
Ruslan Sayfutdinov
183220008d Rename FlowResultDict to FlowResult (#49847) 2021-04-29 13:40:51 +02:00
Ruslan Sayfutdinov
7a9385d857 Explicitly define all methods in ConfigFlow (#49341) 2021-04-17 12:42:31 +02:00
Ruslan Sayfutdinov
80f66f301b Define data flow result type (#49260)
* Define data flow result type

* Revert explicit definitions

* Fix tests

* Specific mypy ignore
2021-04-15 07:17:07 -10:00
J. Nick Koston
32daa63265 Use shared aiohttp.ClientSession in bond (#48669) 2021-04-05 00:12:58 +02:00
Marc Mueller
2956eb0902 Update pylint to 2.7.3 (#48488)
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
2021-03-29 18:02:56 -10:00
Marc Mueller
76199c0eb2 Update typing 04 (#48037) 2021-03-17 23:34:25 +01:00
J. Nick Koston
5784e14d0c Enforce typing in bond (#47187)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-01 03:16:30 +01:00
J. Nick Koston
f4db74fe73 Fix bond typing in config flow (#47055) 2021-02-25 18:08:04 +01:00
J. Nick Koston
d68a51ddce Avoid having to ask for the bond token when possible during config (#46845) 2021-02-23 13:42:56 -08:00
J. Nick Koston
5b0b01d727 Implement suggested areas in bond (#45942)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-19 21:06:43 -10:00
Franck Nijhof
bc1daf1802 None optional hass typing in FlowHandler (#46462)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-13 13:21:37 +01:00
J. Nick Koston
6a62ebb6a4 Add BPUP (push updates) support to bond (#45550) 2021-02-09 09:43:38 +01:00
springstan
db582bdc1b Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY (#39993)
* Use http status codes and add HTTP_BAD_GATEWAY constant

* Address review comments:
 - using constants in tado integration
 - using constant in media_player init.py

* Add and use HTTP_ACCEPTED constant
2020-09-15 20:01:07 +03:00
Ville Skyttä
b4bac0f7a0 Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Eugene Prystupa
50cd6be18d Raise error when unsupported (old) Bond firmware is detected (#38650) 2020-08-07 21:22:13 -05:00
Eugene Prystupa
11994d207a Add zeroconf discovery for bond integration (#38448)
* Add zeroconf discovery for bond integration

* Add zeroconf discovery for bond integration (fix typo)

* Add zeroconf discovery for bond integration (PR feedback)

* Add zeroconf discovery for bond integration (PR feedback)

* Add zeroconf discovery for bond integration (PR feedback)
2020-08-01 11:18:40 -05:00
Eugene Prystupa
89cbcdb9dc Abort bond hub config flow if hub is already registered (#38416)
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-07-31 14:08:25 +02:00
Eugene Prystupa
0493f1c206 Generate bond config entry ID from the hub metadata (#38354)
* Generate bond config entry ID from the hub metadata

* Generate bond config entry ID from the hub metadata (PR feedback)
2020-07-30 18:00:58 -05:00
Eugene Prystupa
3480fb6996 Refactor bond integration to be completely async (#38066) 2020-07-22 20:22:25 -05:00
Eugene Prystupa
90c308a393 fix erroneous dependency used by Bond integration (simplejson to json) (#37642) 2020-07-07 20:36:22 -05:00
Eugene Prystupa
e5872cc0e4 apply small feedback suggestions from a previous PR that is already merged (#37551) 2020-07-06 20:09:56 -05:00
Eugene Prystupa
9b77e16ffc Add new integration for Bond hub (#37477)
* create foundation for Bond integration

* add Bond hub integration (fix lint)

* Update homeassistant/components/bond/__init__.py

adding async_unload_entry per PR review suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* add Bond hub integration (fix missing import after applying PR suggestion)

* Update tests/components/bond/test_init.py

add a unit for unloading per PR review suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/bond/test_init.py

add unit test for unload per PR review suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/bond/test_init.py

PR review suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/bond/test_init.py

PR review suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/bond/test_init.py

PR review suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* add Bond hub integration (fix formatting)

* Update homeassistant/components/bond/manifest.json

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/bond/manifest.json

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/bond/manifest.json

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/bond/strings.json

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/bond/manifest.json

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update requirements_all.txt

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/bond/manifest.json

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update requirements_test_all.txt

PR suggestion

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* add Bond hub integration (remove friendly name from config per PR suggestion)

* Update homeassistant/components/bond/__init__.py

add per PR review feedback

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/bond/__init__.py

remove per PR review feedback

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update tests/components/bond/test_init.py

fix unit test

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-07-05 20:17:53 -05:00