Commit Graph

21194 Commits (bb758bcb26b32fa99b52bb742cddf0be8abc6a3e)

Author SHA1 Message Date
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
Joakim Plate ff4b8fa5e3
Don't create event entries for lighting4 rfxtrx devices (#115716)
These have no standardized command need to be reworked
in the backing library to support exposing as events.

Fixes #115545
2024-04-27 09:24:11 +02:00
Erik Montnemery a25b2168a3
Reduce scope of ZHA test fixtures (#116208) 2024-04-26 09:08:58 -05:00
Erik Montnemery aa65f21be7
Fix flapping recorder tests (#116239) 2024-04-26 09:05:23 -05:00
Erik Montnemery c9301850be
Reduce scope of bluetooth test fixtures (#116210) 2024-04-26 09:03:49 -05:00
Erik Montnemery 10be8f9683
Simplify timezone setting in recorder test (#116220) 2024-04-26 15:14:23 +02:00
Erik Montnemery 56f2f10a17
Fix flapping trafikverket tests (#116238)
* Fix flapping trafikverket tests

* Fix copy-paste mistake
2024-04-26 13:49:43 +02:00
Erik Montnemery 09a18459ff
Restore default timezone after electric_kiwi sensor tests (#116217) 2024-04-26 12:28:40 +02:00
Robert Resch 67f6a84f5d
Use None as default value for strict connection cloud store (#116219) 2024-04-26 11:22:04 +02:00
Sid e662e3b65c
Bump ruff to 0.4.2 (#116201)
* Bump ruff to 0.4.2

* review comments
2024-04-26 08:48:32 +02:00
Erik Montnemery 764b34ab62
Reduce scope of bootstrap test fixture to module (#116195) 2024-04-25 22:00:07 -05:00
Erik Montnemery db8597a742
Reduce scope of JSON/XML test fixtures (#116197) 2024-04-25 19:12:36 -05:00
Jan Bouwhuis 372c6c7874
Use existing monotonic timestamp on mqtt messages for debugging (#116196) 2024-04-25 19:09:54 -05:00
Joost Lekkerkerker 4a1e1bd1b9
Improve linear coordinator (#116167)
* Improve linear coordinator

* Fix

* Fix
2024-04-25 22:57:29 +02:00
Joost Lekkerkerker 860ac450c4
Use snapshots in Linear diagnostics tests (#116169)
* Use snapshots in Linear diagnostics tests

* Use snapshots in Linear diagnostics tests
2024-04-25 22:23:13 +02:00
Anrijs 8649489117
Add support for Aranet radiation devices (#115239)
* sensor: added radiation dose sensor type and units

* Add support for Aranet Radiation devices

* Fix Aranet Radiation CI issues

* Revert "sensor: added radiation dose sensor type and units"

This reverts commit 28736a7da7.

* aranet4: bump version to 2.3.3

* aranet radiation: remove removed sesnor consts

* aranet radiation: use radioactive icon by default

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-04-25 22:38:20 +03:00
Thomas55555 a8b41c90c5
Bump aioautomower to 2024.4.4 (#116185) 2024-04-25 14:36:00 -05:00
Erik Montnemery 9d33965bc9
Fix flaky traccar_server tests (#116191) 2024-04-25 21:20:24 +02:00
Maciej Bieniek 51bceb1c99
Fix climate entity creation when Shelly WallDisplay uses external relay as actuator (#115216)
* Fix climate entity creation when Shelly WallDisplay uses external relay as actuator

* More comments

* Wrap condition into function

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-25 21:06:52 +02:00
Luke Lashley cc79129587
Make Roborock listener update thread safe (#116184)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-25 13:26:11 -05:00
Jan Bouwhuis 855bb57d5e
Revert "Return specific group state if there is one" (#116176)
Revert "Return specific group state if there is one (#115866)"

This reverts commit 350ca48d4c.
2024-04-25 17:32:42 +02:00
Erik Montnemery 6bff0c384f
Remove deprecation warnings for relative_time (#116144)
* Remove deprecation warnings for relative_time

* Update homeassistant/helpers/template.py

Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com>

---------

Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com>
2024-04-25 13:02:18 +02:00
Erik Montnemery 2e88ba40ff
Fix lying docstring for relative_time template function (#116146)
* Fix lying docstring for relative_time template function

* Update homeassistant/helpers/template.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-25 13:01:41 +02:00
Chris Roberts 12c2ed5c4d
Add play/pause functionality for Vizio Smartcast media_player entities (#108896)
* Add play/pause functionality to vizio integration

Leverages existing pyvizio functionality. My impression is that it also
works for soundbars based on https://github.com/exiva/Vizio_SmartCast_API/issues/19.

* Set vizio assumed_state to True

The Vizio API is only capable of indicating whether the device is on
or off and not whether it's playing/paused/idle. Setting assumed_state
to True gives us separate Play and Pause buttons versus the (useless)
merged Play/Pause button we would get otherwise.
2024-04-25 08:25:10 +02:00
Robert Svensson f8c38fad00
Split out event handling from Axis hub (#113837)
* Split out event handling from Axis hub

* Improve test coverage

* Mark internal methods with '_'

* Rename to event source
2024-04-24 20:47:22 +02:00
Steve Easley d565c1a84b
Add select platform to jvc_projector component (#111638)
* Initial commit of jvc_projector select platform

* Move icon to icons.json

* Apply suggestions from code review

* Update tests/components/jvc_projector/test_select.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-24 17:36:50 +02:00
Joakim Sørensen f83ee963bf
Add binary sensor entities to Traccar Server (#114719) 2024-04-24 17:08:56 +02:00
puddly 380f192c93
Expose the SkyConnect integration with a firmware config/options flow (#115363)
Co-authored-by: Stefan Agner <stefan@agner.ch>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2024-04-24 17:06:24 +02:00
Phil Bruckner 169b9b0bfe
Fix removing suggested_display_precision from entity registry (#110671)
* Fix removing suggested_display_precision from entity registry

* Fix tests

* Update homeassistant/components/sensor/__init__.py

---------

Co-authored-by: Erik <erik@montnemery.com>
2024-04-24 16:47:03 +02:00
Arie Catsman bbaa0c16cc
Cancel timer on enphase_envoy config entry unload (#111406)
* lingeringtimer

* Add async_cleanup to enphase_envoy_coordinator and call from unload_entry
2024-04-24 16:33:14 +02:00
J. Nick Koston d0f5e40b19
Refactor ESPHome manager to avoid sending signals in tests (#116033) 2024-04-24 16:14:44 +02:00
Jan Bouwhuis 70b358bca1
Always reload after a successful reauth flow (#116026)
* Always reload after a succesfull reauth-flow

* Add test, fix CI failures

* Add kwarg to prevent reloading and tests

* Do not reload entry for bond if it exists

* Remove mocks on internals

* Rename kwarg to always_reload

* Update tests/components/weatherflow_cloud/test_config_flow.py

* Update tests/components/homeworks/test_config_flow.py

* Update tests/components/homeworks/test_config_flow.py

* Rename to option to reload_even_if_entry_is_unchanged
2024-04-24 15:13:33 +02:00
Jan Bouwhuis 350ca48d4c
Return specific group state if there is one (#115866)
* Return specific group state if there is one

* Refactor

* Additional test cases

* Refactor

* Break out if more than one on state

* tweaks

* Remove log, add comment

* add comment

* Apply suggestions from code review

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

* Refactor and improve comments

* Refactor to class method

* More filtering

* Apply suggestions from code review

* Only active if not excluded

* Do not use a set

* Apply suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-24 15:12:29 +02:00
Shai Ungar 1f4585cc9e
Add service to 17track to get packages (#116067)
* Add service to 17track

* Add service to 17track

change to select selector
add snapshot test

* Add service to 17track

use strings for the selector

* Add service to 17track

fix test
2024-04-24 14:29:13 +02:00
Pete Sage 24a1f0712f
Fix Sonos music library play problems (#113429) 2024-04-24 14:03:40 +02:00
Brett Adams 0e0b543dec
Deprecate speed limit lock in Tessie (#113848) 2024-04-24 13:30:22 +02:00
Jan Bouwhuis 18132916fa
Mask current password in MQTT option flow (#116098)
* Mask current password in MQTT option flow

* Update docstr

* Typo
2024-04-24 13:29:42 +02:00
Andy 5aa61cb6d5
Extend options for ecovacs lifespans (#116094)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-04-24 13:19:50 +02:00
Michael 9fcb774252
Add reconfigure flow to AVM Fritz!SmartHome (#116047) 2024-04-24 13:06:14 +02:00
J. Nick Koston d17e9bfc99
Enable debug mode if asyncio debug is on at startup (#116084) 2024-04-24 12:55:09 +02:00
rlippmann 1120246194
Deprecate relative_time() in favor of time_since() and time_until() (#111177)
* add time_since/time_until.  add deprecation of relative_time

* fix merge conflicts

* Apply suggestions from code review

* Update homeassistant/helpers/template.py

* Update homeassistant/helpers/template.py

* Update homeassistant/helpers/template.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-24 11:13:07 +02:00
J. Nick Koston e0b58c3f45
Move thread safety check in async_register/async_remove (#116077) 2024-04-24 10:41:11 +02:00
Marc Mueller 5bded2a52d
Fix accuweather system_health after data change (#116063) 2024-04-24 10:30:57 +02:00
Robert Resch bcc2dd99b2
Rename strict connection static page to guard page (#116085) 2024-04-24 10:29:59 +02:00
Gage Benne c4340f6f5f
Ecobee preset mode icon translations (#116072) 2024-04-24 10:16:35 +02:00
J. Nick Koston 79b4889812
Always do thread safety checks when writing state for custom components (#116044) 2024-04-24 10:05:52 +02:00
Robert Resch a4829330f6
Add strict connection for cloud (#115814)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-24 09:57:38 +02:00
Richard Kroegel 474a1a3d94
Use display_precision if suggested_display_precision is None (#110270)
Co-authored-by: Richard <rikroe@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-24 09:46:55 +02:00
Michael d8cca482b3
Add reconfigure flow to AVM Fritz!Tools (#116057)
add reconfigure flow
2024-04-24 07:52:14 +02:00
Matthias Alphart f115525137
Migrate KNX notify service to entity platform (#115665) 2024-04-24 07:51:02 +02:00
J. Nick Koston 4a59ee978c
Always do thread safety checks when calling async_fire (#116055) 2024-04-24 06:41:55 +02:00
J. Nick Koston 53a179088f
Add debug mode to catch unsafe thread operations using core helpers (#115390)
* adjust

* adjust

* fixes

* one more

* test

* debug

* move to config

* cover

* Update homeassistant/core.py

* set debug from RuntimeConfig

* reduce

* fix message

* raise

* Update homeassistant/core.py

* Update homeassistant/core.py

* no flood check for raise

* cover
2024-04-24 03:36:05 +02:00
J. Nick Koston 9d54aa205b
Fix non-thread-safe operations in html5 (#116068)
Fix non thread-safe calls in html5

https://github.com/home-assistant/core/actions/runs/8808425552/job/24177668764?pr=116055
2024-04-24 03:33:19 +02:00
David Friedland e3016b131a
Add Event support to ESPHome components (#116061)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-04-24 13:22:03 +12:00
Michael 35db2e4101
Complete test coverage for Tankerkonig (#115920)
* complete tests

* update snapshots after rebase
2024-04-23 23:42:17 +02:00
Jan Bouwhuis 8d2813fb8b
Migrate legacy Ecobee notify service (#115592)
* Migrate legacy Ecobee notify service

* Correct comment

* Update homeassistant/components/ecobee/notify.py

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

* Use version to check latest entry being used

* Use 6 months of deprecation

* Add repair flow tests

* Only allow migrate_notify fix flow

* Simplify repair flow

* Use ecobee data to refrence entry

* Make entry attrubute puiblic

* Use hass.data ro retrieve entry.

* Only register issue when legacy service when it is use

* Remove backslash

* Use ws_client.send_json_auto_id

* Cleanup

* Import domain from notify integration

* Apply suggestions from code review

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

* Update dependencies

* Use Issue_registry fixture

* remove `update_before_add` flag

* Update homeassistant/components/ecobee/notify.py

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

* Update homeassistant/components/ecobee/notify.py

* Update tests/components/ecobee/conftest.py

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

* Fix typo and import

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-23 22:53:13 +02:00
Joost Lekkerkerker a45040af14
Add entity translations to 17track (#116022) 2024-04-23 22:30:20 +02:00
Jan Bouwhuis 31d11b2362
Add re-auth flow for MQTT broker username and password (#116011)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-23 22:26:01 +02:00
Thomas55555 f1fa33483e
Bump aioautomower to 2024.4.3 (#114500) 2024-04-23 22:23:44 +02:00
Bouwe Westerdijk 2c7a1ddb1d
Bump plugwise to v0.37.2 (#115989) 2024-04-23 22:13:09 +02:00
Brett Adams f249a9ba4b
Add API scope checks to Teslemetry (#113640) 2024-04-23 22:11:41 +02:00
J. Nick Koston fd08b7281e
Convert solaredge to asyncio with aiosolaredge (#115599) 2024-04-23 22:07:16 +02:00
Joost Lekkerkerker b5bd25d4fb
Add entity translations to totalconnect (#115950) 2024-04-23 21:54:13 +02:00
J. Nick Koston bb2bd086bc
Add missing adapter data to Bluetooth config entry titles (#115930) 2024-04-23 21:52:55 +02:00
Thomas55555 d4b801af32
Use snapshot test helper in Husqvarna Automower (#116039) 2024-04-23 17:39:29 +02:00
Marc Mueller a0314cddd4
Fix invalid tuple annotations (#116035) 2024-04-23 16:02:16 +02:00
Arie Catsman 2c651e190f
Add additional zeroconf discovery coverage and logging to enphase_envoy (#114405)
* add debug info to zeroconf for enphase_envoy

* Implement review feedback, lost space

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

* review feedback textual changes.

* implement review feedbackw.py

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

* Add some more zeroconf tests and valid jwt

* review feedback assert abort reason and keyerror for serialnumber

* Review feedback config flow test ends with abort or create_entry

* Review feedback optimize resource usage

* Cover new code in test.

* Use caplog for debug COV

---------

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-23 08:26:53 -04:00
Thomas55555 b8918d7d17
Add number platform to Husqvarna Automower (#115125)
* Add number platform to Husqvarna Automower

* use fixture to enable by default

* replace state test with snapshot test

* make property in entity description

* send value as integer

* give the exists functions something to do
2024-04-23 14:18:49 +02:00
Robert Resch fd14695d26
Bump deebot-client to 7.0.0 (#116025) 2024-04-23 13:16:55 +02:00
Martijn van der Pol e90d76b18d
Don't raise errors when using datetime objects in `as_datetime` Jinja function/filter (#109062)
* add support for datetime objects to as_datetime

* change import of datetime.date

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-23 09:55:58 +02:00
Shai Ungar e0c785b2b4
Add coordinator to 17Track (#115057)
* Add coordinator to 17Track

* Add coordinator to 17Track

remove SensorEntityDescription (different PR)

* Update homeassistant/components/seventeentrack/coordinator.py

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

* Update homeassistant/components/seventeentrack/sensor.py

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

* Add coordinator to 17Track

fix CR

* Add coordinator to 17Track

fix second CR

* Add coordinator to 17Track

remove commented out code + fix display name

* Add coordinator to 17Track

created a set outside _async_create_remove_entities function

* Add coordinator to 17Track

fix CR

* Add coordinator to 17Track

fix CR 2

* Update homeassistant/components/seventeentrack/coordinator.py

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

* Add coordinator to 17Track

raise UpdateFailed if API throws an exception

* Add coordinator to 17Track

merge calls

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-23 09:01:45 +02:00
Thomas Kistler b8f44fb722
Update Hydrawise from the legacy API to the new GraphQL API (#106904)
* Update Hydrawise from the legacy API to the new GraphQL API.

* Cleanup
2024-04-23 09:01:25 +02:00
G Johansson 917f4136a7
Add config flow to Folder Watcher (#105605)
* Add config flow to Folder Watcher

* Add tests config flow

* docstrings

* watcher is sync

* Fix strings

* Fix

* setup_entry issue

* ConfigFlowResult

* Review comments

* Review comment

* ruff

* new date
2024-04-23 08:55:39 +02:00
Kim de Vos b69f589c30
Add bandwidth sensor for unifi device ports (#115362) 2024-04-22 22:39:46 +02:00
karwosts 2ac44f6083
Make recorder.purge_entities require at least one entity filter value (#110066)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-22 20:10:18 +02:00
J. Nick Koston 0ed56694b0
Migrate MQTT EnsureJobAfterCooldown to use eager start (#115977) 2024-04-22 20:09:45 +02:00
Erik Montnemery 2caca7fbe3
Generate requirements per supported architecture (#115708)
* Generate requirements per supported architecture

* Don't store wheels requirements in the repo

* Dry run

* Set Python version

* Install base packages

* Fix

* Fix

* Fix

* Fix typo

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

* Genarate requirements_all_pytest.txt

* Fix hassfest

* Reenable building wheels

* Remove unneeded code

* Address review comment

* Fix lying comment

* Add tests, address review comments

* Deduplicate

* Fix file name

* Add comment

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-22 19:23:08 +02:00
David Knowles 2afaa3d333
Remove YAML support from Hydrawise (#115966) 2024-04-22 16:54:04 +02:00
Jesse Hills 9b6863f182
ESPHome: Add datetime entities (#115942) 2024-04-22 13:12:22 +02:00
Joost Lekkerkerker 693bd08a0b
Add snapshot tests to Totalconnect (#115952)
* Add snapshot tests to Totalconnect

* Add snapshot tests to Totalconnect
2024-04-22 13:01:31 +02:00
Aidan Timson 6985d36f18
Update ovoenergy to 2.0.0 (#115921)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-22 12:39:53 +02:00
Quentame f927b27ed4
Add Epic Games Store integration (#104725)
* Add Epic Games Store integration

Squashed commit of the following PR: #81167

* Bump epicstore-api to 0.1.7 as it handle better error 1004

Thanks to d7469f7c99

* Use extra_state_attributes instead of overriding state_attributes

* Review: change how config_flow.validate_input is handled

* Use LanguageSelector and rename locale to language

* Review: init-better use of hass.data.setdefault

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

* Review: don't need to update at init

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

* Revert "Review: don't need to update at init" --> not working otherwise

This reverts commit 1445a87c8e9b7247f1c9835bf2e2d7297dd02586.

* Review: fix config_flow.validate_input/retactor following lib bump

* review: merge async_update function with event property

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

* hassfest

* Fix duplicates data from applied comment review 5035055

* review: thanks to 5035055 async_add_entities update_before_add param is not required anymore

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

* Fix Christmas special "Holiday sale" case

* gen_requirements_all

* Use CONF_LANGUAGE from HA const

* Move CalendarType to const

* manifest: integration_type -> service

Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>

* calendar: remove date start/end assert

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* const: rename SUPPORTED_LANGUAGES

* hassfest

* config: Move to ConfigFlowResult

* coordinator: main file comment

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* ruff & hassfest

* review: do not guess country

* Add @hacf-fr as codeowner

* review: remove games extra_attrs
Was dropped somehow:
- 73c20f34803b0a0ec242bf0740494f17a68f6f59 review: move games extra_attrs to data service
- other commit that removed the service part

* review: remove unused error class
was removed:
- 040cf945bb5346b6d42b3782b5061a13fb7b1f6b

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-22 09:54:47 +02:00
rappenze de75f82235
Refactor fibaro connect (#106875)
* Refactor fibaro connect

* Remove obsolete test

* Add comment about ignored return value
2024-04-22 09:29:58 +02:00
andarotajo 70d4b4d20d
Add optional location based region to dwd_weather_warnings (#96027)
* Add device tracker option

* Update const name to be more understandable

* Clean up sensor code

* Clean up init and coordinator

* Add tests and update util function and it's usage

* Switch to using the registry entry and add tests

* Clean up code

* Consolidate duplicate code and adjust tests

* Fix runtime error

* Fix blocking of the event loop

* Adjust API object handling

* Update homeassistant/components/dwd_weather_warnings/exceptions.py

* Optimize coordinator data update

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-22 09:13:09 +02:00
Sid 895f73d8e4
Enable Ruff A001 (#115654) 2024-04-21 23:25:27 +02:00
J. Nick Koston 423544401e
Convert MQTT to use asyncio (#115910) 2024-04-21 22:33:58 +02:00
Michael 5a24690d79
Make use of snapshot testing in Synology DSM (#115931) 2024-04-21 22:26:57 +02:00
Robert Svensson 83370a5bde
Remove sensor exposing UniFi WLAN password (#115929) 2024-04-21 20:27:44 +02:00
wittypluck 1c0c0bb0bc
Allow manual delete of stale Unifi device from UI (#115267)
* Allow manual delete of stale device from UI

* Add unit tests for remove_config_entry_device
2024-04-21 11:08:39 +02:00
Jan Bouwhuis b592225a87
Improve service validation exception test and translation key (#115843)
* Small improvement to service validation exception test and translation key

* Apply suggestions from code review

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

* Refactor string assertion

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-21 08:54:23 +02:00
Adam Goode 27bccf0b24
Add test for prometheus export of entities becoming unavailable and available again (#112157)
Add test for state change to unavailable and back
2024-04-20 20:20:01 -07:00
J. Nick Koston 29bfed72f7
Fix flaky history stats test (#115824) 2024-04-21 01:08:40 +02:00
Brett Adams 7d386b0d26
Fix sensor entity description in Teslemetry (#115614)
Add description back to sensor entity
2024-04-20 23:54:24 +02:00
r-binder 68225abce5
Add tls support for AVM Fritz!Tools (#112714) 2024-04-20 23:08:29 +02:00
Joost Lekkerkerker 48d1692cd6
Use snapshot test helper in Ambient Network (#115887) 2024-04-20 21:29:14 +02:00
Joost Lekkerkerker ee116713cf
Use snapshot test helper in Analytics insights (#115889) 2024-04-20 21:27:54 +02:00
Alberto Montes c94b0a82ca
Make release channel a hardcoded enum rather than a free form string (#115595)
* Make release channel a hardcoded enum rather than a free form string

* Update enum comparison to remove equality and us identity comparison

* Fix comparison condition to match the previous implementation

* Update tests to use Enum instead of string
2024-04-20 20:01:49 +02:00
Joost Lekkerkerker c753093741
Use snapshot test helper in AO Smith (#115890) 2024-04-20 19:10:56 +02:00
Maciej Bieniek 10be2cc004
Use snapshot test helper in NextDNS (#115895)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 18:43:40 +02:00
Maciej Bieniek 5e345b7129
Use snapshot test helper in NAM (#115894)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 18:43:33 +02:00
Maciej Bieniek de1312f7e4
Use snapshot test helper in GIOS (#115893)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 18:43:25 +02:00
Joost Lekkerkerker b328981868
Use snapshot test helper in Accuweather (#115884) 2024-04-20 17:24:40 +02:00
Joost Lekkerkerker 5796b651af
Use snapshot test helper in Brother (#115885) 2024-04-20 17:14:42 +02:00
Joost Lekkerkerker 16e31d8f74
Add test helper to snapshot a platform (#115880)
* Add test helper to snapshot a platform

* Add test helper to snapshot a platform
2024-04-20 14:49:57 +02:00
Maciej Bieniek 194f3366ce
Use snapshot testing in NAM sensor and diagnostics (#115877)
* Use snapshot testing in NAM diagnostics

* Use snapshot testing in NAM sensor

* Add NAM data fixture

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 12:34:27 +02:00
Maciej Bieniek c4e7a7af21
Use snapshot testing in Brother sensor (#115875)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 12:33:08 +02:00
Maciej Bieniek c2450c1112
Use snapshot testing in GIOS sensor (#115876)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 12:32:11 +02:00
Maciej Bieniek c8d52c02c5
Use snapshot testing in NextDNS (#115879)
* Use snapshot testing in NextDNS sensor

* Use snapshot testing in NextDNS switch

* Use snapshot testing in NextDNS binary sensor

* Use snapshot testing in NextDNS button

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-20 12:31:20 +02:00
Michael 354c20a57b
Automatic cleanup of entity and device registry in AVM FRITZ!SmartHome (#114601) 2024-04-20 12:13:56 +02:00
J. Nick Koston 4529268544
Ensure scripts with timeouts of zero timeout immediately (#115830) 2024-04-19 18:24:54 +02:00
slyoldfox ebbcad17c6
Add scheduled mode to renault charge mode (#115427)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-04-19 18:22:12 +02:00
avee87 18d6581523
Fix Hyperion light not updating state (#115389) 2024-04-19 18:21:21 +02:00
Joost Lekkerkerker cc2e0fd921
Make Withings recoverable after internet outage (#115124) 2024-04-19 18:18:32 +02:00
Joost Lekkerkerker c108c7df38
Add reauth flow to Google Tasks (#109517)
* Add reauth flow to Google Tasks

* Update homeassistant/components/google_tasks/config_flow.py

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

* Add tests

* Reauth

* Remove insta reauth

* Fix

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-04-19 17:38:39 +02:00
Simone Chemelli ff83d9acff
Add missing media_player features to Samsung TV (#115788)
* add missing features

* fix snapshot
2024-04-19 16:45:19 +02:00
Jan Bouwhuis 5b082ed669
Add group tests with mixed domain entities (#115849) 2024-04-19 14:48:18 +02:00
hahn-th ed4f00279e
Show default profiles in homematic cloud climate entity (#107348)
* Default names for visible profiles

* Increase number of devices in test

* remove unnecessary check

* Add testcase and split another into two

* Add type annotations and docstring

* Remove code which not belongs to the PR

* Add myself to codeowners
2024-04-19 08:09:48 +02:00
Joe Neuman 4cce75177a
Add get_torrents service to qBittorrent integration (#106501)
* Upgrade QBittorrent integration to show torrents

This brings the QBittorrent integration to be more in line with the Transmission integration. It updates how the integration is written, along with adding sensors for Active Torrents, Inactive Torrents, Paused Torrents, Total Torrents, Seeding Torrents, Started Torrents.

* Remove unused stuff

* Correct name in comments

* Make get torrents a service with a response

* Add new sensors

* remove service

* Add service with response to get torrents list

This adds a service with a response to be able to get the list of torrents within qBittorrent

* update

* update from rebase

* Update strings.json

* Update helpers.py

* Update to satisfy lint

* add func comment

* fix lint issues

* another update attempt

* Fix helpers

* Remove unneccesary part in services.yaml and add translations

* Fix return

* Add tests

* Fix test

* Improve tests

* Fix issue from rebase

* Add icon for get_torrents service

* Make get torrents a service with a response

* remove service

* Add service with response to get torrents list

This adds a service with a response to be able to get the list of torrents within qBittorrent

* Update to satisfy lint

* Handle multiple installed integrations

* fix lint issue

* Set return types for helper methods

* Create the service method in async_setup

* Add CONFIG_SCHEMA

* Add get_all_torrents service

* fix lint issues

* Add return types and ServiceValidationError(s)

* Fix naming

* Update translations

* Fix tests
2024-04-19 07:56:37 +02:00
J. Nick Koston 1d6ae01baa
Handle Bluetooth adapters in a crashed state (#115790)
* Skip bluetooth discovery for Bluetooth adapters in a crashed state

* fixes

* fixes

* adjust

* coverage

* coverage

* fix race
2024-04-18 15:06:53 -05:00
J. Nick Koston d48bd9b016
Deprecate async_track_state_change in favor of async_track_state_change_event (#115558) 2024-04-18 10:45:14 -05:00
J. Nick Koston b18f1ac265
Migrate device_sun_light_trigger to use async_track_state_change_event (#115555)
* Migrate device_sun_light_trigger to use async_track_state_change_event

async_track_state_change is legacy and will eventually be deprecated after
all core usage is removed. There are only two places left

* coverage
2024-04-18 10:45:06 -04:00
J. Nick Koston 588c260dc5
Skip processing websocket_api schema if it has no arguments (#115618)
* Skip processing websocket_api schema if has no arguments

About 40% of the websocket commands on first connection have
no arguments. We can skip processing the schema for these cases

* cover

* fixes

* allow extra

* Revert "allow extra"

This reverts commit 85d9ec36b3.

* match behavior
2024-04-18 10:41:08 -04:00
J. Nick Koston ea8d4d0dca
Add reauth support to oncue (#115667)
* Add reauth support to oncue

* review comments

* reauth on update failure

* coverage
2024-04-18 10:39:58 -04:00
J. Nick Koston 53c48537d7
Add bluetooth adapter model and manufacturer to config flow (#115780)
* Show bluetooth adapter model and manufacturer in config flow

If there are multiple adapters, it could be a bit difficult
to figure out which one is which

* Show bluetooth adapter model and manufacturer in config flow

If there are multiple adapters, it could be a bit difficult
to figure out which one is which

* reorder

* reorder

* names

* remove

* fix incomplete mocking

* more missing mocks
2024-04-18 10:39:32 -04:00
Lukasz Szmit ceaf8f2402
Add support for payload_template in rest component (#107464)
* Add support for payload_template in rest component

* Update homeassistant/components/rest/schema.py

* Update homeassistant/components/rest/data.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-18 15:22:58 +02:00
vexofp 8ba1340c2e
Clarify cover toggle logic; prevent opening when already open (#107920)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-18 14:58:16 +02:00