1
0
mirror of https://github.com/home-assistant/core.git synced 2025-08-17 17:30:08 +00:00
Commit Graph

67 Commits

Author SHA1 Message Date
Sid
2cc916db6d Replace pylint broad-except with Ruff BLE001 () 2024-05-07 14:00:27 +02:00
Marcel van der Veldt
a7a30581fc Fix adding Hue bridge manually by IP () 2024-03-11 12:35:41 +01:00
Marc Mueller
8809d3aa88 Add empty line after module docstring [g-i] () 2024-03-08 08:52:48 -05:00
Erik Montnemery
e06446d0fa Migrate integrations e-h to generic flowhandler () 2024-02-29 20:07:36 +01:00
Marc Mueller
7a89e58873 Use builtin TimeoutError [e-i] () 2024-02-05 12:00:37 +01:00
Joost Lekkerkerker
ac53b78a0c Deduplicate constants A-D () 2023-12-13 14:21:44 +01:00
J. Nick Koston
6c095a963d Switch config flows use newer zeroconf methods to check IP Addresses () 2023-09-20 01:08:58 +02:00
Marc Mueller
5dd3f05db8 Use asyncio.timeout [f-h] () 2023-08-15 08:37:06 -05:00
Marcel van der Veldt
fceb208381 Abort Hue config flow if bridge can not be reached ()
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-15 18:55:34 +01:00
epenet
42b74e7f56 Adjust entity registry access in integrations (3) () 2023-03-01 08:24:56 +01:00
Marcel van der Veldt
fe583b7c4a Remove SSDP discovery from Hue ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-16 19:56:46 +01:00
Paulus Schoutsen
87dceaf238 Hue config flow to guard ipv6 ()
* Hue config flow to guard ipv6

* Use helper
2022-04-25 10:52:57 -07:00
Paulus Schoutsen
ead81edcec Handle Hue discovery errors () 2022-03-19 14:28:16 -07:00
Dave T
0acfc7bbab Align config flow type hints to scaffold () 2022-01-30 20:26:28 +01:00
Marcel van der Veldt
055fb99938 Hue allow per-device availability override ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-12-30 20:46:52 -08:00
Marcel van der Veldt
7c7df5bb51 Change check for existence of options flow ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-12-07 12:50:34 -08:00
Marcel van der Veldt
b98bc64604 Disable options flow for Hue V2 bridges () 2021-12-05 09:47:44 -08:00
Marcel van der Veldt
3eeb855679 Fix Hue config flow () 2021-12-05 09:46:48 -08:00
epenet
d75785d701 Use dataclass properties in hue discovery ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-30 16:36:35 +01:00
epenet
ec1c52d945 Use dataclass for SsdpServiceInfo ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-29 06:10:07 -10:00
epenet
624d866239 SSDP attributes can be present but empty ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-25 11:41:49 -06:00
epenet
df3f3321f2 Use ZeroconfServiceInfo in hue ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-20 14:39:14 -08:00
Marcel van der Veldt
e1e6925097 Refactor of Hue integration with full V2 support ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-11-16 11:59:17 -08:00
epenet
b3ffc1e183 Adjust async_step_zeroconf signature for strict typing ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-15 18:05:45 +01:00
J. Nick Koston
10d6247fee Bump to aiohttp 3.8.0 () 2021-11-04 10:07:50 -05:00
epenet
2ae86124c7 Add zeroconf ATTR constants ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-31 16:13:26 +01:00
Paulus Schoutsen
32212651fe Add zeroconf discovery to Hue ()
* Add zeroconf discovery to Hue

* Add coverage for already exists case

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-12 20:00:51 -07:00
J. Nick Koston
34c84a6bbb Reduce boilerplate to abort for matching config entries ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-11 22:00:12 +02:00
Franck Nijhof
10d6dfd4ae Clean up connection classes in integrations H-L () 2021-04-30 21:02:53 -10:00
Ruslan Sayfutdinov
183220008d Rename FlowResultDict to FlowResult () 2021-04-29 13:40:51 +02:00
Milan Meulemans
48695869f9 Change dict[str, Any] to FlowResultDict () 2021-04-22 17:23:15 -10:00
Marc Mueller
2956eb0902 Update pylint to 2.7.3 ()
* 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
5cdd945f44 Update typing 08 () 2021-03-18 09:25:40 +01:00
Franck Nijhof
10535018cc Improve HomeKit discovered Hue config flow () 2021-03-10 11:20:51 -08:00
Paulus Schoutsen
3ad4c26f98 Allow SSDP discovery modern Hue hubs () 2021-03-10 19:21:51 +01:00
J. Nick Koston
6af67c9558 Ensure hue options show the defaults when the config options have not yet been saved () 2021-02-25 21:58:35 -08:00
Paulus Schoutsen
45345ddc05 Improve handling of ignored entries () 2020-10-21 10:49:09 +02:00
J. Nick Koston
74c23c3e96 Add support for reload_on_update to _abort_if_unique_id_configured ()
* Add support for reload_on_update to _abort_if_unique_id_configured

async_update_entry now avoids firing update listeners and writing
the storage if there are no actual changes.

* Actually add the tests

* collapse branch

* Update homeassistant/config_entries.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

* handle entries that lack the ability to reload

* reduce

* adjust konnected tests

* update axis tests

* fix blocking

* more mocking

* config flow tests outside of test_config_flow

* reduce

* volumio

* Update homeassistant/config_entries.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* set reload_on_update=False for integrations that implement self._abort_if_unique_id_configured(updates= and a reload listen

* get rid of copy

* revert test change

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-08-08 13:23:56 -05:00
Paulus Schoutsen
67b18aef5b Fix Hue homekit discovery ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-07-10 09:37:36 -07:00
Franck Nijhof
235298a1b2 Add Hue manual bridge config flow + options flow ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-07-02 14:12:24 +02:00
Ville Skyttä
9b2544c923 Remove some unneeded pylint suppressions () 2020-02-24 16:47:15 -08:00
Paulus Schoutsen
81b159f424 Disable Hue groups for new setups () 2020-02-11 08:50:07 -08:00
Franck Nijhof
4571cf01e2 Update Hue existing config entry with discovery data ()
* Update Hue existing config entry with discovery data

* Updated method documentation comments

* Update implementation to match latest dev

* Use named argument for clarity
2020-01-24 09:07:53 -08:00
Ville Skyttä
5216477353 Be consistent with Home Assistant and Hass.io spelling ()
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Ian Duffy
5580ee3fa1 Don't allow badly formed upnp devices to kill auto discovery ()
Prevent the following from occurring:

```
2019-12-31 22:38:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 85, in async_init
    return await self._async_handle_step(flow, flow.init_step, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 145, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/deconz/config_flow.py", line 182, in async_step_ssdp
    if discovery_info[ssdp.ATTR_UPNP_MANUFACTURER_URL] != DECONZ_MANUFACTURERURL:
KeyError: 'manufacturerURL'
2019-12-31 22:38:41 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 85, in async_init
    return await self._async_handle_step(flow, flow.init_step, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 145, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/deconz/config_flow.py", line 182, in async_step_ssdp
    if discovery_info[ssdp.ATTR_UPNP_MANUFACTURER_URL] != DECONZ_MANUFACTURERURL:
KeyError: 'manufacturerURL'
```
2020-01-03 12:08:40 +01:00
Ville Skyttä
d236a19139 Include all SSDP data in discovery info ()
* Include all SSDP data in discovery info

* Use UPnP device description as discovery info, inject some SSDP attrs

* Clean up attribute names

* Adapt existing SSDP flows to changed attribute names

* Prefix all SSDP UPnP attribute name constants with ATTR_UPNP, tweak a bit
2019-12-19 19:28:03 +02:00
Paulus Schoutsen
9c7caaa142 Add option to ignore flows () 2019-12-18 07:41:01 +01:00
Paulus Schoutsen
58b5833d64 Convert Hue to use unique ID ()
* Convert Hue to use unique ID

* Fix normalization

* Store/restore unique ID

* Fix tests
2019-12-16 19:45:09 +01:00
Paulus Schoutsen
d851cb6f9e Add unique ID to config entries ()
* Add unique ID to config entries

* Unload existing entries with same unique ID if flow with unique ID is
finished

* Remove unused exception

* Fix typing

* silence pylint

* Fix tests

* Add unique ID to Hue

* Address typing comment

* Tweaks to comments

* lint
2019-12-16 12:27:43 +01:00
Paulus Schoutsen
27244e29c4 Install discovery requirements if used ()
* Install discovery requirements if used

* Update loader.py

* Fix types
2019-12-10 09:24:49 +01:00