Commit Graph

20725 Commits (5c018f6ffceefd02f0f42779c2348e802a7e0541)

Author SHA1 Message Date
J. Nick Koston cb16465539
Keep track of top level components (#115586)
* Keep track of top level components

Currently we have to do a set comp for icons, translations,
and integration platforms every time to split the top level
components from the platforms. Keep track of the top level
components in a seperate set so avoid having to do the setcomp
every time.

* remove impossible paths

* remove unused code

* preen

* preen

* fix

* coverage and fixes

* Update homeassistant/core.py

* Update homeassistant/core.py

* Update tests/test_core.py
2024-04-17 13:23:20 +02:00
J. Nick Koston 6dcfe861fd
Bump habluetooth to 2.5.2 (#115721) 2024-04-16 18:34:57 -05:00
Maciej Bieniek e7076ac83f
Use separate data coordinators for AccuWeather observation and forecast (#115628)
* Remove forecast option

* Update strings

* Use separate DataUpdateCoordinator for observation and forecast

* Fix tests

* Remove unneeded variable

* Separate data coordinator classes

* Use list comprehension

* Separate coordinator clasess to add type annotations

* Test the availability of the forecast sensor entity

* Add DataUpdateCoordinator types

* Use snapshot for test_sensor()

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-17 00:00:16 +02:00
Matthew Hallonbacka 4a89e18b7e
Fix check for missing parts on incoming SMS (#105068)
* Fix check for missing parts on incoming SMS

* Add tests for get_and_delete_all_sms function

* Fix CI issues

* Install libgammu-dev in CI

* Bust the venv cache

* Include python-gammu in requirements-all.txt

* Adjust install of dependencies

---------

Co-authored-by: Erik <erik@montnemery.com>
2024-04-16 21:34:09 +02:00
BestPig 586d27320e
Add Sound Mode selection in soundpal components (#106589) 2024-04-16 17:45:48 +02:00
Guido Schmitz 63c9aef71d
Correct spelling of "Wi-Fi" in devolo_home_network (#106167)
* Use Wi-Fi in devolo_home_network

* Recreate snapshots

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-16 16:28:25 +02:00
myMartek 18ac9a7ba5
Add select hold to AppleTVs remote entity as possible command (#105764)
* Fixed home hold and added select hold

* Fixed home hold and added select hold

* Removed select_hold for now

* Fixed wrong import block sorting

* Fixed unit tests for AppleTV

* Added select hold command to AppleTV integration

* Removed home_hold and added hold_secs option for remote commands

* Added DEFAULT_HOLD_SECS

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-16 16:16:32 +02:00
Joost Lekkerkerker e9894f8e91
Add extract media url service to media extractor (#100780)
* Exclude manifest files from youtube media extraction

* Add media_extractor service to extract media

* Fix snapshot

* Run ytdlp async

* Add icon

* Fix

* Fix
2024-04-16 16:13:03 +02:00
Erik Montnemery 7cd0fe3c5f
Don't reload other automations when saving an automation (#80254)
* Only reload modified automation

* Correct check for existing automation

* Add tests

* Remove the new service, improve ReloadServiceHelper

* Revert unneeded changes

* Update tests

* Address review comments

* Improve test coverage

* Address review comments

* Tweak reloader code + add a targetted test

* Apply suggestions from code review

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

* Explain the tests + add more variations

* Fix copy-paste mistake in test

* Rephrase explanation of expected test outcome

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-16 15:58:57 +02:00
Martin Hjelmare 093aee672c
Fix ambient network test linting (#115691) 2024-04-16 10:19:23 +02:00
Thomas Kistler 0dd8ffd1f5
Add a new "Ambient Weather Network" integration (#105779)
* Adding a new "Ambient Weather Network" integration.

* Rebase and update code coverage.

* Addressed some reviewer comments.

* Remove mnemonics and replace with station names.

* Remove climate-utils

* Remove support for virtual stations.

* Rebase

* Address feedback

* Remove redundant errors

* Reviewer feedback

* Add icons.json

* More icons

* Reviewer feedback

* Fix test

* Make sensor tests more robust

* Make coordinator more robust

* Change update coordinator to raise UpdateFailed

* Recover from no station found error

* Dynamically set device name

* Address feedback

* Disable some sensors by default

* Reviewer feedback

* Change from hub to service

* Rebase

* Address reviewer feedback

* Reviewer feedback

* Manually rerun ruff on all files
2024-04-16 09:46:15 +02:00
Stephen Alderman f62fb76765
Add Config Flow to LG Netcast (#104913)
* Add Config Flow to lg_netcast

* Add YAML import to Lg Netcast ConfigFlow

Deprecates YAML config support

* Add LG Netcast Device triggers for turn_on action

* Add myself to LG Netcast codeowners

* Remove unnecessary user_input validation check.

* Move netcast discovery logic to the backend

* Use FlowResultType Enum for tests

* Mock pylgnetcast.query_device_info instead of _send_to_tv

* Refactor lg_netcast client discovery, simplify YAML import

* Simplify CONF_NAME to use friendly name

Fix: Use Friendly name for Name

* Expose model to DeviceInfo

* Add test for testing YAML import when not TV not online

* Switch to entity_name for LGTVDevice

* Add data_description to host field in user step

* Wrap try only around _get_session_id

* Send regular request for access_token to ensure it display on the TV

* Stop displaying access token when flow is aborted

* Remove config_flow only consts and minor fixups

* Simplify media_player logic & raise new migration issue

* Add async_unload_entry

* Create issues when import config flow fails, and raise only a single yaml deprecation issue type

* Remove single use trigger helpers

* Bump issue deprecation breakage version

* Lint

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-16 09:29:02 +02:00
brave0d a99ecb024e
New BMW sensor for climate activity (#110287)
* add sensor with climate activity status

* Update strings.json

* use icon translation and is_available for sensor

* use enum with translations

* Return None if value is UNKNOWN

* fix getting the value: x.value

* fix getting the value: x instead of x.value

* Fix tests and pre-commit

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-04-16 09:24:32 +02:00
Tom Harris c5c407b3bb
Move Insteon configuration panel to config entry (#105581)
* Move Insteon panel to the config menu

* Bump pyinsteon to 1.5.3

* Undo devcontainer.json changes

* Bump Insteon frontend

* Update config_flow.py

* Code cleanup

* Code review changes

* Fix failing tests

* Fix format

* Remove unnecessary exception

* codecov

* Remove return from try

* Fix merge mistake

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-16 09:10:32 +02:00
Collin Fair 4aab073bd2
Remove cloud dependency from `islamic-prayer-times` (#115146)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-15 15:42:33 -05:00
Sid 5f055a64bb
Enable Ruff B017 (#115335) 2024-04-15 22:25:09 +02:00
J. Nick Koston a6a47c0b44
Make aiohttp_cors a top level import (#115563)
* Make aiohttp_cors a top level import

This was moved to a late import in #27935 but there is no
longer any need to import it late in the event loop as aiohttp_cors
is listed in pyproject.toml so it will always be available

* drop requirements as they are all top level now

* drop requirements as they are all top level now

* adjust
2024-04-15 21:06:59 +02:00
J. Nick Koston 15ecd3ae31
Fix flaky zwave update entity delay test (#115552)
The test assumed the node updates would happen in a specific order
but they can switch order based on timing.

Adjust to check to make sure all the nodes are called but make it
order independent
2024-04-15 13:12:09 +02:00
Brett Adams 5e1de6842d
Fix Teslemetry sensor values (#115571) 2024-04-15 01:48:22 +02:00
Arie Catsman 6092894ce5
For new installs make enphase_envoy phase entities default disabled (#115577) 2024-04-14 10:41:00 -05:00
Shay Levy 291df6dafe
Bump aioshelly to 9.0.0 (#114025)
* Update Shelly to use initialize from aioshelly

* Save indentation in _async_device_connect

* Use firmware_supported property from aioshelly

* Review comments

* Bump aioshelly

* Fix lint errors

* Test RPC initialized update
2024-04-14 18:07:26 +03:00
J. Nick Koston 33412dd9f6
Remove unused legacy state translations (#112023)
* Remove unused state translations

There have been replaced with entity translations
https://github.com/home-assistant/developers.home-assistant/pull/1557
https://github.com/home-assistant/core/pull/82701

* nothing does merging anymore

* useless dispatch

* remove

* remove platform code from hassfest

* preen

* Update homeassistant/helpers/translation.py

* ruff

* fix merge

* check is impossible now since we already know if translations exist or not

* keep the function for now

* remove unreachable code since we filter out `.` before now

* reduce

* reduce

* fix merge conflict (again)
2024-04-14 07:13:17 -04:00
Sid 0200d1aa66
Unignore Ruff UP006, UP007 (#115533) 2024-04-14 00:26:58 -05:00
Sid c24ae01a43
Unignore Ruff E731 (#115564) 2024-04-14 00:15:10 -05:00
Sid 3799d20d43
Enable Ruff B905 (#114197) 2024-04-14 00:14:26 -05:00
J. Nick Koston b70edb89bf
Fix missing Home in listener deprecation message (#115559) 2024-04-13 20:44:07 -05:00
Mr. Bubbles 927ea14562
Add exception translations to Bring integration (#115547)
* Add exception translations

* Add test for exceptions

* Remove unnecessary logging
2024-04-14 00:26:37 +02:00
J. Nick Koston 4955364948
Fix advantage_air disabled entity tests (#115548)
* Fix advantage_air disabled entity test

* fix both
2024-04-13 18:13:19 -04:00
J. Nick Koston 0b3627b59e
Add additional cached_property to camera entities (#115075) 2024-04-13 16:50:11 -05:00
J. Nick Koston dee99c764b
Complete ESPHome media_player coverage (#114352) 2024-04-13 16:29:14 -05:00
J. Nick Koston ee535ee611
Ensure test async_create_task eager start behavior matches production (#115517) 2024-04-13 15:58:52 -05:00
J. Nick Koston 0bd4064212
Update ollama config_flow task to use eager_start (#115455)
The test now adds a delay because it finished too fast
2024-04-13 16:54:21 -04:00
J. Nick Koston f452c5b84e
Add forecast subscription failure test case to nws (#115541) 2024-04-13 15:48:23 -05:00
J. Nick Koston f1ac33c246
Fix unmocked remote socket calls in sunweg tests (#115546)
Fix unmocked calls in sunweg tests
2024-04-13 16:36:33 -04:00
J. Nick Koston edd75a9d5f
Fix race in TimestampDataUpdateCoordinator (#115542)
* Fix race in TimestampDataUpdateCoordinator

The last_update_success_time value was being set after the listeners
were fired which could lead to a loop because the listener may
re-trigger an update because it thinks the data is stale

* coverage

* docstring
2024-04-13 16:35:07 -04:00
J. Nick Koston 82d0f478a5
Hold the reload lock while attempting config entry setup retry (#115538) 2024-04-13 15:26:41 -05:00
J. Nick Koston 008c42e282
Bump py-synologydsm-api to 2.4.2 (#115499)
Co-authored-by: mib1185 <mail@mib85.de>
2024-04-13 14:38:37 -05:00
Jan Bouwhuis 197070486f
Set up notify group with the notify services in test (#115526) 2024-04-13 17:10:16 +02:00
Jan Bouwhuis 36bdda5669
Migrate demo notify platform (#115448)
* Migrate demo notify platform

* Update homeassistant/components/demo/notify.py

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

* Remove no needed tests

* Cleanup redundant attribute assignment

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-04-13 14:27:07 +02:00
Jan Bouwhuis 38c7b99aef
Make legacy notify group tests independent of demo platform (#115494) 2024-04-13 12:58:31 +02:00
Toni Korhonen 84a975b61e
Add Balboa spa temperature range state control (high/low) (#115285)
* Add temperature range switch (high/low) to Balboa spa integration.

* Change Balboa spa integration temperature range control from switch to select

* Balboa spa integration: Fix ruff formatting

* Balboa spa integration: increase test coverage

* Balboa spa integration review fixes: Move instance attributes as class attributes. Fix code comments.
2024-04-13 10:44:02 +02:00
Jan Bouwhuis 127c27c9a7
Isolate legacy notify tests (#115470)
* Isolate legacy notify tests

* Rebase

* Refactor
2024-04-13 10:14:58 +02:00
Sid 223fefbbfa
Enable Ruff RUF018 (#115485) 2024-04-13 09:56:33 +02:00
J. Nick Koston bb9330135d
Fix race in influxdb test (#115514)
The patch was still too late in #115442

There is no good candidate to patch here since the late operation
is the error log that is being tested.

Patching the logger did not seem like a good idea so I went with
patching to wait for the error to be emitted since emit is the public
API of the log handler and was less likely to change
2024-04-13 09:13:01 +02:00
Jan Bouwhuis 76fefaafb0
Move out demo notify tests to the notify platform (#115504)
* Move test file

* Make independent of demo platform

* Restore tests for demo platform for coverage
2024-04-13 08:18:45 +02:00
Sid d74be6d5fe
Set Ruff RUF001-003 to ignore (#115477) 2024-04-13 00:51:36 +02:00
dontinelli 6eaf3402c6
Add re-auth-flow to fyta integration (#114972)
* add re-auth-flow to fyta integration

* add strings for reauth-flow

* resolve typing error

* update based on review comments

* Update homeassistant/components/fyta/config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* add async_auth

* adjustment based on review commet

* Update test_config_flow.py

* remove credentials

* Update homeassistant/components/fyta/config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fyta/test_config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fyta/test_config_flow.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update conftest.py

* Update test_config_flow.py

* Aktualisieren von conftest.py

* Update test_config_flow.py

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-04-12 20:33:24 +02:00
Brett Adams b266224ccd
Add diagnostics to Teslemetry (#115195)
* Add diag

* Add diag and tests

* Fix redaction

* Add another energy redact

* Review Feedback

* Update snapshot

* Fixed the wrong integration

* Fix snapshot again

* Update tests/components/teslemetry/test_diagnostics.py

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-04-12 20:27:38 +02:00
Robert Resch 348e1df949
Add strict connection (#112387)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-12 14:47:46 +02:00
Jan Bouwhuis a213de3db5
Add service schema tests for notify entity platform (#115457)
* Add service schema tests for notify entity platform

* Use correct entity

* Assert on exception value
2024-04-12 10:40:17 +02:00