Commit Graph

21814 Commits (b80f7185b2e8e3a04727a59032a517cb87c9ce19)

Author SHA1 Message Date
Brett Adams e4be3d8435
Improve the reliability of tests in Tessie (#118596) 2024-06-07 22:11:35 +02:00
Robert Svensson 20df747806
Use fixtures in UniFi device tracker tests (#118912) 2024-06-07 21:28:02 +02:00
Erik Montnemery 6c15351c18
Add support for common references in strings.json (#118783)
* Add support for common references in strings.json

* Update tests
2024-06-07 20:59:26 +02:00
epenet b2a54c50e2
Move mock_zeroconf to decorator in tests (#119061) 2024-06-07 20:55:20 +02:00
epenet 4a4c98caad
Move mock_async_zeroconf to decorator in zeroconf tests (#119063) 2024-06-07 20:49:58 +02:00
OzGav aa121ebf73
Add previous track intent (#113222)
* add previous track intent

* add stop and clear playlist

* Remove clear_playlist and stop

* Remove clear_playlist and stop

* Use extra constraints

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-06-07 13:34:22 -05:00
epenet cd7f2f9f77
Fix incorrect type hints in azure_data_explorer tests (#119065) 2024-06-07 20:07:38 +02:00
epenet 9008b4295c
Improve type hints in assist_pipeline tests (#119066) 2024-06-07 12:39:25 -05:00
paulusbrand 624017a0f9
Add template Base64 decode encoding parameter (#116603)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-07 17:01:35 +02:00
epenet 37b0e8fa33
Improve type hints in airvisual test fixtures (#119079) 2024-06-07 07:35:33 -06:00
epenet 5bf42e64e3
Improve type hints in arcam_fmj tests (#119072) 2024-06-07 15:33:43 +02:00
epenet 549f66fd6f
Move mock_async_zeroconf to decorator in homekit tests (#119060) 2024-06-07 12:30:02 +02:00
Robert Svensson a8becb1248
Use fixtures in UniFi sensor tests (#118921) 2024-06-07 12:15:03 +02:00
Joost Lekkerkerker f6c66dfd27
Bump aiowithings to 3.0.1 (#118854) 2024-06-07 12:11:15 +02:00
epenet bfff3c0524
Add type hint to mock_async_zeroconf in test fixtures (#119057) 2024-06-07 12:09:18 +02:00
epenet 5f309b69cf
Add type hints to current_request_with_host in tests (#119054) 2024-06-07 11:40:23 +02:00
epenet 907297cd1a
Improve type hints in config tests (#119055) 2024-06-07 11:40:03 +02:00
epenet 1c8a9cc3b8
Remove unused caplog fixtures in tests (#119056) 2024-06-07 11:38:56 +02:00
epenet b3a71dcea3
Improve type hints in homekit_controller tests (#119053) 2024-06-07 11:31:45 +02:00
Mike Degatano 78f53341b7
Always have addon url in detached_addon_missing (#119011) 2024-06-07 10:52:15 +02:00
epenet 42b1cfe6b9
Improve type hints in azure_event_hub tests (#119047)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-06-07 10:50:03 +02:00
epenet 7638380add
Improve type hints in kaleidescape tests (#119040) 2024-06-07 10:49:09 +02:00
epenet c107d980fa
Improve type hints in motionblinds_ble tests (#119049) 2024-06-07 10:43:56 +02:00
epenet d5a68ad311
Improve type hints in zamg tests (#119042) 2024-06-07 10:25:11 +02:00
Lorenzo Monaco 78c7af40ed
Ecovacs get_positions service (#118572)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-07 10:11:49 +02:00
J. Nick Koston 6ba8b7a5d6
Remove isal from after_dependencies in http (#119000) 2024-06-07 09:21:53 +02:00
epenet 4f6a98cee3
Remove unused request fixtures (#119044) 2024-06-07 09:19:03 +02:00
Joost Lekkerkerker 6027af3d36
Fix unit of measurement for airgradient sensor (#118981) 2024-06-07 09:17:36 +02:00
epenet 8628a1e449
Improve type hints in airnow tests (#119038) 2024-06-07 09:03:35 +02:00
Marc Mueller 274cd41d57
Fix Generator annotations in tests (1) (#119018) 2024-06-07 08:43:32 +02:00
Marc Mueller 7195a21126
Fix Generator annotations in tests (2) (#119019) 2024-06-07 08:34:38 +02:00
Maciej Bieniek 27e8a4ed6f
Add the missing humidity value to the Accuweather daily forecast (#119013)
Add the missing humidity value to the daily forecast

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-07 07:23:44 +02:00
Michael Hansen 87114bf19b
Fix exposure checks on some intents (#118988)
* Check exposure in climate intent

* Check exposure in todo list

* Check exposure for weather

* Check exposure in humidity intents

* Add extra checks to weather tests

* Add more checks to todo intent test

* Move climate intents to async_match_targets

* Update test_intent.py

* Update test_intent.py

* Remove patch
2024-06-06 20:41:25 -05:00
Matthias Alphart a7429e5f50
Fix KNX `climate.set_hvac_mode` not turning `on` (#119012) 2024-06-06 22:40:04 +02:00
Jordi 7219a4fa98
Add Aquacell integration (#117117)
* Initial commit

* Support changed API
Change sensor entity descriptions

* Fix sensor not handling coordinator update

* Implement re-authentication flow and handle token expiry

* Bump aioaquacell

* Bump aioaquacell

* Cleanup and initial tests

* Fixes for config flow tests

* Cleanup

* Fixes

* Formatted

* Use config entry runtime
Use icon translations
Removed reauth
Removed last updated sensor
Changed lid in place to binary sensor
Cleanup

* Remove reauth strings

* Removed binary_sensor platform
Fixed sensors not updating properly

* Remove reauth tests
Bump aioaquacell

* Moved softener property to entity class
Inlined validate_input method
Renaming of entities
Do a single async_add_entities call to add all entities
Reduced code in try blocks

* Made tests parameterized and use test fixture for api
Cleaned up unused code
Removed traces of reauth

* Add check if refresh token is expired
Add tests

* Add missing unique_id to config entry mock
Inlined _update_config_entry_refresh_token method
Fix incorrect test method name and comment

* Add snapshot test
Changed WiFi level to WiFi strength

* Bump aioaquacell to 0.1.7

* Move test_coordinator tests to test_init
Add test for duplicate config entry
2024-06-06 22:33:58 +02:00
Robert Svensson ec3a976410
Use fixtures in UniFi image tests (#118887) 2024-06-06 14:23:10 -04:00
Robert Svensson d695660164
Use fixtures in UniFi diagnostics tests (#118905) 2024-06-06 14:22:41 -04:00
Michael Hansen bca8958d4b
Prioritize literal text with name slots in sentence matching (#118900)
Prioritize literal text with name slots
2024-06-06 14:20:34 -04:00
Steven B 333ac56904
Fully mock the ring_doorbell api and remove requests_mock (#113140)
* Fully mock ring_doorbell library

* Add comments and docstrings

* Simplify devices_mocks and fake RingDevices

* Update post review

* Consolidate device filtering in conftest

* Fix ruff lambda assignment failure

* Fix ruff check fail

* Update post review
2024-06-06 20:13:19 +02:00
Mr. Bubbles 99b85e16d1
Set username as entry title in Bring integration (#118974)
Set username as entry title
2024-06-06 20:03:58 +02:00
J. Nick Koston 62b1bde0e8
Only entity verify state writable once after success unless hass is missing (#118896) 2024-06-06 11:46:44 -05:00
epenet 5914ff0de8
Improve type hints in apple_tv tests (#118980) 2024-06-06 17:44:22 +02:00
Marc Mueller 837ee7c4fb
Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
Marc Mueller 59e178df3b
Import Generator from typing_extensions (5) (#118993) 2024-06-06 17:33:27 +02:00
epenet 632238a7f9
Move mock_bluetooth* fixtures to decorator (#118846) 2024-06-06 17:31:08 +02:00
Marc Mueller 33ed4fd862
Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
epenet fb51163075
Move socket_enabled fixture to decorator (#118847) 2024-06-06 17:27:38 +02:00
epenet 6de26ca811
Unhide facebook tests (#118867) 2024-06-06 17:24:48 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
Rami Mosleh cab58fa9b2
Check if imap message text has a value instead of checking if its not None (#118901)
* Check if message_text has a value instead of checking if its not None

* Strip message_text to ensure that its actually empty or not

* Add test with multipart payload having empty plain text
2024-06-06 14:10:03 +02:00
Sebastian Lövdahl a5959cfb83
Address post-merge review comments from Vallox reconfigure support PR (#118903)
Address late review comments from Vallox reconfigure support PR
2024-06-06 12:52:57 +02:00
epenet 622a69447d
Add type hints to hdmi_cec assert_state function (#118940)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-06-06 12:39:24 +02:00
epenet 857b5c9c1b
Fix type hints in google tests (#118941) 2024-06-06 12:19:41 +02:00
epenet 492b158818
Add return type hints in tests (a-i) (#118939) 2024-06-06 12:17:08 +02:00
Mr. Bubbles 6e8d6f5994
Load fixture with decorator to avoid variable not accessed error (#118954)
Use fixture decorator
2024-06-06 12:15:13 +02:00
epenet f425420899
Improve type hints in rainforest_raven tests (#118950) 2024-06-06 12:10:13 +02:00
epenet c373e36995
Centralize duplicate fixtures in rainforest_raven tests (#118945) 2024-06-06 10:44:02 +02:00
epenet 7eda8aafc8
Ignore nested functions when enforcing type hints in tests (#118948) 2024-06-06 10:43:31 +02:00
Mr. Bubbles 093e85d59a
Fix some minor typos in ista EcoTrend integration (#118949)
Fix typos
2024-06-06 10:43:12 +02:00
epenet c7cc465e5c
Add return type hints in tests (k-z) (#118942) 2024-06-06 10:11:29 +02:00
J. Nick Koston f9205cd88d
Avoid additional timestamp conversion to set state (#118885)
Avoid addtional timestamp conversion to set state

Since we already have the timestamp, we can pass it on to the State
object and avoid the additional timestamp conversion which can be as
much as 30% of the state write runtime.

Since datetime objects are limited to microsecond precision, we need
to adjust some tests to account for the additional precision that we
will now be able to get in the database
2024-06-05 23:43:34 -04:00
J. Nick Koston 475c20d529
Always do thread safety check when writing state (#118886)
* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* Always do thread safety check when writing state

Refactor the 3 most common places where the thread safety check
for the event loop to be inline to make the check fast enough
that we can keep it long term. While code review catches most
of the thread safety issues in core, some of them still make
it through, and new ones keep getting added. Its not possible
to catch them all with manual code review, so its worth the
tiny overhead to check each time.

Previously the check was limited to custom components
because they were the most common source of thread
safety issues.

* async_fire is more common than expected with ccs

* fix mock

* fix hass mocking
2024-06-05 23:41:55 -04:00
Jan-Philipp Benecke 7407995ff1
Fix flaky Google Assistant test (#118914)
* Fix flaky Google Assistant test

* Trigger full ci
2024-06-05 17:37:14 -04:00
Erik Montnemery 8099ea8817
Improve WS command validate_config (#118864)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-05 18:53:44 +02:00
Robert Resch 0562c3085f
Replace slave by meter in v2c (#118893) 2024-06-05 18:21:03 +02:00
r-xyz 0487b38ed3
Add support for sending telegram messages to topics (#112715)
* Add support for sending telegram messages to topics
    Based on original PR #104059 by [jgresty](https://github.com/jgresty).
    Did not manage to merge conflicts, so I remade the changes from scratch, including suggestions from previous PR reviews.

    Topics were added to telegram groups in November 2022, and to the
    telegram-bot library in version 20.0. They are a purely additive change
    that is exposed by a single parameter `message_thread_id`. Not passing
    this parameter will not change the behaviour from current.

    This same parameter is used to send messages to threads and messages to
    topics inside groups.

    https://telegram.org/blog/topics-in-groups-collectible-usernames/it?setln=en#topics-in-groups

    Fixes #81888
    Fixes #91750

* telegram_bot: add tests for threads feature.

* telegram_bot: fixed tests for threads.

* telegram_bot: fixed wrong line.

* Update test_telegram_bot.py

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-05 17:41:40 +02:00
Robert Svensson 862c04a4b6
Use fixtures in UniFi service tests (#118838)
* Use fixtures in UniFi service tests

* Fix comments
2024-06-05 17:04:28 +02:00
Joost Lekkerkerker c4cfd9adf0
Add entity translations to incomfort (#118876) 2024-06-05 17:03:58 +02:00
Joost Lekkerkerker 60c06732b1
Add state and device class to incomfort (#118877)
* Add state and device class to incomfort

* Add state and device class to incomfort
2024-06-05 16:06:23 +02:00
Josef Zweck d0a036c617
Allow more input params to webhook generate_url helper (#112334)
* allow more params to helper

* switch back to f-string

* add test

* switch to proper method

* add allow_external, internal params

* fx default

* add signature comparison

* remove test, change prefer_external

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-05 15:55:37 +02:00
Jan Bouwhuis 066cd6dbef
Improve repair issue when notify service is still being used (#118855)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-06-05 15:41:22 +02:00
Pete Sage 0d1fb1fc9f
Fix Hydrawise sensor availability (#118669)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-05 14:18:41 +02:00
epenet 4b663dbf01
Rename esphome fixture (#118865) 2024-06-05 13:31:59 +02:00
Jan Bouwhuis 9a510cfe32
Add data coordinator to incomfort integration (#118816)
* Add data coordinator to incomfort integration

* Remove unused code and redundant comment, move entity class

* Use freezer

* Cleanup snapshot

* Use entry.runtime_data

* Use freezer, use mock_config_entry

* Use tick

* Use ConfigEntryError while we do not yet support a re-auth flow, update tests

* Use tick with async_fire_time_changed
2024-06-05 10:45:01 +02:00
epenet 9c8aa8456e
Move enable_bluetooth fixture to decorator (#118849) 2024-06-05 09:20:48 +02:00
epenet c7e065c413
Move enable_custom_integrations fixture to decorator (#118844) 2024-06-05 09:20:08 +02:00
Diogo Gomes ba7f82d5e2
Add diagnostic to V2C (#118823)
* add diagnostic platform

* add diagnostic platform

* add diagnostic platform
2024-06-05 08:55:49 +02:00
starkillerOG 8723441227
Add Reolink serial number to device info of IPC camera (#118834)
* Add UID to dev info

* Add camera_uid to test
2024-06-04 21:37:40 -04:00
J. Nick Koston ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
J. Nick Koston 67b3be8432
Remove useless threading locks in mqtt (#118737) 2024-06-04 14:21:03 -05:00
Robert Svensson b4f6325278
Use fixtures in UniFi switch tests (#118831) 2024-06-04 21:01:03 +02:00
Robert Svensson c2e245f9d4
Use fixtures in UniFi update tests (#118818) 2024-06-04 21:00:50 +02:00
arturyak 513262c0ff
Add missing FAN_ONLY mode to ccm15 (#118804) 2024-06-04 20:58:58 +02:00
Tsvi Mostovicz 98455cbd93
Fix updating options in Jewish Calendar (#118643) 2024-06-04 20:55:38 +02:00
Jan Bouwhuis 956623d964
Fix device name not set on all incomfort platforms (#118827)
* Prelimenary tests for incomfort integration

* Use snapshot_platform

* Use helper

* Ensure the device name is set in device info

* Move snapshot tests to platform test modules

* Move unused snapshot file

* Naming and docstr

* update snapshots

* cleanup snapshots

* Add water heater tests
2024-06-04 20:51:34 +02:00
J. Nick Koston 72e4aee155
Ensure name of task is logged for unhandled loop exceptions (#118822) 2024-06-04 12:48:29 -04:00
Maciej Bieniek 709e32a38a
Check if Shelly `entry.runtime_data` is available (#118805)
* Check if runtime_data is available

* Add tests

* Use `is` operator

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-04 18:40:18 +02:00
epenet b81f0b600f
Move current_request_with_host fixture to decorator (#118810)
* Move current_request_with_host fixture to decorator

* One more
2024-06-04 17:50:22 +02:00
Paulus Schoutsen 52ad90a68d
Include script description in LLM exposed entities (#118749)
* Include script description in LLM exposed entities

* Fix race in test

* Fix type

* Expose script

* Remove fields
2024-06-04 11:18:07 -04:00
ollo69 8610436948
Add remote entity to AndroidTV (#103496)
* Add remote entity to AndroidTV

* Add tests for remote entity

* Requested changes on tests
2024-06-04 17:02:30 +02:00
epenet b09f3eb313
Fix incorrect current_request_with_host type hint (#118809) 2024-06-04 16:26:39 +02:00
epenet 80975d7a63
Move None bluetooth fixtures to decorator (#118802) 2024-06-04 16:26:07 +02:00
epenet f120f55d86
Move enable_bluetooth fixture to decorator (#118803) 2024-06-04 16:20:11 +02:00
epenet 3d31af3eb4
Move entity_registry_enabled_by_default to decorator [a-p] (#118794) 2024-06-04 16:18:42 +02:00
epenet 089874f818
Move mock_hass_config fixture to decorator (#118807) 2024-06-04 16:05:56 +02:00
Joost Lekkerkerker 2ac5f8db06
Set unique id in aladdin connect config flow (#118798) 2024-06-04 16:00:53 +02:00
Richard Kroegel 1eb13b48a2
Add tests for BMW binary_sensor and lock (#118436)
* BMW: Add tests for binary_sensor & lock

* Use entity_registry_enabled_by_default fixture

* Update tests/components/bmw_connected_drive/test_binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Move fixtures to decorator

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Use fixture decorators if possible

* Fix rebase

* Spelling adjustments

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Use snapshot_platform helper

* Spelling

* Remove comment

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-04 15:08:15 +02:00
epenet 20b5aa3e0e
Move entity_registry_enabled_by_default to decorator [q-z] (#118793) 2024-06-04 13:38:32 +02:00
epenet 3ac0fa53c8
Cleanup unused FixtureRequest in tests (#118780) 2024-06-04 11:49:21 +02:00
Aidan Timson 42414d55e0
Azure DevOps build sensor attributes to new sensors (#114948)
* Setup for split

* Adjust to allow for None

* Create

* Add missing

* Fix datetime parsing in Azure DevOps sensor

* Remove definition id and name

These aren't needed and will never change

* Add tests for each sensor

* Add tests for edge cases

* Rename translations

* Update

* Use base sensor descriptions

* Remove

* Drop status

using this later for an event entity

* Switch to timestamp

* Switch to timestamp

* Merge

* Update snapshot

* Improvements from @joostlek

* Update homeassistant/components/azure_devops/sensor.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-06-04 10:50:43 +02:00
Mr. Bubbles 7815840194
Add ista EcoTrend integration (#118360)
* Add ista EcoTrend integration

* move code out of try

* Use account owners name as entry title

* update config flow tests

* add tests for init

* Add reauth flow

* Add tests for sensors

* add translations for reauth

* trigger statistics import on first refresh

* Move statistics and reauth flow to other PR

* Fix tests

* some changes

* draft_final_final

* remove unnecessary icons

* changed tests

* move device_registry test to init

* add text selectors
2024-06-04 10:45:53 +02:00
epenet b54a68750b
Add type hints for FixtureRequest in tests (#118779) 2024-06-04 10:37:54 +02:00
Richard Kroegel 7fb2802910
Allow per-sensor unit conversion on BMW sensors (#110272)
* Update BMW sensors to use device_class

* Test adjustments

* Trigger CI

* Remove unneeded cast

* Set suggested_display_precision to 0

* Rebase for climate_status

* Change charging_status to ENUM device class

* Add test for Enum translations

* Pin Enum sensor values

* Use snapshot_platform helper

* Remove translation tests

* Formatting

* Remove comment

* Use const.STATE_UNKOWN

* Fix typo

* Update strings

* Loop through Enum sensors

* Revert enum sensor changes

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-04 09:06:23 +02:00
J. Nick Koston 553311cc7d
Add os.walk to asyncio loop blocking detection (#118769) 2024-06-04 06:53:37 +02:00
Jan Bouwhuis e799270578
Recover mqtt abbrevations optimizations (#118762)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-06-04 06:20:18 +02:00
Michael Hansen 0257aa4839
Clean up exposed domains (#118753)
* Remove lock and script

* Add media player

* Fix tests
2024-06-03 21:26:40 -05:00
J. Nick Koston 35a1ecea27
Speed up statistics_during_period websocket api (#118672) 2024-06-03 18:08:46 -05:00
Jan Bouwhuis 39f5f30ca9
Revert "Allow MQTT device based auto discovery" (#118746)
Revert "Allow MQTT device based auto discovery (#109030)"

This reverts commit 585892f067.
2024-06-03 22:30:37 +02:00
Paulus Schoutsen 299c0de968
Update OpenAI prompt on each interaction (#118747) 2024-06-03 22:27:05 +02:00
Joost Lekkerkerker 2a92f78453
Require firmware version 3.1.1 for airgradient (#118744) 2024-06-03 21:08:28 +02:00
Jan Bouwhuis dd1dd4c6a3
Migrate Intergas InComfort/Intouch Lan2RF gateway YAML to config flow (#118642)
* Add config flow

* Make sure the device is polled - refactor

* Fix

* Add tests config flow

* Update test requirements

* Ensure dispatcher has a unique signal per heater

* Followup on review

* Follow up comments

* One more docstr

* Make specific try blocks and refactoring

* Handle import exceptions

* Restore removed lines

* Move initial heater update in try block

* Raise issue failed import

* Update test codeowners

* Remove entity device info

* Remove entity device info

* Appy suggestions from code review

* Remove broad exception handling from entry setup

* Test coverage
2024-06-03 20:37:48 +02:00
tronikos f9dff1632e
Use ISO format when passing date to LLMs (#118705) 2024-06-03 19:48:50 +02:00
Richard Kroegel 60bcd27a47
Use snapshot_platform helper for BMW tests (#118735)
* Use snapshot_platform helper

* Remove comments

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-03 19:46:04 +02:00
Joost Lekkerkerker 16485af7fc
Configure device in airgradient config flow (#118699) 2024-06-03 19:23:07 +02:00
Diogo Gomes 91ca7db02f
Address reviews comments in #117147 (#118714) 2024-06-03 19:22:00 +02:00
epenet 5d594a509c
Add type hints for MockAgent in conversation tests (#118701) 2024-06-03 17:44:13 +02:00
epenet f178467b0e
Add type hints for TTS test fixtures (#118704) 2024-06-03 17:43:18 +02:00
epenet dd90fb15e1
Fix incorrect type hint in dremel_3d_printer tests (#118709) 2024-06-03 17:16:48 +02:00
Erik Montnemery 99e02fe2b2
Remove tag_id from tag store (#118713) 2024-06-03 17:15:57 +02:00
Paulus Schoutsen bdcfd93129
Automatically fill in slots based on LLM context (#118619)
* Automatically fill in slots from LLM context

* Add tests

* Apply suggestions from code review

Co-authored-by: Allen Porter <allen@thebends.org>

---------

Co-authored-by: Allen Porter <allen@thebends.org>
2024-06-03 10:36:41 -04:00
epenet 771ed33b14
Bump renault-api to 0.2.3 (#118718) 2024-06-03 15:53:23 +02:00
Joost Lekkerkerker c32eb97ac0
Disable both option in Airgradient select (#118702) 2024-06-03 15:49:51 +02:00
Jake Martin a3b60cb054
Add Monzo config reauth (#117726)
* Add reauth config flow

* Trigger reauth on Monzo AuthorisaionExpiredError

* Add missing abort strings

* Use FlowResultType enum

* One extra == swapped for is

* Use helper in reauth

* Patch correct function in reauth test

* Remove unecessary **

* Swap patch and calls check for access token checks

* Do reauth trigger test without patch

* Remove unnecessary str() on user_id - always str anyway

* Update tests/components/monzo/test_config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-06-03 13:18:15 +02:00
Richard Kroegel ef7c7f1c05
Refactor fixture calling for BMW tests (#118708)
* Refactor BMW tests to use pytest.mark.usefixtures

* Fix freeze_time

---------

Co-authored-by: Richard <rikroe@users.noreply.github.com>
2024-06-03 13:16:12 +02:00
Erik Montnemery 765114bead
Don't store tag_id in tag storage (#118707) 2024-06-03 13:11:00 +02:00
Erik Montnemery 35dcda29b9
Use ULID instead of UUID for config entry id and flow ID (#118677) 2024-06-03 10:34:09 +02:00
epenet 6cf7889c38
Add type hints for requests_mock.Mocker in test fixtures (#118678) 2024-06-03 10:30:08 +02:00
epenet 9be972b13e
Add type hints for list[Device] in test fixtures (#118681) 2024-06-03 10:21:24 +02:00
epenet f39dd40be1
Add type hints for hass_storage in test fixtures (#118682) 2024-06-03 10:20:57 +02:00
epenet fdec1b0b16
Add type hints for ClientSessionGenerator in test fixtures (#118689) 2024-06-03 10:19:49 +02:00
epenet 77c627e6f3
Fix incorrect blueprint type hints in tests (#118694) 2024-06-03 10:19:13 +02:00
epenet d5eebb202b
Remove unused fixture from elmax tests (#118684) 2024-06-03 10:18:36 +02:00
epenet 8772a59f5c
Add type hints for Recorder in test fixtures (#118685) 2024-06-03 10:17:51 +02:00
epenet 666fc2333a
Add type hints for AiohttpClientMocker in test fixtures (#118691) 2024-06-03 10:13:22 +02:00
epenet c93d42d59b
Add type hints for FrozenDateTimeFactory in test fixtures (#118690) 2024-06-03 10:12:58 +02:00
J. Nick Koston 134088e1f6
Revert "Add websocket API to get list of recorded entities (#92640)" (#118644)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-06-03 10:11:24 +02:00
epenet 1db7c7946e
Add type hints for MqttMockHAClient in test fixtures (#118683) 2024-06-03 09:29:15 +02:00
epenet 9a5706fa30
Add type hints for pytest.LogCaptureFixture in test fixtures (#118687) 2024-06-03 09:28:54 +02:00
G Johansson 6a8a975fae
Remove config flow import from fastdotcom (#118665) 2024-06-02 21:04:35 -04:00
G Johansson dd1d21c77a
Fix entity state dispatching for Tag entities (#118662) 2024-06-02 20:41:16 -04:00
puddly 746939c8cd
Bump ZHA dependencies (#118658)
* Bump bellows to 0.39.0

* Do not create a backup if there is no active ZHA gateway object

* Bump universal-silabs-flasher as well
2024-06-02 16:55:48 -04:00
Jan Bouwhuis 375f48142c
Fix handling undecoded mqtt sensor payloads (#118633) 2024-06-02 21:25:05 +02:00
Maciej Bieniek afc29fdbe7
Add support for the DS18B20 temperature sensor to Nettigo Air Monitor integration (#118601)
Add support for DS18B20 temperature sensor

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-02 20:55:36 +02:00
epenet 37fc16d7b6
Fix incorrect `patch` type hint in main conftest (#118461) 2024-06-02 15:34:30 +02:00
J. Nick Koston 8f94205014
Include a traceback for non-strict event loop blocking detection (#118620) 2024-06-02 06:36:25 -04:00
Maciej Bieniek 649d6ec11a
Bump `nettigo_air_monitor` library to version `3.2.0` (#118600)
* Bump nam to version 3.2.0

* Update test snapshot

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-06-01 18:10:45 +02:00
Dave T b69789d056
Don't prompt user to verify still image if none was provided in generic camera (#118599)
Skip user prompt for preview image if only stream
2024-06-01 10:30:32 -04:00
epenet 6115dffd80
Cleanup pylint ignore in melnor tests (#118564) 2024-06-01 08:03:32 +02:00
tronikos a4612143e6
Use gemini-1.5-flash-latest in google_generative_ai_conversation.generate_content (#118594) 2024-05-31 21:57:14 -07:00
tronikos 7af469f81e
Strip Google AI text responses (#118593)
* Strip Google AI test responses

* strip each part
2024-05-31 21:55:52 -07:00
Paulus Schoutsen f3b20d30ae
Add base prompt for LLMs (#118592) 2024-06-01 00:21:37 -04:00
tronikos dfb407728f
Stop instructing LLM to not pass the domain as a list (#118590) 2024-05-31 20:21:18 -04:00
Robert Svensson 3232fd0eaf
Improve UniFi config flow tests (#118587)
* Use proper fixtures in config flow tests

* Improve rest of config flow tests

* Small improvement

* Rename fixtures
2024-06-01 00:27:53 +02:00
epenet 41e852a01b
Add ability to replace connections in DeviceRegistry (#118555)
* Add ability to replace connections in DeviceRegistry

* Add more tests

* Improve coverage

* Apply suggestion

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-31 15:31:44 -04:00
Denis Shulyaka bae96e7d36
Add Google Generative AI Conversation system prompt `user_name` and `llm_context` variables (#118510)
* Google Generative AI Conversation: Add variables to the system prompt

* User name and llm_context

* test for template variables

* test for template variables

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-31 15:28:44 -04:00
Denis Shulyaka 46da43d09d
Add OpenAI Conversation system prompt `user_name` and `llm_context` variables (#118512)
* OpenAI Conversation: Add variables to the system prompt

* User name and llm_context

* test for user name

* test for user id

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-31 15:28:23 -04:00
Josef Zweck d956db691a
Migrate openai_conversation to `entry.runtime_data` (#118535)
* switch to entry.runtime_data

* check for missing config entry

* Update homeassistant/components/openai_conversation/__init__.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-31 11:16:39 -04:00
Paulus Schoutsen 6dd01dbff7
Rename llm.ToolContext to llm.LLMContext (#118566) 2024-05-31 11:11:24 -04:00
J. Nick Koston 6656f7d6b9
Log directory blocking I/O functions that run in the event loop (#118529)
* Log directory I/O functions that run in the event loop

* tests
2024-05-31 11:09:19 -04:00
Brett Adams 929568c3b5
Fix off_grid_vehicle_charging_reserve_percent in Teselemetry (#118532) 2024-05-31 07:54:40 -05:00
Maciej Bieniek c85743822a
In Brother integration use SnmpEngine from SNMP integration (#118554)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-31 07:52:43 -05:00
J. Nick Koston 76391d71d6
Fix snmp doing blocking I/O in the event loop (#118521) 2024-05-31 07:44:28 -05:00
epenet 0974ea9a5a
Adjust "hass" type hint for test fixtures in pylint plugin (#118548)
Adjust "hass" type hint in pylint plugin
2024-05-31 13:06:49 +02:00
epenet 7e1f4cd3fb
Check fixtures for type hints in pylint plugin (#118313)
* Check fixtures for type hints in pylint plugin

* Apply suggestion
2024-05-31 12:42:42 +02:00
epenet 83e77720e9
Improve type hints for mock_bluetooth/enable_bluetooth (#118484) 2024-05-30 22:16:45 -04:00
tronikos 2b7685b71d
Add Google Assistant SDK diagnostics (#118513) 2024-05-30 22:13:54 -04:00
Josef Zweck eae04bf2e9
Add typing for OpenAI client and fallout (#118514)
* typing for client and consequences

* Update homeassistant/components/openai_conversation/conversation.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-30 22:13:18 -04:00
tronikos 2bd142d3a6
Improve LLM prompt (#118520) 2024-05-30 22:03:57 -04:00
tronikos 272c51fb38
Fix unnecessary single quotes escaping in Google AI (#118522) 2024-05-30 19:56:06 -04:00
tronikos 0d6c7d0973
Fix LLMs asking which area when there is only one device (#118518)
* Ignore deprecated open and close cover intents for LLMs

* Fix LLMs asking which area when there is only one device

* remove unrelated changed

* remove unrelated changes
2024-05-30 17:14:11 -04:00
epenet a5dc4cb1c7
Fix incorrect `zeroconf` type hint in tests (#118465)
* Fix incorrect `mock_async_zeroconf` type hint

* Adjust thread

* One more

* Fix mock_zeroconf also

* Adjust

* Adjust
2024-05-30 21:57:09 +02:00
Matthias Alphart 1352c4e427
Increase test coverage for KNX Climate (#117903)
* Increase test coverage fro KNX Climate

* fix test type annotation
2024-05-30 21:42:11 +02:00
Diogo Gomes 822273a6a3
Add support for V2C Trydan 2.1.7 (#117147)
* Support for firmware 2.1.7

* add device ID as unique_id

* add device ID as unique_id

* add test device id as unique_id

* backward compatibility

* move outside try

* Sensor return type

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

* not needed

* make slave error enum state

* fix enum

* Update homeassistant/components/v2c/sensor.py

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

* Update homeassistant/components/v2c/strings.json

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

* Update homeassistant/components/v2c/strings.json

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

* simplify tests

* fix misspellings from upstream library

* add sensor tests

* just enough coverage for enum sensor

* Refactor V2C tests (#117264)

* Refactor V2C tests

* fix rebase issues

* ruff

* review

* fix https://github.com/home-assistant/core/issues/117296

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-30 20:42:48 +02:00
Ron Weikamp 43c69c71c2
Add time based integration trigger to Riemann sum integral helper sensor (#110685)
* Schedule max dt for Riemann Integral sensor

* Simplify validation. Dont integrate on change if either old or new state is not numeric.

* Add validation to integration methods. Rollback requirement for both states to be always numeric.

* Use 0 max_dt for disabling time based updates.

* Use docstring instead of pass keyword in abstract methods.

* Use time_period config validation for max_dt

* Use new_state for scheduling max_dt. Only schedule if new state is numeric.

* Use default 0 (None) for max_dt.

* Rename max_dt to max_age.

* Rollback accidental renaming of different file

* Remove unnecessary and nonsensical max value.

* Improve new config description

* Use DurationSelector in config flow

* Rename new config to max_sub_interval

* Simplify by checking once for the integration strategy

* Use positive time period validation of sub interval in platform schema

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

* Remove return keyword

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

* Simplify scheduling of interval exceeded callback

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

* Improve documentation

* Be more clear about when time based integration is disabled.

* Update homeassistant/components/integration/config_flow.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 20:40:23 +02:00
Jan Bouwhuis 796d940f2f
Fix group platform dependencies (#118499) 2024-05-30 19:14:54 +02:00
Paulus Schoutsen ae3741c364
Intent script: allow setting description and platforms (#118500)
* Add description to intent_script

* Allow setting platforms
2024-05-30 12:53:42 -04:00
Tsvi Mostovicz 12215c51b3
Fix Jewish calendar unique id's (#117985)
* Initial commit

* Fix updating of unique id

* Add testing to check the unique id is being updated correctly

* Reload the config entry and confirm the unique id has not been changed

* Move updating unique_id to __init__.py as suggested

* Change the config_entry variable's name back from config to config_entry

* Move the loop into the update_unique_ids method

* Move test from test_config_flow to test_init

* Try an early optimization to check if we need to update the unique ids

* Mention the correct version

* Implement suggestions

* Ensure all entities are migrated correctly

* Just to be sure keep the previous assertion as well
2024-05-30 18:27:15 +02:00
Ron Weikamp 2814ed5003
Add allow_negative configuration option to DurationSelector (#116134)
* Add configuration option positive to DurationSelector

* Rename to allow_negative in conjunction with a deprecation notice

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 17:42:34 +02:00
Marcel van der Veldt a95c074ab8
Extend Matter sensor discovery schemas for Air Purifier / Air Quality devices (#118483)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-05-30 16:59:45 +02:00
Oleg Kurapov 2cc38b426a
Add XML support to RESTful binary sensor (#110062)
* Add XML support to RESTful binary sensor

* Add test for binary sensor with XML input data

* Address mypy validation results by handling None returns

* Use proper incorrect XML instead of blank

* Change failure condition to match the behavior of the library method

* Change error handling for bad XML to expect ExpatError

* Parametrize bad XML test to catch both empty and invalid XML

* Move exception handling out of the shared method

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 16:29:50 +02:00
Robert Resch 7f49077ec6
Set enity_category to config for airgradient select entities (#118477) 2024-05-30 14:20:02 +02:00
Maciej Bieniek cf51179009
Add tests for Tractive integration (#118470)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-30 12:45:11 +02:00
Alexey Guseynov fc5d58effd
Add Total Volatile Organic Compounds (tVOC) matter discovery schema (#116963) 2024-05-30 12:20:02 +02:00
Robert Resch ac979e9105
Bump deebot-client to 7.3.0 (#118462) 2024-05-30 11:40:05 +02:00
epenet 06251d403a
Fix special case in pylint type hint plugin (#118454)
* Fix special case in pylint type hint plugin

* Simplify

* Simplify

* Simplify

* Apply

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-05-30 10:41:32 +02:00
epenet c6e0e93680
Cleanup mock_get_source_ip from tests (#118459) 2024-05-30 09:37:01 +02:00
epenet 9221eeb2f7
Add check for usefixtures decorator in pylint plugin (#118456) 2024-05-30 08:54:56 +02:00
epenet 1317837986
Improve type hints in tests (q-z) (#118381) 2024-05-30 08:48:02 +02:00
epenet 242ee04642
Improve type hints in tests (i-p) (#118380) 2024-05-30 08:47:08 +02:00
epenet 092cdcfe91
Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
tronikos 4893faa671
Instruct LLM to not pass a list to the domain (#118451) 2024-05-30 08:37:45 +02:00
tronikos 639f6c640c
Improve LLM prompt (#118443)
* Improve LLM prompt

* test

* improvements

* improvements
2024-05-29 21:44:33 -04:00
swcloudgenie a670169325
New official genie garage integration (#117020)
* new official genie garage integration

* move api constants into api module

* move scan interval constant to cover.py
2024-05-29 16:13:28 -04:00
Marcel van der Veldt 8cc15e82df
Fix light discovery for Matter dimmable plugin unit (#118404) 2024-05-29 21:09:50 +02:00
Joost Lekkerkerker c80718628e
Add select entities to AirGradient (#117136) 2024-05-29 20:12:51 +02:00
Marcel van der Veldt 7136be5047
Bump Python Matter Server library to 6.1.0(b0) (#118388) 2024-05-29 19:20:18 +02:00
Michael Hansen 3ffbbcfa5c
Allow delayed commands to not have a device id (#118390) 2024-05-29 12:39:41 -04:00
G Johansson 9e3e7f5b48
Entity for Tags (#115048)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik <erik@montnemery.com>
2024-05-29 17:45:19 +02:00
epenet 461ac1e0bc
Add ClientSessionGenerator type hints in tests (#118377) 2024-05-29 14:49:14 +02:00
epenet d10362e226
Add AiohttpClientMocker type hints in tests (#118373) 2024-05-29 14:38:46 +02:00
epenet 1fbf93fd36
Add SnapshotAssertion type hints in tests (#118371) 2024-05-29 14:11:58 +02:00
epenet 166c588cac
Add LogCaptureFixture type hints in tests (#118372) 2024-05-29 14:10:00 +02:00
tronikos aeee222df4
Default to gemini-1.5-flash-latest in Google Generative AI (#118367)
Default to flash
2024-05-29 08:04:47 -04:00
tronikos 4056c4c2cc
Ask LLM to pass area name and domain (#118357) 2024-05-29 08:03:43 -04:00
karwosts 6e5dcd8b8d
Support in blueprint schema for input sections (#110513)
* initial commit for sections

* updates

* add description

* fix test

* rename collapsed key

* New schema

* update snapshots

* Testing for sections

* Validate no duplicate input keys across sections

* rename all_inputs

* Update homeassistant/components/blueprint/models.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-29 13:13:01 +02:00
Adam Kapos 43f42dd512
Extend image_upload to return the original image (#116652) 2024-05-29 11:16:23 +02:00
Jan Bouwhuis 585892f067
Allow MQTT device based auto discovery (#109030)
* Add MQTT device based auto discovery

* Respect override of component options over shared ones

* Add state_topic, command_topic, qos and encoding as shared options

* Add shared option test

* Rename device.py to schemas.py

* Remove unused legacy `platform` attribute to avoid confusion

* Split validation device and origin info

* Require `origin` info on device based discovery

* Log origin info for only once for device discovery

* Fix tests and linters

* ruff

* speed up _replace_all_abbreviations

* Fix imports and merging errors - add slots attr

* Fix unrelated const changes

* More unrelated changes

* join string

* fix merge

* Undo move

* Adjust logger statement

* fix task storm to load platforms

* Revert "fix task storm to load platforms"

This reverts commit 8f12a5f251.

* bail if logging is disabled

* Correct mixup object_id and node_id

* Auto migrate entities to device discovery

* Add device discovery test for device_trigger

* Add migration support for non entity platforms

* Use helper to remove discovery payload

* Fix tests after update branch

* Add discovery migration test

* Refactor

* Repair after rebase

* Fix discovery is broken after migration

* Improve comments

* More comment improvements

* Split long lines

* Add comment to indicate payload dict can be empty

* typo

* Add walrus and update comment

* Add tag to migration test

* Join try blocks

* Refactor

* Cleanup not used attribute

* Refactor

* Move _replace_all_abbreviations out of try block

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-29 11:12:05 +02:00
Bouwe Westerdijk 83e62c5239
Discover new device at runtime in Plugwise (#117688)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-05-29 11:00:07 +02:00
G Johansson 6b7ff2bf44
Add default code to alarm_control_panel (#112540) 2024-05-29 10:46:53 +02:00
G Johansson 13ebc6fb0e
Add more tests to Yale Smart Alarm (#116501) 2024-05-29 10:34:20 +02:00
epenet bead6b0094
Rename service_calls fixture in template tests (#118358) 2024-05-29 10:27:52 +02:00
Stefan Agner cae22e5109
Adjust add-on installation error message (#118309) 2024-05-29 09:41:09 +02:00
epenet 98d24dd276
Improve typing for `calls` fixture in tests (m-z) (#118350)
* Improve typing for `calls` fixture in tests (m-z)

* More

* More
2024-05-29 09:30:41 +02:00
epenet 0c38aa56f5
Rename calls fixture in components tests (#118355) 2024-05-29 09:26:44 +02:00
epenet 0f8588a857
Rename calls fixture in mqtt tests (#118354)
Rename calls fixture in mqtt
2024-05-29 09:25:34 +02:00
epenet e488f9b87f
Rename calls fixture in calendar tests (#118353) 2024-05-29 09:24:36 +02:00
J. Nick Koston 0888233f06
Make Recorder dialect_name a cached_property (#117922) 2024-05-29 09:23:40 +02:00
Bygood91 f7d2d94fdc
Add Google assistant Gate device type (#118144) 2024-05-29 09:18:02 +02:00
Robert Resch e087abe802
Add ws endpoint to remove expiration date from refresh tokens (#117546)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-29 09:09:59 +02:00
epenet 7e62061b9a
Improve typing for `calls` fixture in tests (a-l) (#118349)
* Improve typing for `calls` fixture in tests (a-l)

* More

* More
2024-05-29 09:06:48 +02:00
Raman Gupta 89ae425ac2
Update zwave_js WS APIs for provisioning (#117400) 2024-05-29 02:47:09 -04:00
Maximilian Hildebrand 05d0174e07
Add august open action (#113795)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-28 20:35:53 -10:00
G Johansson ae6c394b53
Add smoke detector temperature to Yale Smart Alarm (#116306) 2024-05-29 08:34:00 +02:00
Erik Montnemery 7abffd7cc8
Don't report entities with invalid unique id when loading the entity registry (#118290) 2024-05-29 08:32:39 +02:00
Quentame 4d7b1288d1
Fix epic_games_store mystery game URL (#118314) 2024-05-29 08:32:29 +02:00
J. Nick Koston 76aa504e36
Fix last_reported_timestamp not being updated when last_reported is changed (#118341)
* Reduce number of calls to last_reported_timestamp

When a state is created, last_update is always the same
as last_reported, and we only update it later if it changes
so we can pre-set the cached property to avoid it being
run when the recorder accesses it later.

* fix cache not being overridden

* coverage
2024-05-28 19:03:19 -10:00
J. Nick Koston 79bc179ce8
Improve websocket message coalescing to handle thundering herds better (#118268)
* Increase websocket peak messages to match max expected entities

During startup the websocket would frequently disconnect if more than
4096 entities were added back to back. Some MQTT setups will have more
than 10000 entities. Match the websocket peak value to the max expected
entities

* coalesce more

* delay more if the backlog gets large

* wait to send if the queue is building rapidly

* tweak

* tweak for chrome since it works great in firefox but chrome cannot handle it

* Revert "tweak for chrome since it works great in firefox but chrome cannot handle it"

This reverts commit 439e2d76b1.

* adjust for chrome

* lower number

* remove code

* fixes

* fast path for bytes

* compact

* adjust test since we see the close right away now on overload

* simplify check

* reduce loop

* tweak

* handle ready right away
2024-05-28 23:14:06 -04:00
Paulus Schoutsen d22871f1fd
Reduce the intent response data sent to LLMs (#118346)
* Reduce the intent response data sent to LLMs

* No longer delete speech
2024-05-28 23:07:00 -04:00
Paulus Schoutsen c097a05ed4
Tweak Assist LLM API prompt (#118343) 2024-05-28 22:43:22 -04:00
Michael Hansen d223e1f2ac
Add Conversation command to timers (#118325)
* Add Assist command to timers

* Rename to conversation_command. Execute in timer code.

* Make agent_id optional

* Fix arg

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-28 20:33:31 -05:00
Paulus Schoutsen 615a1eda51
LLM Assist API to ignore intents if not needed for exposed entities or calling device (#118283)
* LLM Assist API to ignore timer intents if device doesn't support it

* Refactor to use API instances

* Extract ToolContext class

* Limit exposed intents based on exposed entities
2024-05-28 21:29:18 -04:00
Paulus Schoutsen 0cf574dc42
Update the recommended model for Google Gen AI (#118323) 2024-05-28 21:21:28 -04:00
Marcel van der Veldt 5f5288d8b9
Several fixes for the Matter climate platform (#118322)
* extend hvacmode mapping with extra modes

* Fix climate platform

* adjust tests

* fix reversed test

* cleanup

* dry and fan hvac mode test
2024-05-28 21:18:35 -04:00
Jesse Hills 035e21ddbb
[esphome] 100% voice assistant test coverage (#118334) 2024-05-28 21:14:47 -04:00
Michael Hansen 9e1676bee4
Filter timers more when pausing/unpausing (#118331) 2024-05-28 19:36:34 -04:00
J. Nick Koston 69353d2719
Speed up mqtt debug info on message callback (#118303) 2024-05-28 11:10:07 -10:00
dontinelli 5eb1d72691
Raise UpdateFailed on fyta API error (#118318)
* Raise UpdateFailed

* Update homeassistant/components/fyta/coordinator.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Remove logger

* simplify code

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-28 21:18:15 +02:00
Jesse Hills 7f530ee0e4
[esphome] Assist timers (#118275)
* [esphome] Assist timers

* Add intent to manifest dependencies

* Add test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-28 14:57:58 -04:00
Michael Hansen 06d6f99964
Respect WyomingSatelliteMuteSwitch state on start (#118320)
* Respect WyomingSatelliteMuteSwitch state on start

* Fix test

---------

Co-authored-by: Kostas Chatzikokolakis <kostas@chatzi.org>
2024-05-28 14:55:02 -04:00
Michael Hansen 75ab4d2398
Add temperature slot to light turn on intent (#118321) 2024-05-28 14:53:49 -04:00
epenet a59621bf9e
Add more type hints to pylint plugin (#118319) 2024-05-28 18:37:38 +02:00
epenet 0b2aac8f4c
Use registry fixtures in tests (z) (#118300) 2024-05-28 18:25:49 +02:00
Michael Hansen 106cb4cfb7
Bump intents and add tests for new error messages (#118317)
* Add new error keys

* Bump intents and test new error messages

* Fix response text
2024-05-28 12:24:24 -04:00
epenet 05fc7cfbde
Enforce namespace use for import conventions (#118215)
* Enforce namespace use for import conventions

* Include all registries

* Only apply to functions

* Use blacklist

* Rephrase comment

* Add async_entries_for_config_entry

* Typo

* Improve

* More core files

* Revert "More core files"

This reverts commit 9978b93706.

* Revert diagnostics amends

* Include category/floor/label registries

* Performance

* Adjust text
2024-05-28 18:15:53 +02:00
Kostas Chatzikokolakis 14132b5090
Don't set 'assist in progess' flag on wake_word-end (#113585) 2024-05-28 11:09:59 -05:00
Paulus Schoutsen f0d7f48930
Handle generic commands as area commands in the LLM Assist API (#118276)
* Handle generic commands as area commands in the LLM Assist API

* Add word area
2024-05-28 11:21:17 -04:00
Mike Degatano dbcef2e3c3
Add more supervisor info to system info panel (#115715)
* Add virtualization field fo system info

* Add ntp sync and host connectivity

* Prevent nonetype errors

* Add supervisor_connectivity and fix tests

* Add mock of network info to other fixtures

* Update more fixtures with network/info mock
2024-05-28 16:14:42 +02:00
epenet e58d060f82
Use registry fixtures in tests (s) (#118295) 2024-05-28 15:41:03 +02:00
epenet f07f183a3e
Use registry fixtures in tests (v-y) (#118299) 2024-05-28 14:26:14 +02:00
epenet 8d8696075b
Use registry fixtures in tests (r) (#118293) 2024-05-28 14:23:31 +02:00