Commit Graph

21119 Commits (65e6e1fa28b46fce5842b575ef7b1c9ef9d794bb)

Author SHA1 Message Date
Michael Hansen 7923471b94
Intent target matching and media player enhancements (#115445)
* Working

* Tests are passing

* Fix climate

* Requested changes from review
2024-05-07 22:01:03 -04:00
J. Nick Koston 8401b05d40
Move thread safety check in category_registry sooner (#117050) 2024-05-07 19:55:43 -05:00
J. Nick Koston 0b2c29fdb9
Move thread safety in floor_registry sooner (#117044) 2024-05-07 18:48:38 -05:00
Joost Lekkerkerker 27d45f04c4
Fix capitalization in Monzo strings (#117035)
* Fix capitalization in Monzo strings

* Fix capitalization in Monzo strings

* Fix capitalization in Monzo strings
2024-05-07 22:33:10 +02:00
J. Nick Koston fc3c384e0a
Move thread safety in label_registry sooner (#117026) 2024-05-07 15:15:30 -05:00
Maciej Bieniek 35d44ec90a
Store Airly runtime data in config entry (#117031)
* Store runtime data in config entry

* Fix tests

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-07 22:04:37 +02:00
J. Nick Koston 649dd55da9
Simplify MQTT subscribe debouncer execution (#117006) 2024-05-07 14:41:31 -05:00
Álvaro Fernández Rojas 3774d8ed54
Add climate temp ranges support for Airzone Cloud (#115025)
airzone_cloud: climate: add temperature ranges support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-05-07 21:29:45 +02:00
Thomas Kistler 14fcf7be8e
Add flow and rain sensor support to Hydrawise (#116303)
* Add flow and rain sensor support to Hydrawise

* Address comments

* Cleanup

* Review comments

* Address review comments

* Added tests

* Add icon translations

* Add snapshot tests

* Clean up binary sensor

* Mypy cleanup

* Another mypy error

* Reviewer feedback

* Clear next_cycle sensor when the value is unknown

* Reviewer feedback

* Reviewer feedback

* Remove assert

* Restructure switches, sensors, and binary sensors

* Reviewer feedback

* Reviewer feedback
2024-05-07 21:26:10 +02:00
Jan Bouwhuis a3248ccff9
Log an exception mqtt client call back throws (#117028)
* Log an exception mqtt client call back throws

* Supress exceptions and add test
2024-05-07 21:19:46 +02:00
J. Nick Koston 26cc1cd3db
Use singleton helper for registries (#117027) 2024-05-07 21:04:01 +02:00
Jake Martin 6e024d54f1
Add Monzo integration (#101731)
* Initial monzo implementation

* Tests and fixes

* Extracted api to pypi package

* Add app confirmation step

* Corrected data path for accounts

* Removed useless check

* Improved tests

* Exclude partially tested files from coverage check

* Use has_entity_name naming

* Bumped monzopy to 1.0.10

* Remove commented out code

* Remove reauth from initial PR

* Remove useless code

* Correct comment

* Remove reauth tests

* Remove device triggers from intial PR

* Set attr outside constructor

* Remove f-strings where no longer needed in entity.py

* Rename field to make clearer it's a Callable

* Correct native_unit_of_measurement

* Remove pot transfer service from intial PR

* Remove reauth string

* Remove empty fields in manifest.json

* Freeze SensorEntityDescription and remove Mixin

Also use list comprehensions for producing sensor lists

* Use consts in application_credentials.py

* Revert "Remove useless code"

Apparently this wasn't useless

This reverts commit c6b7109e47202f866c766ea4c16ce3eb0588795b.

* Ruff and pylint style fixes

* Bumped monzopy to 1.1.0

Adds support for joint/business/etc account pots

* Update test snapshot

* Rename AsyncConfigEntryAuth

* Use dataclasses instead of dictionaries

* Move OAuth constants to application_credentials.py

* Remove remaining constants and dependencies for services from this PR

* Remove empty manifest entry

* Fix comment

* Set device entry_type to service

* ACC_SENSORS -> ACCOUNT_SENSORS

* Make value_fn of sensors return StateType

* Rename OAuthMonzoAPI again

* Fix tests

* Patch API instead of integration for unavailable test

* Move pot constant to sensor.py

* Improve type safety in async_get_monzo_api_data()

* Update async_oauth_create_entry() docstring

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-07 20:38:58 +02:00
Erwin Douna 968af28c54
Add Tado reconfigure step (#115970)
Co-authored-by: Matthias Alphart <farmio@alphart.net>
2024-05-07 19:50:07 +02:00
Jan Bouwhuis 7148c849d6
Only log loop client subscription log if log level is DEBUG (#117008)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-07 18:38:59 +02:00
Marc Mueller fd5885ec83
Use HassKey for registries (#117000) 2024-05-07 18:03:14 +02:00
G-Two 5ad52f122d
Return raw API data for subaru device diagnostics (#114119) 2024-05-07 17:32:17 +02:00
Joost Lekkerkerker 1559562c26
Clean up Ondilo config flow (#116931) 2024-05-07 14:15:56 +02:00
Maciej Bieniek 16d86e5d4c
Store Philips TV runtime data in config entry (#116952)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-07 14:10:44 +02:00
Sid 2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Thomas55555 9e5bb92851
Fix flakey test in Husqvarna Automower (#116981) 2024-05-07 12:08:52 +02:00
pemontto 1c414966fe
Add support for round-robin DNS (#115218)
* Add support for RR DNS

* 🧪 Update tests for DNS IP round-robin

* 🤖 Configure DNS IP round-robin automatically

* 🐛 Sort IPv6 addresses correctly

* Limit returned IPs and cleanup test class

* 🔟 Change max DNS results to 10

* Rename IPs to ip_addresses
2024-05-07 11:49:13 +02:00
Marc Mueller 3d700e2b71
Add HassDict implementation (#103844) 2024-05-07 10:53:13 +02:00
Pete Sage 731fe17224
Fix Sonos select_source timeout error (#115640) 2024-05-07 10:08:12 +02:00
ollo69 5db8082f91
Review AndroidTV decorator exception management (#114133) 2024-05-06 18:00:12 -05:00
Thomas55555 8e66e5bb11
Bump aioautomower to 2024.5.0 (#116942) 2024-05-06 17:59:34 -05:00
Abílio Costa 486b8ca7c4
Make Idasen Desk react to bluetooth changes (#115939) 2024-05-06 17:52:54 -05:00
Jan Bouwhuis 821c7d813d
Correct formatting mqtt MQTT_DISCOVERY_DONE and MQTT_DISCOVERY_UPDATED message (#116947) 2024-05-06 22:32:46 +02:00
G Johansson b3008b074e
Remove ambiclimate integration (#116410) 2024-05-06 22:15:04 +02:00
Joakim Plate 2b6dd59cfc
Allow reconfiguration of integration sensor (#116740)
* Allow reconfiguration of integration sensor

* Adjust allowed options to not change unit
2024-05-06 21:03:46 +02:00
Joost Lekkerkerker ffa8265365
Snapshot Ondilo Ico devices (#116932)
Co-authored-by: JeromeHXP <dartdoka@mainguet.fr>
2024-05-06 20:34:29 +02:00
Sid b456d97e65
Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
Maciej Bieniek 09be56964d
AccuWeather tests refactoring (#116923)
* Add mock_accuweather_client

* Improve tests

* Fix exceptions

* Remove unneeded update_listener()

* Fix arguments for fixtures

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-06 19:41:48 +02:00
Franck Nijhof 72d6b4d1c9
Use ConfigEntry runtime_data in TwenteMilieu (#116642) 2024-05-06 19:21:34 +02:00
Marc Mueller f5c54bcc0d
Use runtime_data for wled (#116615) 2024-05-06 19:19:47 +02:00
Joost Lekkerkerker f92fb0f492
Remove deprecated WAQI state attributes (#116595) 2024-05-06 19:12:45 +02:00
Marc Mueller 8c053a351c
Use runtime_data for elgato (#116614) 2024-05-06 19:12:01 +02:00
Marc Mueller 52b8c189d7
Fix wiz test warning (#116693) 2024-05-06 19:10:06 +02:00
Joost Lekkerkerker 485f3b0f0a
Set pH device class in Ondilo Ico (#116930) 2024-05-06 19:09:02 +02:00
Erik Montnemery 1cea22b8ba
Fix search/replace mistake in recorder tests (#116933) 2024-05-06 09:03:21 -05:00
Erik Montnemery 2e945aed54
Convert recorder auto_repairs tests to use async API (#116927) 2024-05-06 08:25:48 -05:00
Erik Montnemery 5150557372
Convert recorder util tests to use async API (#116926) 2024-05-06 08:25:41 -05:00
Erik Montnemery 9807b2ec11
Convert recorder statistics tests to use async API (#116925) 2024-05-06 08:10:58 -05:00
Erik Montnemery d01d161fe2
Convert recorder history tests to use async API (#116909) 2024-05-06 08:10:45 -05:00
Joost Lekkerkerker 9517800da6
Add snapshot tests to Ondilo Ico (#116929) 2024-05-06 15:08:15 +02:00
Maciej Bieniek 74df693079
Add new sensors to IMGW-PIB integration (#116631)
Add flood warning/alarm level sensors

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-06 15:03:25 +02:00
Mr. Bubbles d81fad1ef1
Reduce API calls to fetch Habitica tasks (#116897) 2024-05-06 08:02:54 -05:00
Erik Montnemery f5fe80bc90
Convert recorder init tests to use async API (#116918) 2024-05-06 07:59:39 -05:00
JeromeHXP c9930d912e
Handle errors retrieving Ondilo data and bump ondilo to 0.5.0 (#115926)
* Bump ondilo to 0.5.0 and handle errors retrieving data

* Bump ondilo to 0.5.0 and handle errors retrieving data

* Updated ruff recommendation

* Refactor

* Refactor

* Added exception log and updated call to update data

* Updated test cases to test through state machine

* Updated test cases

* Updated test cases after comments

* REnamed file

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
2024-05-06 14:41:28 +02:00
tronikos 5c4afe55fd
Avoid exceptions when Gemini responses are blocked (#116847)
* Bump google-generativeai to v0.5.2

* Avoid exceptions when Gemini responses are blocked

* pytest --snapshot-update

* set error response

* add test

* ruff
2024-05-06 18:22:22 +10:00
J. Nick Koston 5d5f311898
Move thread safety check in issue_registry sooner (#116899) 2024-05-05 20:32:55 -05:00
elmurato 2e52a7c4c0
Abort Minecraft Server config flow if device is already configured (#116852)
* Abort config flow if device is already configured

* Fix review findings

* Rename newly added test case
2024-05-06 00:21:50 +02:00
J. Nick Koston 673bbc1372
Switch out aiohttp-isal for aiohttp-fast-zlib to make isal optional (#116814)
* Switch out aiohttp-isal for aiohttp-fast-zlib to make isal optional

aiohttp-isal does not work on core installs where the system has 32bit userland and a 64bit kernel because we have no way to detect this configuration or handle it.

fixes #116681

* Update homeassistant/components/isal/manifest.json

* Update homeassistant/components/isal/manifest.json

* hassfest

* isal

* fixes

* Apply suggestions from code review

* make sure isal is updated before http

* fix tests

* late import
2024-05-05 17:06:12 -04:00
J. Nick Koston a57f4b8f42
Index auth token ids to avoid linear search (#116583)
* Index auth token ids to avoid linear search

* async_remove_refresh_token

* coverage
2024-05-05 16:47:26 -04:00
J. Nick Koston 2964471e19
Keep august offline key up to date when it changes (#116857)
We only did discovery for the key at setup time. If it
changed, a reloaded of the integration was needed to
update the key. We now update it every time we update
the lock detail.
2024-05-05 16:33:55 -04:00
J. Nick Koston 91fa8b50cc
Turn on thread safety checks in async_dispatcher_send (#116867)
* Turn on thread safety checks in async_dispatcher_send

We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash

* Turn on thread safety checks in async_dispatcher_send

We keep seeing issues where async_dispatcher_send is called from
a thread which means we call the callback function on the other
side in the thread as well which usually leads to a crash

* adjust
2024-05-05 16:29:43 -04:00
J. Nick Koston b41b1bb998
Refactor entity_platform polling to avoid double time fetch (#116877)
* Refactor entity_platform polling to avoid double time fetch

Replace async_track_time_interval with loop.call_later
to avoid the useless time fetch every time the listener
fired since we always throw it away

* fix test
2024-05-05 16:28:01 -04:00
J. Nick Koston 6339c63176
Improve recorder and worker thread matching in RecorderPool (#116886)
* Improve recorder and worker thread matching in RecorderPool

Previously we would look at the name of the threads. This
was a brittle if because other integrations may name their
thread Recorder or DbWorker. Instead we now use explict thread
ids which ensures there will never be a conflict

* fix

* fixes

* fixes
2024-05-05 16:25:10 -04:00
Michael 203d110787
Remove timeout option and set timeout static to 30 seconds in Synology DSM (#116815)
* remove timeout option, set timeout static to 30 seconds

* be slightly faster :)
2024-05-05 18:51:35 +02:00
Mr. Bubbles b53081dc51
Add update coordinator for Habitica integration (#116427)
* Add DataUpdateCoordinator and exception handling for service

* remove unnecessary lines

* revert changes to service

* remove type check

* store coordinator in config_entry

* add exception translations

* update HabiticaData

* Update homeassistant/components/habitica/__init__.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/habitica/sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* remove auth exception

* fixes

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-05 17:02:28 +02:00
Maciej Bieniek 3498cb3ced
Increase test coverage for Total Connect (#116851)
Increase test coverage

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-05 15:37:24 +02:00
Joost Lekkerkerker 486bb6d89f
Use parametrize in drop connect sensor tests (#107078)
* Use parametrize in drop connect sensor tests

* Use parametrize in drop connect sensor tests

* Make common helper

* Assert the whole entity state

* fix

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
2024-05-05 14:10:34 +02:00
Joost Lekkerkerker 7d5aa03bf0
Move Totalconnect coordinator to separate module (#116368)
* Move Totalconnect coordinator to separate module

* Move Totalconnect coordinator to separate module

* Move Totalconnect coordinator to separate module
2024-05-05 13:05:36 +02:00
J. Nick Koston 0380116ef6
Improve logging of _TrackPointUTCTime objects (#116711) 2024-05-04 17:35:44 -05:00
Michael 90a3c2e357
Store runtime data inside the config entry in NUT (#116771)
* store runtime data inside the config entry

* remove unsued constants

* add test for InvalidDeviceAutomationConfig exception

* assert entry

* add more specific type hint
2024-05-04 23:08:01 +02:00
Michael 4a25e67234
Store runtime data inside the config entry in Pi-Hole (#116806) 2024-05-04 22:52:13 +02:00
Michael 55ffc82be1
Store runtime data inside the config entry in Speedtest.net (#116802) 2024-05-04 22:32:53 +02:00
mkmer 2132b170f2
Update unique_id to string in Honeywell (#116726)
* Update unique_id to string

* Update homeassistant/components/honeywell/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/honeywell/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/honeywell/climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Add typing for devices

* Add tests

* Use methods to verify unique_id

* Update tests/components/honeywell/test_climate.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-04 14:18:50 +02:00
Michael e5543e3b95
Store runtime data inside the config entry in DWD (#116764) 2024-05-04 12:36:28 +02:00
Sid a5df229715
Bump ruff to 0.4.3 (#116749) 2024-05-04 11:56:40 +02:00
Robert Svensson 81a269f4f5
Use runtime_data in Axis integration (#116729)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-05-03 21:52:37 +02:00
Jan-Philipp Benecke ce8cea86a2
Use ConfigEntry runtime_data in Discovergy (#116671) 2024-05-03 21:29:35 +02:00
Erik Montnemery e9b9d2d545
Convert recorder entity registry tests to use async API (#116448)
* Convert recorder entity registry tests to use async API

* Address review comment

* Make sure recorder is patch is set up before hass fixture
2024-05-03 14:10:58 +02:00
Erik Montnemery f309064a7f
Convert sensor recorder tests to use async API (#116373)
* Convert sensor recorder tests to use async API

* Fix accidentally renamed test

* Avoid unnecessary calls to async_wait_recording_done

* Avoid auto-commits for every state change

* Make sure recorder patches are set up before hass fixture
2024-05-03 14:07:38 +02:00
Guido Schmitz cb26e3c633
Use ConfigEntry runtime_data in devolo Home Control (#116672) 2024-05-03 13:55:04 +02:00
Guido Schmitz 79d50a0685
Add test for HA stop to devolo Home Control (#116682)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-05-03 13:36:15 +02:00
Marc Mueller 28ab45d5d8
Fix snapcast test warning (#116687) 2024-05-03 13:29:05 +02:00
Marc Mueller 15b24dfbc2
Fix fyta test warning (#116688) 2024-05-03 13:28:36 +02:00
Marc Mueller 4a2b595cc8
Fix fyta test timezone handling (#116689) 2024-05-03 13:07:12 +02:00
MatthewFlamm 6413376ccb
Fix nws forecast coordinators and remove legacy forecast handling (#115857)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-03 13:06:40 +02:00
J. Nick Koston 2b2b46c774
Bump habluetooth to 3.0.1 (#116663) 2024-05-03 12:15:51 +02:00
Jan Bouwhuis 84308c9e53
Add title feature to notify entity platform (#116426)
* Add title feature to notify entity platform

* Add overload variants

* Remove overloads, update signatures

* Improve test coverage

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Do not use const

* fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-03 11:17:28 +02:00
Erik Montnemery 27fcf72275
Convert history tests to use async API (#116447)
* Convert history tests to use async API

* Add new fixture to help patch recorder

* Modify

* Modify

* Update tests/conftest.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Rename fixture

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-03 08:14:46 +02:00
J. Nick Koston c07f02534b
Migrate bluetooth to use the singleton helper (#116629) 2024-05-02 19:35:16 -05:00
Marc-Olivier Arsenault 0e23d0439b
Add ecobee ventilator 20 min timer (#115969)
* add 20 min timer Ecobee

* modify local value with estimated time

* add ecobee test switch

* removed manual setting of data

* Add no throttle updates

* add more test cases

* move timezone calculation in update function

* update attribute based on feedback

* use timezone for time comparaison

* add location data to tests

* remove is_on function

* update python-ecobee-api lib

* remove uncessary checks

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-03 02:08:25 +02:00
Erik Montnemery b013d6ade9
Fix flaky hassio test (#116658) 2024-05-02 16:24:14 -05:00
Jan Bouwhuis 41b688645a
Refactor group state logic (#116318)
* Refactor group state logic

* Fix

* Add helper and tests for groups with entity platforms multiple ON states

* Adress comments

* Do not store object and avoid linear search

* User dataclass, cleanup multiline ternary

* Add test cases for grouped groups

* Remove dead code

* typo in comment

* Update metjod and module docstr
2024-05-02 21:55:46 +02:00
Jan Bouwhuis bedd5c1cef
Cleanup removed MQTT broker settings (#116633) 2024-05-02 20:37:21 +02:00
Maciej Bieniek 37d9ed899d
Add `binary_sensor` platform to IMGW-PIB integration (#116624)
* Add binary_sensor platform

* Add tests

* Remove state attributes

* Remove attrs from strings.json

* Use base entity class

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-02 16:16:26 +02:00
Marc Mueller ef242f2883
Use runtime_data for bond (#116611) 2024-05-02 07:38:59 -05:00
Marc Mueller 63a45035dd
Use runtime_data for ambient_station (#116608) 2024-05-02 13:42:16 +02:00
Marc Mueller 5e8c9d66fb
Use runtime_data for airvisual_pro (#116607) 2024-05-02 13:41:32 +02:00
blob810 1170ce1296
Add shutter tilt support for Shelly Wave Shutter QNSH-001P10 (#116211)
* Add shutter tilt support for Shelly Wave Shutter QNSH-001P10

* Add shelly_europe_ltd_qnsh_001p10_state.json fixture

* Update test_discovery.py

* Load shelly wave shutter 001p10 node fixture

* Update test_discovery.py

Check if entity of first node exists.

* Update test_discovery.py

Add additional comments

* Clean whitespace

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-02 11:02:35 +02:00
J. Nick Koston 041456759f
Remove duplicate mid handling in MQTT (#116531) 2024-05-01 15:18:44 -05:00
Joost Lekkerkerker e68901235b
Store runtime data in entry in Analytics Insights (#116441) 2024-05-01 22:13:38 +02:00
Maciej Bieniek ae6a497cd1
Add diagnostics platform to IMGW-PIB integration (#116551)
* Add diagnostics

* Add tests

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-01 21:06:22 +02:00
Michael c5cac8fed4
Store runtime data inside the config entry in AVM Fritz!Smarthome (#116523) 2024-05-01 20:51:39 +02:00
J. Nick Koston f73c55b434
Ensure mqtt handler is restored if its already registered in bootstrap test (#116549) 2024-05-01 20:22:18 +02:00
J. Nick Koston 573cd8e94a
Ensure mock mqtt handler is cleaned up after test_bootstrap_dependencies (#116544) 2024-05-01 19:45:47 +02:00
G Johansson 51f9e661a4
Workday only update once a day (#116419)
* Workday only update once a day

* Fix tests
2024-05-01 17:11:47 +02:00
Maciej Bieniek c46be022c8
Add IMGW-PIB integration (#116468)
* Add sensor platform

* Add tests

* Fix icons.json

* Use entry.runtime_data

* Remove validate_input function

* Change abort reason to cannot_connect

* Remove unnecessary square brackets

* Move _attr_attribution outside the constructor

* Use native_value property

* Use is with ENUMs

* Import SOURCE_USER

* Change test name

* Use freezer.tick

* Tests refactoring

* Remove test_setup_entry

* Test creating entry after error

* Add missing async_block_till_done

* Fix translation key

* Remove coordinator type annotation

* Enable strict typing

* Assert config entry unique_id

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-01 14:38:36 +02:00
Luke Lashley 835ce919f4
Fix roborock image crashes (#116487) 2024-05-01 11:56:02 +02:00
Marcel van der Veldt 8230bfcf8f
Some fixes for the Matter light discovery schema (#116108)
* Fix discovery schema for light platform

* fix switch platform discovery schema

* extend light tests

* Update switch.py

* clarify comment

* use parameter for supported_color_modes
2024-05-01 11:46:52 +02:00
wittypluck 7a10959e58
Use websocket client to test device removal in Unifi (#116309)
* Use websocket client to test device removal from registry

* Rename client to ws_client to avoid confusion with Unifi clients

* Use remove_device helper
2024-05-01 08:46:03 +02:00
J. Nick Koston 6cf1c5c1f2
Hold a lock to prevent concurrent setup of config entries (#116482) 2024-04-30 18:47:12 -05:00
Jan Bouwhuis 3c7cbf5794
Add test MQTT subscription is completed when birth message is sent (#116476) 2024-04-30 18:15:46 -05:00
Richard Kroegel 0d0865e783
Bump bimmer_connected to 0.15.2 (#116424)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-04-30 22:49:28 +02:00
puddly 963d8d6a76
Change SkyConnect integration type back to `hardware` and fix multi-PAN migration bug (#116474)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-30 22:47:17 +02:00
Robert Resch 1641df18ce
Store runtime data in entry in Ecovacs (#116445) 2024-04-30 22:44:56 +02:00
G Johansson 23a8b29bfe
Bring sensibo to full coverage (again) (#116469) 2024-04-30 21:31:52 +02:00
J. Nick Koston 9995207817
Avoid re-encoding the message id as bytes for every event/state change (#116460) 2024-04-30 12:02:28 -05:00
andarotajo 1e63665bf2
Mock dwdwfsapi in all tests that use it (#116414)
* Mock dwdwfsapi in all tests

* Add mocking for config entries

* Fix assertions in init test
2024-04-30 18:08:15 +02:00
epenet a440783208
Store runtime data in entry in renault (#116454) 2024-04-30 17:39:03 +02:00
epenet 0005f8400d
Move Renault service registration (#116459)
* Move Renault service registration

* Hassfest
2024-04-30 17:10:40 +02:00
epenet 8291769361
Store runtime data in entry in onewire (#116450)
* Store runtime data in entry in onewire

* Adjust
2024-04-30 15:55:20 +02:00
epenet ad84ff18eb
Use remove_device helper in tests (1/2) (#116240)
* Use remove_device helper in tests

* Update test_tag.py

* Update test_tag.py
2024-04-30 12:52:33 +02:00
epenet a3942e019b
Use remove_device helper in tests (2/2) (#116442)
Use remove_device helper in tests (part 2)
2024-04-30 12:50:35 +02:00
Marc Mueller dace9b32de
Store runtime data inside ConfigEntry (#115669) 2024-04-30 11:29:43 +02:00
Graham Wetzler b777947978
Bump smart_meter_texas to 0.5.5 (#116321) 2024-04-30 09:47:06 +02:00
Collin Fair 7184543f12
Fix stale prayer times from `islamic-prayer-times` (#115683) 2024-04-30 09:18:09 +02:00
G Johansson 822646749d
Remove entity category "system" check from entity registry (#116412) 2024-04-30 04:01:12 +02:00
Robert Resch 630ddd6a8c
Revert "Remove strict connection" (#116416) 2024-04-29 21:26:40 +02:00
Thomas55555 f001e8524a
Add Workarea cutting height to Husqvarna Automower (#116115)
* add work_area cutting_height

* add

* add default work_area

* ruff/mypy

* better names

* fit to api bump

* tweaks

* more tweaks

* layout

* address review

* change entity name

* tweak test

* cleanup entities

* fix for mowers with no workareas

* assure not other entities get deleted

* sort & remove one callback

* remove typing callbacks

* rename entity to entity_entry
2024-04-29 21:10:45 +02:00
rale a6fdd4e1e2
Report webOS media player state (#113774)
* support for webos media player state

* add test coverage and don't use assumed state if media player state is available

* fallback to assumed state if media state isn't available

Co-authored-by: Shay Levy <levyshay1@gmail.com>

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-04-29 21:43:46 +03:00
Michael 50d83bbdbf
Fix error handling in Shell Command integration (#116409)
* raise proper HomeAssistantError on command timeout

* raise proper HomeAssistantError on non-utf8 command output

* add error translation and test it

* Update homeassistant/components/shell_command/strings.json

* Update tests/components/shell_command/test_init.py

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-04-29 20:19:14 +02:00
Robert Resch dfc198cae0
Remove strict connection (#116396) 2024-04-29 19:33:31 +02:00
dontinelli 180e178a69
Store access token in entry for Fyta (#116260)
* save access_token and expiration date in ConfigEntry

* add MINOR_VERSION and async_migrate_entry

* shorten reading of expiration from config entry

* add additional consts and test for config entry migration

* Update homeassistant/components/fyta/coordinator.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/fyta/__init__.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* omit check for datetime data type

* Update homeassistant/components/fyta/__init__.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/fyta/coordinator.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 17:09:07 +02:00
J. Nick Koston 8bfcaf3524
Add service to log all the current asyncio Tasks to the profiler (#116389)
* Add service to log all the current asyncio Tasks to the profiler

I have been helping users look for a task leaks, and need a
way to examine tasks at run time as trying to get someone to
run Home Assistant and attach aiomonitor is too difficult in
many cases.

* cover
2024-04-29 10:03:35 -05:00
Allen Porter f1dda8ef63
Add Ollama Conversation Agent Entity (#116363)
* Add ConversationEntity to OLlama integration

* Add assist_pipeline dependencies
2024-04-29 10:15:46 -04:00
J. Nick Koston 81d2f5b791
Small cleanups to climate entity feature compat (#116361)
* Small cleanups to climate entity feature compat

Fix some duplicate property fetches, avoid generating a new
enum every time supported_features was fetched if there was
no modifier

* param

* param
2024-04-29 15:43:55 +02:00
Shay Levy d1f88ffd1e
Prevent Shelly raising in a task (#116355)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-29 08:03:57 -05:00
Martin Hjelmare 0e0ea0017e
Add matter during onboarding (#116163)
* Add matter during onboarding

* test_zeroconf_not_onboarded_running

* test_zeroconf_not_onboarded_installed

* test_zeroconf_not_onboarded_not_installed

* test_zeroconf_discovery_not_onboarded_not_supervisor

* Clean up

* Add udp address

* Test zeroconf udp info too

* test_addon_installed_failures_zeroconf

* test_addon_running_failures_zeroconf

* test_addon_not_installed_failures_zeroconf

* Clean up stale changes

* Set unique id for discovery step

* Fix tests for background flow

* Fix flow running in background

* Test already discovered zeroconf

* Mock unload entry
2024-04-29 10:59:36 +02:00
Austin Mroczek 8153ff78bf
Add Button for TotalConnect (#114530)
* add button for totalconnect

* test button for totalconnect

* change to zone.can_be_bypassed

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* remove unused logging

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix button and test

* Revert "bump total_connect_client to 2023.12.1"

This reverts commit 189b7dcd89cf3cc8309dacc92ba47927cfbbdef3.

* bump total_connect_client to 2023.12.1

* use ZoneEntity for Bypass button

* use LocationEntity for PanelButton

* fix typing

* add translation_key for panel buttons

* mock clear_bypass instead of disarm

* use paramaterize

* use snapshot

* sentence case in strings

* remove un-needed stuff

* Update homeassistant/components/totalconnect/button.py

* Apply suggestions from code review

* Fix

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 09:47:05 +02:00
Erik Montnemery 0425b7aa6d
Reduce scope of test fixtures for the pylint plugin tests (#116207) 2024-04-29 08:21:31 +02:00
J. Nick Koston 381ffe6eed
Use built-in aiohttp timeout instead of asyncio.timeout in media_player (#116364)
* Use built-in aiohttp timeout instead of asyncio.timeout in media_player

Avoids having two timeouts running to fetch images

* fix mock
2024-04-29 07:38:40 +02:00
J. Nick Koston 164403de20
Add thread safety checks to async_create_task (#116339)
* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* missed one

* Update homeassistant/core.py

* fix mocks

* one more internal

* more places where internal can be used

* more places where internal can be used

* more places where internal can be used

* internal one more place since this is high volume and was already eager_start
2024-04-28 18:29:00 -04:00
J. Nick Koston e215270c05
Remove eager_start argument from internal _async_add_hass_job function (#116310) 2024-04-28 16:30:19 -05:00
epenet 48b1678075
Add test helper to remove device (#116234)
* Add test helper to remove device

* Rename

* Fix signature
2024-04-28 18:50:15 +02:00
J. Nick Koston 9ca1d204b6
Fix shelly delaying shutdown (#116346) 2024-04-28 11:19:38 -05:00
Joost Lekkerkerker 7a4aa3c40c
Fix Netatmo indoor sensor (#116342)
* Debug netatmo indoor sensor

* Debug netatmo indoor sensor

* Fix
2024-04-28 17:34:27 +02:00
J. Nick Koston ad0aabe9a1
Fix some flapping sonos tests (#116343) 2024-04-28 09:21:32 -05:00
J. Nick Koston bf91ab6e2b
Fix sonos events delaying shutdown (#116337) 2024-04-28 08:54:34 -05:00
J. Nick Koston 3f0c0a72db
Prevent setup retry from delaying shutdown (#116328) 2024-04-28 08:13:51 -05:00
J. Nick Koston 76639252c9
Make discovery flow tasks background tasks (#116327) 2024-04-28 08:13:37 -05:00
Jan Bouwhuis 43dc5415de
Fix no will published when mqtt is down (#116319) 2024-04-27 18:42:38 -05:00
Erik Montnemery b94b93cc63
Make freezegun find event.time_tracker_utcnow (#116284) 2024-04-27 07:08:56 -05:00
J. Nick Koston 7715bee6b0
Fix script in restart mode that is fired from the same trigger (#116247) 2024-04-27 07:08:29 -05:00
J. Nick Koston b403c9f92e
Move thread safety check in area_registry sooner (#116265)
It turns out we have custom components that are writing to the area registry using the async APIs from threads. We now catch it at the point async_fire is called. Instead we should check sooner and use async_fire_internal so we catch the unsafe operation before it can corrupt the registry.
2024-04-27 09:26:35 +02:00
epenet c1572d9600
Handle invalid device type in onewire (#116153)
* Make device type optional in onewire

* Add comment
2024-04-27 09:26:26 +02:00
J. Nick Koston 244433aeca
Move thread safety check in entity_registry sooner (#116263)
* Move thread safety check in entity_registry sooner

It turns out we have a lot of custom components that are writing
to the entity registry using the async APIs from threads. We now
catch it at the point async_fire is called. Instread we should check
sooner and use async_fire_internal so we catch the unsafe operation
before it can corrupt the registry.

* coverage

* Apply suggestions from code review
2024-04-27 09:25:19 +02:00
J. Nick Koston 09ebbfa0e1
Move thread safety check in device_registry sooner (#116264)
It turns out we have custom components that are writing to the device registry using the async APIs from threads. We now catch it at the point async_fire is called. Instead we should check sooner and use async_fire_internal so we catch the unsafe operation before it can corrupt the registry.
2024-04-27 09:24:55 +02:00