Commit Graph

19779 Commits (d7960859239440efefa021bbf40b107761b3693a)

Author SHA1 Message Date
Jan-Philipp Benecke d796085923
Bump pydiscovergy to 3.0.0 (#111305) 2024-02-24 22:07:46 +01:00
G Johansson c45cae3665
Remove obsolete entities from System Monitor automatically (#111231)
* Remove obsolete entities from System Monitor automatically

* callback
2024-02-24 20:50:53 +01:00
Minims 597118d584
Add ECO temp to Generic Thermostat (#110471)
feat: add ECO temp to Generic Thermostat.
2024-02-24 20:17:22 +01:00
G Johansson 777428c36d
Add diagnostics to System Monitor (#111291)
* Add diagnostics to System Monitor

* Fix
2024-02-24 20:11:11 +01:00
Álvaro Fernández Rojas 57d169582d
Add diagnostics support for AEMET (#111218)
aemet: add diagnostics support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-24 20:08:50 +01:00
Álvaro Fernández Rojas 766596abdc
Add Airzone Cloud Air Quality zone binary sensors (#106573)
* airzone_cloud: add Air Quality binary sensor

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: binary_sensor: rename Air Quality

Add "active" to indicate status.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-24 08:41:12 -05:00
Álvaro Fernández Rojas d3d6870c04
Add Airzone Cloud Air Quality zone sensors (#106571)
* airzone-cloud: add Air Quality sensors

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: airzone_cloud: add missing AQI test

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-24 08:39:53 -05:00
Joakim Sørensen 79572c0a5d
Subscribe to Traccar Server events (#111262)
* Subscribe to Traccar Server events

* No need to unsubscribe on error

* typo

* rename _attrs

* arg type

* reorder return type

* more spesific

* Update stale docstring
2024-02-24 12:35:32 +01:00
J. Nick Koston 5b8591ec7e
Avoid reschedule churn in Storage.async_delay_save (#111091)
* Avoid circular import in Storage.async_delay_save

We call Storage.async_delay_save for every entity being added or removed
from the registry. The late import took more time than everything else
in the function.

* Avoid reschedule churn in Storage.async_delay_save

When we are adding or removing entities we will call async_delay_save
quite often which has to add and remove a TimerHandle on the event loop
which can add up when there are a lot of registry items changing.

If the timer handle still has 80% of the time remaining on it
we will avoid resceduling and let it fire at the time the
original async_delay_save call was made. This ensures we
do not force the event loop to rebuild its heapq because
too many timer handlers were cancelled at once

* div0

* add coverage for 0 since we had none

* fix bad conflict

* tweaks

* tweaks

* tweaks

* tweaks

* tweaks

* tweaks

* more test fixes

* mqtt tests rely on event loop overhead
2024-02-24 08:46:00 +01:00
J. Nick Koston ff0e0b3e77
Convert debouncer async_shutdown to be a normal function (#111257)
* Convert debouncer async_shutdown to be a normal function

nothing was being awaited here and the shutdown call was only used
in integrations marked internal and other internals. Its possible
that a custom component might have been using the method but it
seemed uncommon enough that it did not warrent marking as a breaking
change. The update coordinator is no longer awaiting anything in
async_shutdown either now but it seemed likely that this use
would get subclassed.

* fix
2024-02-24 08:37:33 +01:00
J. Nick Koston d9addc45f9
Avoid scheduling a task to add each entity when not using update_before_add (#110951)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-23 10:49:26 -10:00
J. Nick Koston 3aecec5082
Avoid rechecking for missing platforms in the loader (#111204) 2024-02-23 10:48:47 -10:00
G Johansson 9e46c2e2b3
Isolate systemmonitor from psutil shared state (#111110)
* Isolate systemmonitor from psutil shared state

* Mods

* typing

* Fix tests

* Fix read temp issue

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-23 20:53:48 +01:00
J. Nick Koston b6b5b1f788
Fix race in ESPHome entity test (#111179)
This test relied on the event loop overhead. Change it
to listen for the state to change instead
2024-02-23 13:34:46 -05:00
David F. Mulcahey d485e8967b
Add device counter entities to ZHA (#111175)
* Add counter entities to the ZHA coordinator device

* rework to prepare for non coordinator device counters

* counter entity test

* update log lines

* disable by default
2024-02-23 13:22:47 -05:00
J. Nick Koston 59066c1770
Migrate zha to use Debouncer.async_schedule_call (#111103) 2024-02-23 07:28:23 -10:00
J. Nick Koston 68d1fbaadc
Fix race in openalpr_cloud tests (#111185)
The test would end before setup was finished and the setup
would get cancelled
2024-02-23 09:28:20 +01:00
J. Nick Koston 98a8714705
Improve error reporting in tplink config flow (#111166)
* Improve error reporting in tplink config flow

* coverage, fixes
2024-02-23 02:38:46 +01:00
Christopher Bailey ae60f59bed
Add metadata for UniFi Protect Media Source (#109389) 2024-02-22 14:44:16 -10:00
ollo69 f0f3773858
Add base class AndroidTVEntity to AndroidTV (#105945) 2024-02-22 12:38:38 -10:00
J. Nick Koston 2ef71289b9
Avoid creating tasks for dependencies already being setup (#111034)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-22 12:34:46 -10:00
J. Nick Koston 32cd3ad862
Fix lingering timer in enphase_envoy test (#111165) 2024-02-22 12:33:44 -10:00
Maciej Bieniek bccd9bd21f
Bump `brother` library to version 4.0.0 (#111157)
* Bump library

* Update code to the new library version

* Improve diagnostics

* Fix tests

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-02-22 23:27:24 +02:00
Joakim Sørensen 8f83426895
Revert "Move backup/* WS commands to the backup integration" (#111136)
Revert "Move backup/* WS commands to the backup integration (#110651)"

This reverts commit ec4e6c3a74.
2024-02-22 16:08:30 +01:00
Malte Franken 5f9d46205c
Bump georss-qld-bushfire-alert-client to 0.7 (#111075)
* bump georss-qld-bushfire-alert-client to 0.7

* fix tests
2024-02-22 12:58:54 +01:00
Álvaro Fernández Rojas b72d64a3dc
Disable AEMET legacy options (#107795)
* aemet: disable legacy options

This enables proper timezone handling:
- Atlantic/Canary for the Canary Islands.
- Europe/Madrid for the Iberian Peninsula.

Also provides daily data for the current day after AEMET stops providing the
full day interval, which is normally after midday (12:00).
This is a breaking change because with the previous behaviour the daily data
for the current day wasn't available after midday and now it will be.
What the integration library does to workaround this is to fallback to the
12-24 interval data if the the 00-24 is no longer provided by the API.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Fix AEMET tests with v0.4.8

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-22 12:52:57 +01:00
Thomas55555 85be94e0a9
Add switch platform for husqvarna_automower (#110139)
* Add switch platform for husqvarna_automower

* Use RestrictedReasons const

* Typing

* Add snapshot testing

* Invert switch

* Test sucessfull servie calls

* Assert client mock calls

* Use getattr

* Update snapshot

* Add available property

* Add a new base class for control entities

* Make switch unavailabe if mower in error state

* Sort platforms

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-22 12:34:24 +01:00
Åke Strandberg c167001861
Add myuplink switch platform (#110810)
* Add switch platform

* Add mypulink switch platform

* Update tests according to review

* Address more review comments

* Adjust types

* More typing

* Fix typo

* Use constants in tests

* Revert constants

* Catch aiohttp.ClientError when API call fails

* Add test case for failed async_set_device_points call

* Test api failures for both toggle directions

* Use parametrize for testing switching
2024-02-22 11:27:46 +01:00
Joost Lekkerkerker 92c8c4b1ae
Ignore cloudhook already removed in mobile app (#111122) 2024-02-22 11:19:27 +01:00
Brett Adams 767fcd707f
Add wake up timeout to Teslemetry (#109037) 2024-02-22 10:50:44 +01:00
Michael 9348f99ce8
Bump roombapy to 1.6.12 (#110762)
* bump roombapy to 1.6.11

* Apply suggestions from code review

* "fix" tests (make them pydantic fiendly?)

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-02-22 10:39:53 +01:00
Joakim Sørensen ec4e6c3a74
Move backup/* WS commands to the backup integration (#110651)
* Move backup/* WS commands to the backup integration

* Call correct command

* Use debug for logging

* Remove assertion of hass.data for setup test

* parametrize token fixture
2024-02-22 10:25:38 +01:00
Thomas55555 6e91776d65
Add sensor platform for husqvarna_automower (#110410)
* Add sensor platform for husqvarna_automower

* Adress review comments

* Try to fix test

* Improve sensors

* Address review

* Adapt some values

* Add test

* Add test for cutting blade usage time

* Import TEST_MOWER_ID

* Use a parenthesis around the lambda and indent it so it's easier to distinguish the entity description parameters from the lambda
2024-02-22 09:26:38 +01:00
J. Nick Koston 5267e4f5db
Fix race in otbr config flow (#111044)
* fix otbr

* Update homeassistant/components/otbr/config_flow.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* unique ids should not change

* handle missing unique id

* handle missing unique id

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-02-21 22:02:44 -05:00
Paul Bottein 0eef449526
Add icon translations to Tessie (#111096) 2024-02-21 19:49:04 +01:00
J. Nick Koston d6fac87876
Avoid compressing application (tarfile) downloads from supervisor (#110224) 2024-02-21 12:45:47 -06:00
J. Nick Koston 4bddf32cc4
Avoid the final write of every registry at the end of each test (#111053) 2024-02-21 06:01:19 -06:00
Åke Strandberg 2614d6fece
Add tests to myuplink binary_sensor (#110995) 2024-02-21 12:32:25 +01:00
Jan Rothkegel 05b23c2e7b
Replace Wolflink dependency with wolf_comm to support authentication via OpenID (#110249)
* Add OpenID authentication to wolflink integration

* Update wolf-comm to 0.0.2

* Upgrade wolf_comm to 0.0.3 + fix tests

* Version 0.0.4 of wolf_comm including LICENSE.txt

* Update requirements to wolf_comm 0.0.4

---------

Co-authored-by: Jan Rothkegel <jan.rothkegel@web.de>
2024-02-21 09:37:13 +01:00
J. Nick Koston 776a9b8691
Make device registry cleanup a callback function (#111052)
* Add async_schedule_call to the Debouncer

async_schedule_call allows the Debouncer to schedule a call
from a callback without having to create tasks to run
async_call

* Update homeassistant/helpers/debounce.py

* Make device registry cleanup all callback function

* fix typing, code supported callback functions, but typing did not

* fixes

* fixes

* fix

* we had no coverage for other job types

* we had no coverage for other job types
2024-02-21 09:34:49 +01:00
Jan Bouwhuis c048b840fc
Do not directly call async_setup_entry in MQTT tests (#111010) 2024-02-21 07:47:30 +01:00
J. Nick Koston 490c03d248
Add async_schedule_call to the Debouncer (#111051) 2024-02-21 00:09:45 -06:00
Christopher Bailey 7eb6614818
Guide users to migrate from Ubiquiti Cloud Accounts to local for UniFi Protect (#111018)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-20 23:32:47 -06:00
Christopher Bailey fb04df5392
Improve UniFi Protect re-auth (#110021)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-20 23:31:42 -06:00
J. Nick Koston da9d71cb6b
Fix race in automation test_extraction_functions (#111056) 2024-02-20 23:25:19 -06:00
Josef Zweck db77e73a76
Add calendar platform to La Marzocco (#108237)
* add calendar

* rename function

* remove device from test

* requested changes

* extend range

* fix async_get_events

* catch and test edge cases

* remove commented code

* rebase snapshot
2024-02-20 19:15:47 -08:00
Shay Levy c690a9df83
Fix Shelly RPC RSSI sensor removal (#111035) 2024-02-20 21:05:59 -06: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 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