Commit Graph

73203 Commits (dbc4d904357fb167aeef077c55661b8ba6548894)

Author SHA1 Message Date
J. Nick Koston 2f2cdedddd
Avoid creating multiple tasks for config entry init (#110899) 2024-02-20 21:57:36 -05:00
J. Nick Koston 9ce1ec414e
Reduce overhead to load multiple languages in translations (#111028)
* Reduce overhead to load multiple languages in translations

Instead of loading in a task, we now group everything
to be loaded into a single executor job

* fixes

* fixes

* fixes

* fixes

* fixes

* update tests

* add missing coverage (was existing)
2024-02-20 21:52:28 -05:00
J. Nick Koston 9c145b5faa
Fix race in removing entities from the registry (#110978) 2024-02-20 20:48:31 -06:00
J. Nick Koston 94e372a345
Make ConfigEntry.async_shutdown a callback (#111027)
Nothing needed to be awaited here and this generated a task per config
entry at shutdown
2024-02-20 21:38:24 -05:00
J. Nick Koston 17ba96ffdb
Avoid creating tasks to install dependent requirements (#111048) 2024-02-20 20:30:07 -06:00
J. Nick Koston dc4008c518
Avoid creating tasks to shutdown entity platforms (#111026)
* Avoid creating tasks to shutdown entity platforms

Nothing needed to be awaited here

* fix mocking

* missed one test
2024-02-20 21:10:25 -05:00
J. Nick Koston 98d5f2fc01
Reduce registry overhead in tests (#110955)
* Avoid scheduling registry loads as tasks in tests

Since we patch out async_load in Store, these will not yield
to the event loop so it makes sense to await them instead
of creating tasks

This reduced my local test run times ~2.5% on average

* mock out save as well so we do not schedule tasks to save empty data

* tweaks

* fix lingering files

* another one

* too much for one PR, reduce

* fix targets
2024-02-20 21:01:50 -05:00
some-guy-23 a542b36997
Add state class to Motion Blinds battery sensor (#111016) 2024-02-20 23:45:37 +01:00
G Johansson 32a6662d1d
Bump holidays to 0.43 (#111039) 2024-02-20 23:37:17 +01:00
J. Nick Koston 145c6163a4
Fix race in gardena_bluetooth config flow tests (#111042) 2024-02-20 16:08:06 -06:00
Brett Adams 5b00703ef7
Add presets to Advantage Air (#109485)
* Add presets

* Make hvac_modes dynamic

* Add supported features

* Fix set preset mode

* Add coverage

* Remove unused constants

* Remove the extra newline

* Add snapshot assertion to new test

* Add comments

* Use ServiceValidationError

* Test for ServiceValidationError

* Fix typo

* Refactor to use _handle_coordinator_update

* Remove preset_mode prop

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-20 22:00:52 +01:00
J. Nick Koston 9f8e4cecdd
Remove update_before_add from legacy ios integration (#111033) 2024-02-20 21:26:24 +01:00
J. Nick Koston 8e9946afc9
Remove update_before_add from nut sensors (#111032) 2024-02-20 21:12:06 +01:00
Michael f295382c92
Reset error state when Ecovacs bot is operational again (#110962) 2024-02-20 17:15:55 +01:00
Jeremy TRUFIER 86ea5c135f
Bump pyOverkiz to 1.13.7 (#111004) 2024-02-20 15:42:29 +01:00
Marco Lettieri cd05972276
Add sensor platform to microBees (#111008)
* add microBees sensor

* add a sensor.py in .coveragerc

* fixes review

---------

Co-authored-by: FedDam <noceracity@gmail.com>
2024-02-20 15:32:19 +01:00
J. Nick Koston ad94534d37
Migrate sensibo to use async_update_reload_and_abort (#110986) 2024-02-20 14:41:14 +01:00
Mick Vleeshouwer 6471397d09
Fix reauth in Overkiz for config entries created prior to 2022.12 (#106251)
* Fix #106204

* Use api type variable
2024-02-20 14:15:16 +01:00
Federico D'Amico 93d6f0a780
Bump microBeesPy to 0.2.9 (#111006)
change library
2024-02-20 13:39:14 +01:00
Thomas55555 e6cfa7fa09
Bump aioautomower to 2024.2.7 (#110991)
bump aioautomower to 2024.2.7

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-02-20 12:04:42 +01:00
Federico D'Amico ac926f9c64
Introduce actuator base entity to microBees (#111000)
* changed library imports and added sensors to coordinator and new entity

* revert library

* revert library
2024-02-20 11:55:36 +01:00
Simon Goodall 5b470ff16f
Expose Hive Motion Sensor temperature (#105985) 2024-02-20 10:57:19 +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
Robert Svensson 2f026ca963
Unifi rename controller to hub (#110976)
* Rename controller.py to hub.py

* Rename UniFiController to UnifiHub

* Rename controller instances into hub

* Rename controller to hub in tests

* Rename aiounifi Controller references to api

* Update strings

* Rename test_controller test_hub

* Narrow scope of test_remove_sensors
2024-02-20 08:51:22 +01:00
Mr. Bubbles 2b3f5319d6
Bump bring-api to 0.3.1 (#110769)
* bump bring-api

* unpinned dependencies
2024-02-20 08:46:02 +01:00
J. Nick Koston 54d005a3b8
Migrate xiaomi_miio to use async_update_reload_and_abort (#110988) 2024-02-20 07:08:21 +01:00
J. Nick Koston 8927769545
Migrate unifi to use async_update_reload_and_abort (#110987) 2024-02-20 07:07:55 +01:00
J. Nick Koston 059e1fbe37
Migrate yalexs_ble to use async_update_reload_and_abort (#110985) 2024-02-20 07:07:21 +01:00
Keilin Bickar 70542efc23
Fix last_reset set for Sense percentage sensors (#110977) 2024-02-19 21:45:09 -06:00
Michael Hansen ec4bd9a421
Add new intents for cover, valve, vacuum, and media player (#110757)
* Add valve to HassTurnOn/Off

* Add set position for valves

* Add set position to covers

* Add HassTurnOn/Off for vacuums

* Add media player intents

* Split out vacuum intents

* Address comments

* Extra test
2024-02-19 22:28:42 -05:00
J. Nick Koston 015f9cdb35
Fix failing tessie tests (#110980) 2024-02-19 20:45:07 -06:00
Åke Strandberg 230ac417c0
Add check for myuplink startup ClientError (#110926)
* Raise ConfigEntryNotReady if appropriate

* Catchin exceptions during startup

* Change expected_state to SETUP_ERROR
2024-02-20 02:17:35 +01:00
J. Nick Koston ae49b3a274
Add async_schedule_reload helper to the ConfigEntries manager (#110912)
* Add async_schedule_reload helper to the ConfigEntries manager

We have cases where the the setup retry kicks in right before
the reload happens causing the reload to fail with
OperationNotAllowed. The async_schedule_reload will
cancel the setup retry before the async_reload task
is created to avoid this problem.

I updated a few integrations that were most likely
to have this problem. Future PRs will do a more
extensive audit

* coverage

* revert for now since this needs more refactoring in a followup

* cover

* cleanup and fixes
2024-02-20 02:14:45 +01:00
starkillerOG 9361f3c443
Bump motionblinds to 0.6.21 (#110970) 2024-02-19 23:33:02 +01:00
Brett Adams 61766c0e59
Fix set_temperature in Tessie climate platform (#110445)
* HVAC_MODE support for set_temperature

* Fix import
2024-02-19 21:52:59 +01:00
Brett Adams 980413c57f
Add new range sensors to Tessie (#110446)
* Add new sensors

* Fix tests
2024-02-19 21:50:20 +01:00
J. Nick Koston b35490404a
Make EntityRegistryDisabledHandler._handle_entry_updated a callback (#110966) 2024-02-19 14:44:57 -06:00
starkillerOG e83c7c8770
Bump reolink-aio to 0.8.8 (#110959) 2024-02-19 21:35:41 +01:00
J. Nick Koston 1f1c66b3c2
Group adding unifi entities together to reduce number of tasks (#110965) 2024-02-19 13:58:44 -06:00
starkillerOG aa9f0f5734
Reolink continue setup when internet blocked (#110888) 2024-02-19 20:53:18 +01:00
Oliver 3e5329d463
Do not turn on `denonavr` receiver when changing the source (#110964) 2024-02-19 20:33:48 +01:00
Jan Bouwhuis f4fd3633b4
Improve timing mqtt integration discovery test (#110960)
* Improve timing mqtt integration discovery test

* Remove condition
2024-02-19 20:16:06 +01:00
J. Nick Koston 1bc0263ea4
Revert powerwall back to awaiting each api call (#110947)
We converted these to run as tasks in the hope that it would be faster,
but since the cost of establishing another connection and the task
overhead exceeded the savings, it makes sense to await them all in
series.
2024-02-19 20:13:49 +01:00
Martin Hjelmare 058eec114b
Freeze light profiles for further development (#110946) 2024-02-19 16:02:27 +01:00
Marco Lettieri 3a4c6fc7f3
Add microBees integration (#99573)
* Create a new homeassistan integration for microBees

* black --fast homeassistant tests

* Switch platform

* rename folder

* rename folder

* Update owners

* aiohttp removed in favor of hass

* Update config_flow.py

* Update __init__.py

* Update const.py

* Update manifest.json

* Update string.json

* Update servicesMicrobees.py

* Update switch.py

* Update __init__.py

* Update it.json

* Create a new homeassistan integration for microBees

* black --fast homeassistant tests

* Switch platform

* rename folder

* rename folder

* Update owners

* aiohttp removed in favor of hass

* Update config_flow.py

* Update __init__.py

* Update const.py

* Update manifest.json

* Update string.json

* Update servicesMicrobees.py

* Update switch.py

* Update __init__.py

* Update it.json

* fixes review

* fixes review

* fixes review

* pyproject.toml

* Update package_constraints.txt

* fixes review

* bug fixes

* bug fixes

* delete microbees connector

* add other productID in switch

* added coordinator and enanchments

* added coordinator and enanchments

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* add test

* add test

* add test

* add test

* requested commit

* requested commit

* requested commit

* requested commit

* reverting .strict-typing and added microbees to .coveragerc

* remove log

* remove log

* remove log

* remove log

* add test for microbeesExeption and Exeption

* add test for microbeesExeption and Exeption

* add test for microbeesException and Exception

* add test for microbeesException and Exception

* add test for microbeesException and Exception

---------

Co-authored-by: FedDam <noceracity@gmail.com>
Co-authored-by: Federico D'Amico <48856240+FedDam@users.noreply.github.com>
2024-02-19 15:12:03 +01:00
J. Nick Koston b349a466ba
Fix concurrent reloads in yeelight tests (#110911) 2024-02-19 07:37:22 -06:00
Jevgeni Kiski 2250baab21
Update vallox_websocket_api to 5.0.2 (#110752)
Co-authored-by: Sebastian Lövdahl <slovdahl@hibox.fi>
2024-02-19 14:36:51 +01:00
starkillerOG efac3b0a60
Add Motionblinds vitual integrations __init__.py (#110903) 2024-02-19 12:36:56 +01:00
dependabot[bot] 0c39b465b3
Bump dawidd6/action-download-artifact from 3.1.0 to 3.1.1 (#110925) 2024-02-19 12:29:09 +01:00
Franck Nijhof e0a9dcd996
Add label registry (#110821) 2024-02-19 11:59:08 +01:00