Commit Graph

36 Commits (b3f7f379df235bcd7ebdd2b039932c98e2dff937)

Author SHA1 Message Date
Marc Mueller 53c85a5c9b
Fix test fixture annotations (#122180) 2024-07-19 14:46:30 +02:00
Marc Mueller 921430d497
Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
Marc Mueller 33ed4fd862
Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
Joost Lekkerkerker 906d3198e3
Use is in enum comparison in config flow tests F-J (#114670)
* Use right enum expression F-J

* Fix
2024-04-02 23:01:37 +02:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
kingy444 c2771791a3
Add Powerview Type 11 (#114047) 2024-03-22 17:09:36 -10:00
kingy444 26b6bd83fc
Move powerview timeout logic to the upstream api (#113984) 2024-03-22 13:38:33 -10:00
Marc Mueller c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick Koston 6ed221de5d
Handle empty name in powerview config flow (#110969)
fixes

```
2024-02-19 13:51:58.128 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved:   File "/Users/bdraco/home-assistant/venv/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/Users/bdraco/home-assistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/Users/bdraco/home-assistant/homeassistant/runner.py", line 188, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/opt/homebrew/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 673, in run_until_complete
    self.run_forever()
  File "/opt/homebrew/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 640, in run_forever
    self._run_once()
  File "/opt/homebrew/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 1965, in _run_once
    handle._run()
  File "/opt/homebrew/Cellar/python@3.12/3.12.1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "/Users/bdraco/home-assistant/homeassistant/helpers/entity_platform.py", line 610, in async_add_entities
    await add_func(coros, entities, timeout)
  File "/Users/bdraco/home-assistant/homeassistant/helpers/entity_platform.py", line 561, in _async_add_entities
    await coro
  File "/Users/bdraco/home-assistant/homeassistant/helpers/entity_platform.py", line 652, in _async_add_entity
    entity.add_to_platform_start(
  File "/Users/bdraco/home-assistant/homeassistant/components/device_tracker/config_entry.py", line 356, in add_to_platform_start
    _async_connected_device_registered(
  File "/Users/bdraco/home-assistant/homeassistant/components/device_tracker/config_entry.py", line 94, in _async_connected_device_registered
    async_dispatcher_send(
  File "/Users/bdraco/home-assistant/homeassistant/helpers/dispatcher.py", line 227, in async_dispatcher_send
    hass.async_run_hass_job(job, *args)
  File "/Users/bdraco/home-assistant/homeassistant/core.py", line 701, in async_run_hass_job
    hassjob.target(*args)
  File "/Users/bdraco/home-assistant/homeassistant/util/logging.py", line 133, in _callback_wrapper
    func(*args)
  File "/Users/bdraco/home-assistant/homeassistant/components/dhcp/__init__.py", line 392, in _async_process_device_data
    self.async_process_client(ip_address, hostname, mac_address)
  File "/Users/bdraco/home-assistant/homeassistant/components/dhcp/__init__.py", line 268, in async_process_client
    discovery_flow.async_create_flow(
  File "/Users/bdraco/home-assistant/homeassistant/helpers/discovery_flow.py", line 32, in async_create_flow
    hass.async_create_task(init_coro, f"discovery flow {domain} {context}")
  File "/Users/bdraco/home-assistant/homeassistant/core.py", line 634, in async_create_task
    task = self.loop.create_task(target, name=name)
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/config_entries.py", line 1017, in async_init
    flow, result = await self._async_init(flow_id, handler, context, data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/config_entries.py", line 1047, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/data_entry_flow.py", line 501, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/components/hunterdouglas_powerview/config_flow.py", line 127, in async_step_dhcp
    return await self.async_step_discovery_confirm()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/components/hunterdouglas_powerview/config_flow.py", line 152, in async_step_discovery_confirm
    assert self.discovered_ip and self.discovered_name
AssertionError
```
2024-02-20 10:41:38 +01:00
kingy444 3529eb6044
Powerview Gen 3 functionality (#110158)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-15 08:27:11 -06:00
J. Nick Koston bba19a5bab
Fix formatting of mac addresses from dhcp discovery mocking in hunterdouglas_powerview (#110577)
dhcp returns addresses in lowercase without :
2024-02-14 20:48:53 +01:00
Marc Mueller 7a89e58873
Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
J. Nick Koston 0628546a0e
Add basic tests for powerview scenes (#108818) 2024-01-24 17:50:06 -10:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 1e352b60df
Add type hints to integration tests (part 11) (#87996) 2023-02-13 14:22:49 +01:00
epenet 37a2040d7b
Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
epenet 053c4428a9
Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Joshua Roys 9134e5c844
Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
epenet 31b033ac25
Update ZeroconfServiceInfo in tests (g-m) (#60217)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 09:42:38 -06:00
epenet 560546f65e
Use dataclass for DhcpServiceInfo (#60136)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 13:35:53 +01:00
epenet d6c5aaa0cb
Use ServiceInfo in hunterdouglas_powerview (#59981)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-19 08:12:31 -06:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
HighOnMikey c1a1a38ffc
Improve legacy support for Hunter Douglas PowerView (#50918)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-23 12:47:19 -05:00
J. Nick Koston 29cd5f20b9
Add zeroconf discovery to powerview (#50308) 2021-05-09 11:41:27 +02:00
J. Nick Koston 779f34a8ed
Add dhcp discovery to hunterdouglas_powerview (#49993)
* Add dhcp discovery to hunterdouglas_powerview

* avoid dupe flow

* cleanup

* cleanup
2021-05-03 11:41:20 +02:00
Ville Skyttä 153d6e891e
Use config_entries.SOURCE_* constants (#49631) 2021-04-25 11:27:40 +02:00
Franck Nijhof 7264c95217
Clean up superfluous integration setup - part 6 (#49298) 2021-04-16 09:23:27 -07:00
J. Nick Koston d733292982
Remove YAML support from hunterdouglas_powerview (#45376) 2021-01-21 13:51:08 -05:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 1c36bf5e19
Fix block till done in create entry config flow tests (#42290) 2020-10-24 16:20:56 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston 87e0f04515
Fix exception in hunterdouglas_powerview with ignored config entry (#35482) 2020-05-10 22:06:31 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
J. Nick Koston 6c18a2cae2
Config flow for hunterdouglas_powerview (#34795)
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2020-04-29 14:24:57 -07:00